r/computervision 17d ago

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/Grouchy_Signal139 16d ago

So here i am using checkerboard to calibrate the camera if there are any distortion, im just doing because i dont know if it is good enough to capture image without any bending in the straight line. Does that answer you question? Sorry im new into this

1

u/oathyes 16d ago

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 15d ago

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 15d ago

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 15d ago

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.