Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: Yoann Courtois on April 17, 2020, 04:48:39 PM

Title: Marker pixel error
Post by: Yoann Courtois on April 17, 2020, 04:48:39 PM
Hey !

I'm trying to work around marker pixel error. I've seen many posts which detailled how to calculate it :
Code: [Select]
            proj = marker.projections[camera].coord
            reproj = camera.project(marker.position)
            error = (proj - reproj).norm()

However, when some mis-detection appear, it's some time not possible to project marker.position on image and reproj return None.

I'm questionning myself how GUI is able to get a pixel error on those images ("show detail" on the marker)

Hope it's clear.
Regards
Title: Re: Marker pixel error
Post by: Alexey Pasumansky on April 17, 2020, 05:12:52 PM
Hello Yoann,

Do you mean that camera.project doesn't work sometimes for the cameras that you see in Marker Info dialog?
Title: Re: Marker pixel error
Post by: Yoann Courtois on April 17, 2020, 05:19:29 PM
"camera.project" always work.
But when the marker.position is actually behind the camera, it's not possible to get a reprojection of the marker in the camera system.
So when it happens, camera.project return None, which is actually a true result.

But same image is visible in GUI marker panel when looking at marker info. Error on this image is of course huge (actually bigger than the image size), but it still exist.
I may like to reproduce this error with my script
Title: Re: Marker pixel error
Post by: Alexey Pasumansky on April 17, 2020, 10:44:04 PM
Hello Yoann,

Can you please send an example of such project with few cameras and markers to support@agisoft.com which can be used to reproduce the difference in GUI and Python behavior?