fisheye camera calibration

久未见 提交于 2019-12-11 05:42:42

问题


I am working on Fisheye camera calibration, and I'm not getting the expected result and I don't know where I'm wrong. I'm new to this camera calibration.

My Parameters from calibration

Focal Length:          fc = [ 410.7476   408.0925 ]
Principal point:       cc = [ 369.3690   299.0193 ]
Skew:             alpha_c = [ 0.8336 ] 
Fisheye Distortion:    kc = [ -0.3726   0.0931   0.0107   0.0000 ]

My code to undistort:

fisheye::estimateNewCameraMatrixForUndistortRectify(intrinsic, distCoeffs, input.size(), Matx33d::eye(), newK, 1);
fisheye::undistortImage(input, output, intrinsic, distCoeffs, newK, input.size());//Size(640,360));

This is my input image:

This is what I get as output:


回答1:


I don't think, that your Result is coming from a wrong use of the undistort functions. I think, that your Camera Matrix from the Calibration is wrong. You should try that again. And don't forget, you have to take ~20 Images with your Camera also you should make sure, that you used different viewports to take the images of the chessboard or circlegrid. After That Undistort an Image and look at the Result.

I also got sometimes bad results with the camera calibration, but after a successful calibration and a good Camera Matrix everything was fine.

Even in this Tutorial he mentions, that the calibration could give you sometimes bad results.




回答2:


It's possible to get good results in undistortion of fisheye image without using fisheye::estimateNewCameraMatrixForUndistortRectify() and fisheye::undistortImage() at all. After obtaining K (camera matrix) and D (distortion coeffs) via fisheye::calibrate(), you can put them directly to initUndistortRectifyMap(). This will produce maps for undistorted image production via cv::remap()



来源:https://stackoverflow.com/questions/41096429/fisheye-camera-calibration

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