Does projectPoints() return coordinates for undistorted image?
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?
I think doc can help you.
If you give distorsion coefficients non zeros values then you have distorted points : real point in your image
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.