From af0a83f0b3a4c46ef2bc87ad1648831760f51fb4 Mon Sep 17 00:00:00 2001 From: LaurentBerger Date: Mon, 11 Mar 2019 16:48:10 +0100 Subject: [PATCH] Tutorial create pattern grid for calibration using gen_pattern.py --- .../camera_calibration_pattern.markdown | 33 +++++++++++++++++++ .../calib3d/table_of_content_calib3d.markdown | 8 +++++ 2 files changed, 41 insertions(+) create mode 100644 doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown diff --git a/doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown b/doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown new file mode 100644 index 0000000000..de219a60f4 --- /dev/null +++ b/doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown @@ -0,0 +1,33 @@ +Create calibration pattern {#tutorial_camera_calibration_pattern} +========================================= + +The goal of this tutorial is to learn how to create calibration pattern. + +You can find a chessboard pattern in https://github.com/opencv/opencv/blob/3.4/doc/pattern.png + +You can find a circleboard pattern in https://github.com/opencv/opencv/blob/3.4/doc/acircles_pattern.png + +Create your own pattern +--------------- + +Now, if you want to create your own pattern, you will need python to use https://github.com/opencv/opencv/blob/3.4/doc/pattern_tools/gen_pattern.py + +Example + +create a checkerboard pattern in file chessboard.svg with 9 rows, 6 columns and a square size of 20mm: + + python gen_pattern.py -o chessboard.svg --rows 9 --columns 6 --type checkerboard --square_size 20 + +create a circle board pattern in file circleboard.svg with 7 rows, 5 columns and a radius of 15mm: + + python gen_pattern.py -o circleboard.svg --rows 7 --columns 5 --type circles --square_size 15 + +create a circle board pattern in file acircleboard.svg with 7 rows, 5 columns and a square size of 10mm and less spacing between circle: + + python gen_pattern.py -o acircleboard.svg --rows 7 --columns 5 --type acircles --square_size 10 --radius_rate 2 + +If you want to change unit use -u option (mm inches, px, m) + +If you want to change page size use -w and -h options + +If you want to create a ChArUco board read tutorial Detection of ChArUco Corners in opencv_contrib tutorial(https://docs.opencv.org/3.4/df/d4a/tutorial_charuco_detection.html) \ No newline at end of file diff --git a/doc/tutorials/calib3d/table_of_content_calib3d.markdown b/doc/tutorials/calib3d/table_of_content_calib3d.markdown index 20ca778d5f..d99a4db59e 100644 --- a/doc/tutorials/calib3d/table_of_content_calib3d.markdown +++ b/doc/tutorials/calib3d/table_of_content_calib3d.markdown @@ -3,6 +3,14 @@ Camera calibration and 3D reconstruction (calib3d module) {#tutorial_table_of_co Although we get most of our images in a 2D format they do come from a 3D world. Here you will learn how to find out 3D world information from 2D images. +- @subpage tutorial_camera_calibration_pattern + + *Compatibility:* \> OpenCV 2.0 + + *Author:* Laurent Berger + + You will learn how to create some calibration pattern. + - @subpage tutorial_camera_calibration_square_chess *Compatibility:* \> OpenCV 2.0