apriltag.corners() to subpixel precision ?


In Olson’s 2011 AprilTag paper he states that the:

" … corner estimates are accurate to a small fraction of a pixel."

I’ve been using the apriltag.corners() to get the corner positions of the tags but they are only returned with pixel (integer) precision.

Could you change this in the C/C++ firmware so that the corner positions are returned as floating point - tenths or hundredths of a pixel precision ?

I would like to use the OpenMV cam and AprilTags to measure camera position.

I was hoping to take the corner positions from OpenMV into OpenCV and, together with the ‘known’ corner positions for a printed array of tags, use them with solvePnP to calibrate the output from apriltag.x_ , y_ and z_translation.

Please note that this is not the same as camera calibration for fx, fy, cx and cy - I’ve done that separately.

Best Wishes,


Yes, we can enable this. However, if you can do a PR it will get in faster:

The corners are stored here:


The values are stored in this struct:


And the access methods for python are here:


And the python keywords are here:


It’s straight forward to edit the code to add in what you need. If you can’t make a PR for this then create a bug tracker on github for the feature.

Thank You Kwabena

I’m not that familiar with C / Cython and I’m really pressed with project demands at the moment. Ironically this looks looks like a good place to start getting familiar with the firmware.

I’ve submitted as an issue on GitHub for now anyway. Hope that is OK.



Okay. This will amke it in eventually. I’ll have a lot of time to work soon.