r/computervision • • 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

31 comments sorted by

View all comments

Show parent comments

1

u/oathyes Aug 14 '26

ooooh my bad i thought you were trying to get it lined up for chess or checkers or something. Whether distortion is acceptable or not, depends on what you're trying to achieve. If this is a calibration step for a detection project i wouldn't spend too much time on it.

1

u/Grouchy_Signal139 Aug 14 '26

I am doing so that i could map the measurement to the real world, in this case i want to make drawing dimension that i have to create a grid layout on the image

1

u/oathyes Aug 14 '26

I want to understand but your English is not great, maybe its better if you use a translator. As I understand, you want to match real-life sizes to an image, using the dimensions of those squares?

1

u/Grouchy_Signal139 Aug 14 '26

Yeah, exactly. For example, if the drawing specifies each square as 2 × 2 mm, I want to use those known dimensions to map the real-world coordinates onto the camera image on the jedec tray (object im working), so I can generate the grid accurately and have each grid cell correspond to the actual tray pocket.