I am using OpenCV's cv2.aruco.estimatePoseSingleMarkers
function to estimate the pose of an ArUco marker & it works well. However, I also want the uncertainty / covariance in the pose estimate.
Is there a way to achieve this?
I too have been searching for papers on uncertainty in pose. I have not been very successful, but have found several papers that theoretically examine issues around this... difficult to apply in practice. One paper even said something to the effect "nobody is thinking about error" LOL
I just gave up on my literature search and am attempting the following approach:
rvecs, tvecs
)cv2.projectPoints
, find group center four different ways (from each pose). This gives 2D (pixel space) random error. Kind of useful - you can get an estimate of local pixel precision (mm/pixel).cv2.Rodrigues
), find group center in camera spacefour different ways - I think this should give 3DOF (translational) random error. It does give mean±std of the group center location, from std one can get SE (standard error) -> propagate error if needed to other locations.This is just random error, though. Now I'm thinking about how to include precision error... I usually fall back to "An Introduction to Error Analysis" by John R Taylor (the "Train Wreck" book)... he says
...For example, if you have to measure a clearly defined length l with a ruler graduated in millimeters, you might reasonably decide that the length could be read to the nearest millimeter but no better. Here, the uncertainty dl would be dl = 0.5mm...
Using the same (I think?) reasoning, I forgo subpixel refining and am going to begin a pixel precision estimate assuming pixel precision error is half a pixel. But surely there is someone smarter who can correct this? Donno.
I will update this as I progress...
Edit: a couple more thoughts.
cv.estimatePoseBoard
of course does this too - which I think I read gives an "improved" estimate... but it doesn't return any uncertainty info! What a loss.