Does projectPoints() return coordinates for undistorted image?

asked 2017-06-06 01:59:03 -0500

I have calibrated the camera and trying to recognize ChArUco board. Then I'm painting custom markers on the board perimeter using coordinates returned by projectPoints(), but sometimes my markers doesn't fit visible board corners on the image.

My assumption that distortion effect could give such result, but projectPoints() receives cameraMatrix and distCoeffs, doesn't it perform undistortion automatically?

And, does it makes sense to perform undistortion of source image before detecting markers if I need to perform measurements on the image?

edit retag flag offensive close merge delete

Comments

I think doc can help you.

If you give distorsion coefficients non zeros values then you have distorted points : real point in your image

LBerger gravatar imageLBerger ( 2017-06-06 04:09:14 -0500 )edit

Thank you. My problem was that detectMarkers performed on undistorted image, but estimatePoseBoard used distortion coefficients. Now I'm performing undistortion before detectMarkers and don't use distortion coefficients for estimatePoseBoard and further calculations.

lamantine gravatar imagelamantine ( 2017-06-06 15:22:31 -0500 )edit