camera calibration for single plane

限于喜欢 提交于 2019-12-11 23:27:15

问题


My problem statement is very simple. But I am unable to get the opencv calibration work for me. I am using the code from here : source code. I have to take images parallel to the camera at a fixed distance. I tried taking test images (about 20 of them) only parallel to the camera as well as at different planes. Also I changed the size and the no of squares.

What would be the best way to calibrate in this scenario?

The undistorted image is cropped later, that's why it looks smaller.

After going through the images closely, the pincushion distortion seems to have been corrected. But the "trapezoidal" distortion still remains. Since the camera is mounted in a closed box, the planes at which I can take images is limited.


回答1:


To simplify what Vlad already said: It is theoretically impossible to calibrate your camera with test images only parallel to the camera. You have to change your calibration board's orientation. In fact, you should have different orientation in each test image.

Check out the first two images in the link below to see how the calibration board should be slanted (or tilted): http://www.vision.caltech.edu/bouguetj/calib_doc/




回答2:


think about calibration problem as finding a projection matrix P:

image_points = P * 3d_points, where P = intrinsic * extrinsic

Now just bear with me: You basically are interested in intrinsic part but the calibration algorithm has to find both intrinsic and extrinsic. Now, each column of projection matrix can be obtained if you select a 3D point at infinity, for example xInf = [1, 0, 0, 0]. This point is at infinity because when you transform it from homogeneous coordinates to Cartesian you get [1/0, 0, 0]. If you multiply a projection matrix with a point at infinity you will get its corresponding column (1st for Xinf, 2nd for yInf, 3rd for zInf and 4th for camera center).

Thus the conclusion is simple - to get a projection matrix (that is a successful calibration) you have to clearly see points at infinity or vanishing points from the converging extensions of lines in your chessboard rig (aka end of the railroad tracks at the horizon). Your images don’t make it easy to detect vanishing points since you don’t slant your chessboard, nor rotate nor scale it by stepping back. Thus your calibration will always fail.



来源:https://stackoverflow.com/questions/20282861/camera-calibration-for-single-plane

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!