Wrong distortion parameters in camera calibration

조회 수: 9(최근 30일)
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!

채택된 답변

Bjorn Gustavsson
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
Mohammad Hussein Yoosefian
Mohammad Hussein Yoosefian 2021년 9월 27일
Thank you for your fast reply. Good tip. The next step is to detect Harris corners. If I use the raw undistorted image, the most powerful corners would always locate at the black border (due to high intensity difference between dark and bright pixels of the border). Therefore, I think the best measure to take is to crop the undistorted image. Appreciate your consideration!

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by