For teams looking to use openCV or some other form of computer vision. calibration camera files can be a pain. Here’s a program I made to make it a bit easier to do it, so you can get right to programming.
Nice program. However, I have some comments.
You should calibrate the camera at the same resolution you will be using on the robot. Most teams (I think) use resolutions like 320x240 or 424x240.
In my experience, a lot of images do not actually work. The image might be blurred. Or maybe the chessboard is at a funny angle. Whatever the reason, findChessboardCorners() may not accurately find the set of corners, resulting in a bad calibration. I strongly recommend using a collection of images on disk and making a first pass to check that the corners are found correctly.
You are limiting it to 20 images. That is OK, but it does not hurt to get more.
you can get a little more precise results if you refine the corners with cornerSubPix(). See https://docs.opencv.org/3.1.0/dc/dbb/tutorial_py_calibration.html.
you have assumed that the chessboard squares are 1.0 inch on a side. You might want to make that explicit.
you have imported matplotlib and pyplot, but I don’t those are used at all.
If you are interested, I too wrote calibration utility. You can see it here: https://github.com/ligerbots/VisionServer/blob/master/utils/camera_calibration.py
Thanks for the feedback. The reason I don’t use a smaller resolution is in whatever program runs the actual vision software, I scale the values in the matrix based on the size of the image used for the calibration and the size of the image for vision input.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.