Which chessboard for the calibration phase

OpenCV, Python and other image processing questions
Post Reply
stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Which chessboard for the calibration phase

Post by stereomaton »

I try to replicate OpenCV tutorial https://medium.com/stereopi/opencv-and- ... cb6792bbed
In the 4th step, the script says "No chessboard could be found." for each image.

I tried several chess patterns with few big cases and more small ones, but it changed nothing.
I also tried to vary distance to the camera a bit but without success neither.
I have a little light reflection on some images, but lots of them are outside of the board or inexistent.

Here are some pairs of the last test. The pattern is pretty obvious to human eyes, but seems not detected by the machine.
Image

Any idea of what can be wrong?
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Which chessboard for the calibration phase

Post by Realizator »

Stereomaton, we use 6x9 chessboard, and image for printing is uploaded in both stereopi-tutorial and stereopi-fisheye-robot repos at Github. Here is a link to the image in a last repo: https://github.com/realizator/stereopi- ... attern.png
I usually print it at A4 size.
Also you may find, that these 6x9 settings is used in our code.

As I see on your images, you use 15x10 pattern (internal corners counting). You may change settings in our code to use your board, but I'm not recommend to do it. The smaller chess size, the worse recognition quality. To avoid this I used a trick mentioned in our last article, when we do calibration at higher resolution, but use calibration results for lower resolution. This trick is implemented in stereopi-fisheye-robot repo only.

According to your pictures (without radial distortion) I can suggest, that you are using not fisheye cameras, but classic V1 or V2 cameras. So you can use code from stereopi-tutorial, and you can look at my calibration photos here: https://github.com/realizator/stereopi- ... ter/scenes

p.s. To say the true fisheye calibration should work for non-fisheye cameras too. :-) This code is more fresh and not depends on external libraries, so it is easier to play with it.
Eugene a.k.a. Realizator

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: Which chessboard for the calibration phase

Post by stereomaton »

Oops, I did not see this file.

This time I managed to capture pairs in which the script found the chessboard in half of them.
Unluckily the image was highly distorted (looked like a big barrel distortion, although I used the not-fisheye script of the tutorial) and highly cropped.
A second capture of pairs gave two thirds in which chessboard was found, but the optimizer found another (different but still) highly distorted result.
I have quite a bad luck with this process. I'll retry another day.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Which chessboard for the calibration phase

Post by Realizator »

stereomaton wrote:
Sat Aug 10, 2019 6:23 pm
Oops, I did not see this file.

This time I managed to capture pairs in which the script found the chessboard in half of them.
Unluckily the image was highly distorted (looked like a big barrel distortion, although I used the not-fisheye script of the tutorial) and highly cropped.
A second capture of pairs gave two thirds in which chessboard was found, but the optimizer found another (different but still) highly distorted result.
I have quite a bad luck with this process. I'll retry another day.
Stereomaton, if you are using non-fisheye cameras, ang got a bad undistortion results, please try to check key requirements for better calibration process. I've mentioned link to this requirements in my last fisheye-robot article (link to Stackoverflow).

If you wish, you can put all your calibration images to archive and put a link here. I will take a look and try to help you with calibration.
Eugene a.k.a. Realizator

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: Which chessboard for the calibration phase

Post by stereomaton »

Thanks. I do not have access to my stereopi for the next weeks, but I will eventually work on this subject again.

The aim was to rectify stills, so we switched to another suitable tool (hugin) that we already master enough, even if it is slower.

For the firsts batches, I read in the documentation of opencv that there must be large clearance around the chessboard, especially with dark environment. I think this is why the chessboard was not found even when I tested with the right number of squares.

In my next try, I will plan more time so that I could pay more attention to every step.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

Post Reply