... | @@ -16,15 +16,18 @@ The chosen patterns are chessboard pattern and OpenCV3 ChAruCo pattern. |
... | @@ -16,15 +16,18 @@ The chosen patterns are chessboard pattern and OpenCV3 ChAruCo pattern. |
|
### Chessboard calibration pattern
|
|
### Chessboard calibration pattern
|
|
The black-white chessboard pattern with eight rows, seven columns and square's size approximately 35x35mm is chosen as a calibration object.
|
|
The black-white chessboard pattern with eight rows, seven columns and square's size approximately 35x35mm is chosen as a calibration object.
|
|
|
|
|
|
### Calibration pictures
|
|
#### Calibration pictures
|
|
We must take pictures with calibration object in the camera's Field of View (FoV) in many different positions to cover most of the FoV. Moreover, we must respect that the whole chessboard must be visible.
|
|
We must take pictures with calibration object in the camera's Field of View (FoV) in many different positions to cover most of the FoV. Moreover, we must respect that the whole chessboard must be visible.
|
|
|
|
|
|
### Finding chessboards
|
|
#### Finding chessboards
|
|
We use OpenCV function `findChessboarCorners(gray,(rows,column),params=None)->ret,corners` for finding the chessboard in pictures, where `corners` are chessboard's internal corners in pixel (u,v) coordinates. After the chessboard is found, the position of corners is made more precise via OpenCV `cornerSubPixel(gray,corners,winSize,zeroZone,criteria)->None`, which finds them with sub-pixel precision. You can read more about this on the page listed above.
|
|
The calibration is based on a set of pictures with the specific name (cal*.png) in a selected directory (PATH_TO_DIRECTORY/camera). You can collect the set using any camera. The pattern positions must be different in each picture in the set. Run the function `calibrate(path pictures, path out, rows, columns, chessboard)` from a package `Calibration.SimpleCalibration`. The calibration guesses the intrinsic camera parameters and distortion coefficients and saves them as YAML configuration file.
|
|
|
|
|
|
|
|
OpenCV `findChessboarCorners(gray,(rows,column),params=None)->ret,corners` is used for finding the chessboard in the picture, where `corners` are chessboard's internal corners in pixel (u,v) coordinates. After the chessboard is found, the position of corners is made more precise via OpenCV `cornerSubPixel(gray,corners,winSize,zeroZone,criteria)->None`, which finds them with a sub-pixel precision.
|
|
|
|
|
|
|
|
|
|
### ChAruCo callibration pattern
|
|
### ChAruCo callibration pattern
|
|
|
|
|
|
The calibration using ChAruCo can be initialized using `CameraCalibrationLiveCharuco`. The parameters of a board must be specified inside the script. The package `Calibration.CharucoCameraCalibration` creates the board using `generate_charuco_board(dict, rows, columns, square length, marker length)`, where dict is an OpenCV3 AruCo dictionary, the rest is a shape of board and size of squares in meters.
|
|
The calibration using ChAruCo can be initialized using `CameraCalibrationLiveCharuco`. The parameters of a board must be specified inside the script. The package `Calibration.CharucoCameraCalibration` creates the board using `generate_charuco_board(dict, rows, columns, square length, marker length)`, where dict is an OpenCV3 AruCo dictionary, the rest is a shape of a board and a size of squares in meters.
|
|
|
|
|
|
The script opens a window with an image provided by a camera. Each time script spots a calibration pattern in the image, it saves the corners of pattern and moves on to the other image. After script collects corners from at least 10 pattern positions, you can press "q" for intrinsic camera parameters and distortion coefficients. The camera parameters are saved as YAML configuration file to a predefined directory.
|
|
The script opens a window with an image provided by a camera. Each time script spots a calibration pattern in the image, it saves the corners of pattern and moves on to the other image. After script collects corners from at least 10 pattern positions, you can press "q" for intrinsic camera parameters and distortion coefficients. The camera parameters are saved as YAML configuration file to a predefined directory.
|
|
|
|
|
... | | ... | |