This is a demo using OpenCV to calibrate camera and save params as .yaml file.
In 'pictures' folder 20 pictures of 4 x 11 circle pattern provided to calculate cameraMatrix.
Please using
roslaunchto run nodes else the pictures cannot be loaded
roslaunch camera_calibration camera_calibration.launch
rosservice call /calibrate
| Photoing Phone | Image Size |
|---|---|
| SAMSUMG NOTE 8 | 4032x1960 |
Remaining problems:
-
findCirclesGridonly works whenpyrDownexecuted three times which means images are 1/64 as big as origin(same in usingresize). -
some centers of some pictures are not accurate.
Both problems may be solved by adjusting Params of SimpleBlobDetector and TermCriteria of cornerSubPix.
For more details: Calibrate_camera_intrinsics_with_circle_pattern