Wrong distortion parameters in camera calibration
6 次查看(过去 30 天)
显示 更早的评论
Mohammad Hussein Yoosefian Nooshabadi
2021-9-27
评论: Mohammad Hussein Yoosefian Nooshabadi
2021-9-27
Hi,
Hope you are doing well. I have calibrated my Raspberry Pi V2 camera using single camera calibrator app in MATLAB. I tried to do everything as per instructions provided here. However, the distortion parameters seem to be incorrect, since when I apply these distortion parameters (i.e., try to undistort the images using
undistortImage
), the image gets cropped and surrounded by barrel-like black borders. For clarification, I have attached a sample image before and after being undistorted.
Ideas are much appreciated!
0 个评论
采纳的回答
Bjorn Gustavsson
2021-9-27
After quickly looking at the amount of distortion noticeable it seems pretty small - open the images in gimp (for example, comercial software also available) and add lines to the edge of the table on the left it is perhaps a small difference corrected for in the undistorted version, but at this resolution it is difficult to tell (you might have raw-images with higher resolution). When I try to image the difference between the grayscale version (gIm1 = double(rgb2gray(Im1))); etc) it is still difficult to tell. The undistortion is just a re-interpolation of the image as it would've been captured with an ideal plain pin-hole camera (no half-spherical beads only the pin-hole). Therefore, for pincushion-distortion images the lines-of-sight along edges of the ideal plain pinhole-cameras fall outside the field-of-view of pincushion-distorting optics, and the image intensities of the corresponding pixels are set to zero.
HTH.
3 个评论
Bjorn Gustavsson
2021-9-27
This is a "problem" only in the sense that you get some very dark pixels along the edges (for pincushion distortion) or in the corners (for barrel distortion). This is a direct consequence of an absolute lack of information about what is outside the field-of-view. In the words of Wittgenstein what we know nothing of we should not show - therefore the black. If the black parts bother you you could always crop them out, I guess. What you need to do after the "undistortion" depends on what you want to do next with the images and what is required for that, since I don't know what's next it is difficult to give you advice...
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Camera Calibration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!