bbenligiray / stag

STag: A Stable Fiducial Marker System
MIT License
188 stars 52 forks source link

refinement issue #23

Open xiahaa opened 2 years ago

xiahaa commented 2 years ago

hi,thanks for sharing this repository. i do have a question regarding the refinement using homography. you define 4 errors: center x, center y, ellipse a and b. however, the ellipse center is not the projection of its corresponding circular center, can we use the center position as a cost to refine the homography and further get the refined corners?

best regards,

bbenligiray commented 2 years ago

Hi. I can't recall the exact math, but the transformation projects the circular center to a point that is not the ellipse center (and the distance between them increases as alpha_rel from equation 1 increases). If you try to minimize this distance, you will essentially throw away the non-affine component of the projection and the pose you obtain will be inaccurate (for example if you do that and draw the axes, they will not exactly overlap with the marker edges)