Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: SAV on July 11, 2017, 05:05:43 PM

Title: Automatically assign location for non coded markers
Post by: SAV on July 11, 2017, 05:05:43 PM
Hi Alexey,

Here is what I would like to achieve. I have imported geotagged imagery (from an UAV) and already ran photo alignment to generate a sparse point cloud (tie points). Then I used PhotoScan's marker detection feature to automatically identify non coded markers in all images, which works fine.
Now here is what the Python script should do. When importing the real locations of the markers (which have been measured with a survey grade RTK GPS), Photoscan should automatically look for the marker that is closest to the imported location and then copy X, Y, Z to this marker. Would be great if the user could define a 'search radius threshold', e.g. if there was no marker within 5m of the imported location, then DISABLE this marker/don't import any location information.

This would eliminate the time-consuming step of manually 'linking' non coded markers with imported ground control point coordinates. Additionally, it would help to automate processing.

Thanks for your help.

Regards
SAV

P.S. Other people would also benefit from such a script. See http://www.agisoft.com/forum/index.php?topic=6258.msg30281#msg30281
Title: Re: Automatically assign location for non coded markers
Post by: Alexey Pasumansky on July 11, 2017, 05:29:32 PM
Hello SAV,

I think similar feature would be available in version 1.4. After non-coded markers detection it should be possible to import the CSV file with the marker coordinates and let PhotoScan to find the correspondence automatically and to rename the found matching markers according to the CSV file.

For regular marker grid, though, like in the thread you are referring to, it may not work very well.
Title: Re: Automatically assign location for non coded markers
Post by: SAV on July 11, 2017, 06:35:18 PM
Hi Alexey,

Thanks for the quick reply. Great to hear that this feature is already 'in the pipeline'.
Can't wait to get my hands on version 1.4.

Keep up the great work.

Regards
SAV
Title: Re: Automatically assign location for non coded markers
Post by: BobvdMeij on November 27, 2017, 06:56:06 PM
Hello SAV,

I think similar feature would be available in version 1.4. After non-coded markers detection it should be possible to import the CSV file with the marker coordinates and let PhotoScan to find the correspondence automatically and to rename the found matching markers according to the CSV file.

For regular marker grid, though, like in the thread you are referring to, it may not work very well.

Has this feature indeed been included in v1.4? I can't seem to find any mentioning thereof in the Change Log.

I would also like to add to SAV's suggested functionality. His idea seems to assume the SparseCloud's (i.e. the image's) and GCP's coordinates are in the same reference system, likely in WGS84. Although this may be case in many instances, I reckon a similarly large group (if not larger) group of users collect their GCP's in a coordinate system other than WGS84.

In such instances I reckon a filtering/ linking based on absolute distances (i.e. link GCP-coordinate with Detected Marker if distance < 5m) will not work. I suggest the functionality should also be able to cope with the relative location/ distribution of GCPs on the one hand and Detected Markers on the other, as to allow for linking the CSV coordinates with the automatically detected markers based on the relative distribution/ pattern of both the detected markers and GCP coordinate file in their respective coordinate systems.
Title: Re: Automatically assign location for non coded markers
Post by: Helsky on July 06, 2018, 04:55:14 PM
Hello SAV,

I think similar feature would be available in version 1.4. After non-coded markers detection it should be possible to import the CSV file with the marker coordinates and let PhotoScan to find the correspondence automatically and to rename the found matching markers according to the CSV file.

For regular marker grid, though, like in the thread you are referring to, it may not work very well.

Is this feature already included in the current version of agisoft?
Title: Re: Automatically assign location for non coded markers
Post by: Alexey Pasumansky on July 06, 2018, 05:07:25 PM
Hello Helsky,

Yes, it is included in the version 1.4.

You can find "ignore labels" and "threshold" options in the Import CSV dialog.
Title: Re: Automatically assign location for non coded markers
Post by: SAV on July 16, 2018, 12:28:34 PM
Hi Alexey,

Thanks for letting me/us know. This is a GREAT feature. I guess it's also accessible via Python scripting.

Regards,
SAV
Title: Re: Automatically assign location for non coded markers
Post by: Alexey Pasumansky on July 16, 2018, 12:47:51 PM
Hello SAV,

There are corresponding arguments in loadReference function: ignore_labels (Boolean) and threshold (float).
Title: Re: Automatically assign location for non coded markers
Post by: SAV on July 17, 2018, 04:39:34 AM
Great. Thanks for the info, Alexey.

Kind regards,
SAV