Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SB

Pages: [1] 2 3
1
General / Re: Agisoft Metashape 1.7.0 pre-release
« on: November 03, 2020, 06:40:18 PM »

[For laser scans] Current approach is the following:
...
- run Align Photos operation as usual.
Does that mean that the poses of the laser scans will be adjusted in addition to the internal and external parameters calculated for the standard cameras?

As a user who commonly combines laser scan data with photogrammetry that is not at all what I would want to happen. The laser scan data will almost always be coming from other software where we have much more control over the alignment process. Therefore the laser scan data should be treated as fixed (no pose adjustments) and photos aligned to it.

...

Yes, it can be said that the laser scans are aligned together with the common images.

If you need to rely on the accurate scanner locations, you can input corresponding coordinates to the Reference pane for the related camera instances and adjust the accuracy value for them in order to increase the weight for them.

...

I would also like to see an option to just check a box or similar to force laser scan alignment to be preserved exactly, if it had been registered already in a 3rd party package, otherwise the function would not be useful. It seems a lot of manual work to input the coordinates of each laser setup (and presumably orientation?) to ensure they stay fixed. I take great care over my registration and wouldn't trust any algorithm to do a better job! We treat our laser data as sacred and once it is registered everything else (so many things...) is derived from it, but can not be allowed to affect it!

I haven't actually tried 1.7 yet so I might not know what I'm talking about, but it seemed like a potential issue!

I would also like for the laser scan data to remain registered.  I am trying it now for the past few days and making some progress.

I had to use 40 markers to align 4 laser scans and 4 360 degree panorama photos due to the spacing between the laser scans and also no transition from camera positions.  However, the laser scan data came directly from FARO Scene ready to go.

The imported laser data does have reference metadata such as position, yaw, pitch, roll but when I try to use that information and align by reference, the program crashes and sends an error report.  I imagine that eventually, the scan data can be positioned using the reference metadata and forced to stay in that position by placing markers and assigning xyz values but it sure would be nice to have that done by default.

Thank you for a great start!

2
Python and Java API / Re: Import markers from multiple files
« on: November 14, 2019, 11:31:54 PM »
A few years ago I wrote a python script to do this.  It will need rewriting for the current API but you can see the workflow in the code


Code: [Select]
import PhotoScan
from xml.dom import minidom

path = PhotoScan.app.getOpenFileName("Specify input XML file:")

doc = PhotoScan.app.document
chunk = doc.chunk

xml = minidom.parse(path)
main = xml.childNodes[0]

xml_markers_reference = xml.childNodes[0].childNodes[1].childNodes[5]
xml_markers_proj = xml.childNodes[0].childNodes[1].childNodes[7].childNodes[1].childNodes[1]
xml_camera = xml.childNodes[0].childNodes[1].childNodes[3]

cameras = dict()
markers = dict()
marker_proj = dict()
marker_proj_pins = dict()

for i in range(1, len(xml_camera.childNodes) - 1, 2):
camera_id = xml_camera.childNodes[i].getAttribute("id")
camera_label = xml_camera.childNodes[i].getAttribute("label")
cameras[camera_label] = camera_id

for i in range(1, len(xml_markers_reference.childNodes) - 1, 2):
marker_id = xml_markers_reference.childNodes[i].getAttribute("id")
marker_label = xml_markers_reference.childNodes[i].getAttribute("label")
markers[marker_id] = marker_label

for i in range(1, len(xml_markers_proj.childNodes) - 1, 2):
cam_list = dict()
pinned_list = dict()
marker_id = xml_markers_proj.childNodes[i].getAttribute("marker_id")

for j in range(1, len(xml_markers_proj.childNodes[i].childNodes) - 1, 2):

camera_id = xml_markers_proj.childNodes[i].childNodes[j].getAttribute("camera_id")
x = float(xml_markers_proj.childNodes[i].childNodes[j].getAttribute("x"))
y = float(xml_markers_proj.childNodes[i].childNodes[j].getAttribute("y"))
pinned = xml_markers_proj.childNodes[i].childNodes[j].getAttribute("pinned")

cam_list[camera_id] = PhotoScan.Vector([x, y])
pinned_list[camera_id] = pinned.lower() in ("yes", "true", "1")
       

marker_proj[marker_id] = cam_list

marker_proj_pins[marker_id] = pinned_list



for marker_id in marker_proj.keys():

        dup_found = False
        for mrkr in chunk.markers:
                if mrkr.label == markers[marker_id]:
                        m = mrkr
                        print ("Duplicate Marker found " + mrkr.label + " - using it")
                        dup_found = True
       
        if not dup_found:
                chunk.addMarker()
                m = chunk.markers[-1]
                m.label = markers[marker_id]

        for camera in chunk.cameras:
                if camera.label in cameras.keys():
                        if cameras[camera.label] in marker_proj[marker_id].keys():
                                print ("Adding camera " + camera.label + " to marker " + m.label )
                                m.projections[camera] = marker_proj[marker_id][cameras[camera.label]]
                                if marker_proj_pins[marker_id][cameras[camera.label]] :
                                        print ("Setting pin to True")
                                        m.projections[camera].pinned = marker_proj_pins[marker_id][cameras[camera.label]]

print("Script finished")

3
General / Re: Specification of "Marker Accuracy" for Ground Control Points
« on: November 14, 2019, 11:22:54 PM »
Quote
For the 1-4 meter accuracy you are working with, this won't matter much.
1-4 meters is roughly the same accuracy as you will get from the uncorrected Drone-GNSS.
Or a cell phone

I use two EMLID Reach units and like them very much.

4
I believe VLC will do what you want.  While playing you can type SHIFT+S to take a snapshot.  It will save in a configured place.

If your video stream is not in some sort of raw format then it is already compressed in some way.  If it's mp4 then the frames will not be any better in png or tiff format.  If possible, take your photos as stills in DNG, NEF, or some other raw format.  Then tiff images are definitely worth considering.

SB


5
General / Re: Huge project with drone cameras -> mesh is too big
« on: January 29, 2019, 05:30:08 PM »
Only the photos that provide detail to the region will be used

7
General / Re: Block vs Remove Marker
« on: January 03, 2019, 09:07:50 PM »
Hello Alexey.

Is there any occasion that someone does not want a marker to appear on the image?

Thank you,

SB

8
General / Re: Image display quality
« on: December 12, 2018, 04:28:27 PM »
I noticed this too after I upgraded to the latest version 1.4.4

Mostly it happens when I view the 47MP photos taken with my Nikon D850.  It doesn't do this with the 12MP photos from my DJI Inspire.

IIt does appear to extract the points from the photos correctly, though.

SB

9
General / Re: Merging/Overlapping Two 3D Models
« on: December 07, 2018, 06:00:36 PM »
Start with each car in one chunk.

Place several markers in exactly the same places on both cars.  For each marker in the same place on bath cars, give the same name on both cars.   If it was me, I would use 5-7 markers on both cars in exactly the same places.

Align the chunks using markers.

Merge the chunks or save the models separately



10
General / Re: Network cluster setup questions
« on: November 27, 2018, 09:23:20 PM »
Hi Alexey

I think here should be more information regarding firewall configuration, ports,  and command-line options.

You can run the rlm server and job manager on any server or workstation but it needs to be accessible by all of your cluster nodes.  If the nodes can access a dedicated windows or linux server in your office or data center then I would use it.  Put the rlm server and the Photoscan job manager on the same machine since they do not use any resources. The only real requirement is that it is reliable and always up.  A linux machine would be better to use than a Windows server that does automatic updates and reboots...

Once the rlm server is running you connect to it via web browser.

http://your.hostname.edu:5054/

The service that's running is a simple program that's listening on port 5054 by default.  That means that any firewall on the server/workstation where rlm and the job manager are running needs to have the firewall configured to allow connections to the appropriate ports.  What you might want to do is allow connections from only the ip addresses of the cluster nodes and your own desktop. If anyone can connect to those ports then anyone who knows about it can setup a bunch of computers with Photoscan and use your licenses!

Configure the firewall or turn it off for testing.  Start the rlm service and try to connect from some other computer using a web browser.  Configure the rlm server with your information.


I use Windows PCs to do my project creation and such that require the graphical interface (GUI) and Windows PCs and Linux nodes to do network rendering.

There are several parameters that are very important to make this work. You should use --root to point every Photoscan instance to the same directory where the project files are located.

You use --dispatch to say where the job manager is

You use --platform offscreen to tell Photoscan not to use QT or X11 (headless mode)

A basic command that has everything you need is

./photoscan.sh --root /data/shared  --dispatch my.job-manager-hostname.edu --node --cpu_enable 1 --gpu_mask 15 --capability any --platform offscreen

If the cluster node does not have a gpu then you should leave out the gpu_mask option.


In this example, /data/shared would be a samba share or some other network share that is mounted on every node, even Windows PCs.  of course, windows PCs will not mount a share into a directory like /data/share so the --root will be different for them.

Here is a sample Windows shortcut link that starts Photoscan as a render node.  "C:\Program Files\Agisoft\PhotoScan Pro\photoscan.exe" --node --dispatch my.job-manager-hostname.edu --root \\nas22.mydomain.edu\DEPT\Data --cpu_enable 1 --gpu_mask 3


You may have trouble connecting to the rlm license server from any of the computers or nodes.  That is due to the way it searches by default.


That is whey Agisfot says this
8) As for the client side for the floating licenses, on Windows usually licenses are broadcast automatically, alternatively you can put single-line license file to PhotoScan Pro installation folder.

      The file should have .lic extension, like server.lic, for example, and should contain the following line:
            HOST FLS_address any the_port_number


For example:
          HOST 127.0.0.1 any 5053



     FLS_address - could be computer name or IP address,
      the port number -  5053 by default.
      the bold words ("HOST" and "any") shouldn't be changed.


Also, there is no need to ask anyone to install Photoscan on the cluster nodes.  You can have many copies or only one in your own home directory and run Photoscan on any cluster node that mounts your home directory. It would be a very unusual HPC if it does not have access to your home directory or files while executing your job...


The key to running Photoscan on cluster nodes is using the parameters with correct settings and having the files available in a predictable location on every node, and every node must be able to connect to the Photoscan job manager.


To start Photoscan in manager mode, use the --server option.

Windows Shortcut
"C:\Program Files\Agisoft\PhotoScan Pro\photoscan.exe" --server

or
Linux command
 ./photoscan.sh --server


The parameters
--control
--dispatch

let you change the ports used by the job manager.  I'm using 5840 and 5841.  I think it may be the default.  Anyway, the firewall has to allow connections to these ports from every node too.

That means every cluster node must be able to connect to 5840, 5841, 5053, and 5054 on your job manager / rlm server in order for the node to get a license and tasks.

11
General / Re: Creating coordinate system from a model
« on: November 19, 2018, 10:19:18 PM »
As said above, or

If you ware wanting to combine with laser scan data you should use scale bars to get the coordinates as close to laser coordinates as possible.  You can use many 3D model viewing applications to pick a point and get xyz data.  I like CloudCompare.

You may find it easier to get several xyz points from the data that you will import into Photoscan first and then assign your markers the same xyz coordinates (in essence make some GCPs with data from the other coordinate system to get Photoscan
in the same plane)  GCPs do not have to be real world coordinates...

You will need Photoscan Pro to do any of what I'm suggesting though.

SB


12
I have never been able to recover from a computer crash or power outage using Photoscan on a single workstation.

So, what I did to solve that problem is use Photoscan Pro in network mode.   Install Photoscan Pro on a computer that will not lose power or reboot and start Photoscan in -server mode.  When you start a process that takes a lot of time, use network processing.    Start Photoscan Pro on your workstation in -node mode.  It will do the work in tasks that the job manager manages. 

The job manager maintains state of the job.  If the workstation goes offline for any reason, the job manager will wait until it comes back online and resume the job.  Recent versions of Photoscan Pro allow you to save the state of jobs in the job manager so you can save  job state, shutdown the job manager, then reload the state and resume network processing later.

SB

13
General / Re: Aligning photos from two cameras
« on: November 19, 2018, 09:58:11 PM »
Copy the project psx file and give it a new name.   Copy the directory with the same project name that ends with .files and give it the same new name.  It must match the name of the new .psx file except it sould end with .files

Then you can open the new psx file


14
General / Re: Network cluster setup questions
« on: November 19, 2018, 09:51:54 PM »
Thank you Alexey. 

SB

15
General / Re: Network cluster setup questions
« on: November 15, 2018, 07:41:29 PM »
If the job manager is on the same workstation as a client then it doesn't need a license, but I think it does if it is on another machine.


You can checkout a floating license onto a laptop before leaving the network for up to 30 days:

To borrow a floating license (assuming there is one available)
 Run PhotoScan software on the machine. Go to Help -> Activate Product... menu.
 Click Borrow License button in the PhotoScan Activation dialog. Set the number of days you would
like to borrow the license for and click OK button. The number of days should not exceed 30.
 Now the machine can be disconnected from the server network, with PhotoScan being kept activated
on it.

Pages: [1] 2 3