Hello,
I'm attempting to use OpenCV to correct camera lens distortion and camera rotation/translation of an image before doing further processing. The image has a scale which needs to be read, and a number of black circles for calibration purposes. See http://imgur.com/a/ruCZQ for an example image.
My current code finds the circles with the blob detector, calls CalibrateCamera() and undistort() to fix the distorted image. The result is as expected: the lens distortion has been fixed, but now I would also like to fix camera rotation and translation from the rotation and translation vectors returned by CalibrateCamera()
I assume I have to perform some operations on the camera matrix to take the rotation and translation vectors in account before calling undistort(), any hints much appreciated!
Original and corrected images: http://imgur.com/a/ruCZQ
Source code: http://paste.debian.net/332976/
↧