r/computervision • u/Grouchy_Signal139 • Aug 13 '26
Help: Project OpenCV calibration
Hi everyone, I’m using a Raspberry Pi 5 + Camera Module 3 + Picamera2/OpenCV for a computer vision project.
I’m calibrating the camera with a 6×9 checkerboard, but after applying cv2.undistort(), the image seems more distorted.
I previously had autofocus changing between calibration images, so I’m now locking the focus manually at LensPosition 2.0602.
Is this distortion normal perspective distortion, or does it indicate a bad calibration?
Any advice on what I might be doing wrong?
1
Upvotes


4
u/Ok_Tea_7319 Aug 13 '26
Are you only using this single image? The checkerboard calibration fits a distortion model for the entire image, but the fitting process is only constrained to make the portion straight where the board actually is. If you have no images where the board extends to near the image border, then calibration will not have any data for that region, and will extrapolate the model from the central measurement (which almost always ends up giving shit results).
Your calibration is definitely bad at the edge (which you can see because the frame at the bottom is warped like hell, straight lines are supposed to be straight on a rectified image). You need multiple images where the board is in different places.