-
Notifications
You must be signed in to change notification settings - Fork 0
Calibration
Calibration best practices: https://calib.io/blogs/knowledge-base/calibration-best-practices
The process of estimating the parameters of a camera is called camera calibration. It means we have all the information (parameters or coefficients) about the camera required to determine an accurate relationship between a 3D point in the real world and its corresponding 2D projection (pixel) in the image captured by that calibrated camera. Typically this means recovering two kinds of parameters.
- Internal parameters of the camera/lens system are, for example, focal length, optical center, and radial distortion coefficients of the lens.
- External parameters: This refers to the camera's orientation (rotation and translation) with respect to some world coordinate system.
- Board type
- Board size (consistent units)
- If charuco or aruco, the number of bits in the marker
- Number of markers in the OpenCV dictionary (version matters!)
- Length of the marker size
- The side length of the square
For example, my board had the following specifications:
# checkerboard / charuco / aruco
board_type = "charuco"
# number of squares in each dimension
board_size = [7, 6]
# number of bits in the markers, if aruco/charuco
board_marker_bits = 4
# number of markers in the OpenCV board dictionary, if aruco/charuco
board_marker_dict_number = 250 (```aruco.DICT_4X4_250```)
# length of marker side
board_marker_length = 0.225 # mm
# If charuco or checkerboard, square side length
board_square_side_length = 0.300 # mm
- To take the calibration videos, rotate and translate the board while making sure that the board is visible in at least three cameras (even partially).
- Try to minimize the time that the board is out of focus.
- Make sure that the lighting is good.
- There is no specific number of frames one should record. The more good observations, the better. I recorded for 1 minute at a high frame rate (~120 fps). I cropped the intervals where the board was blurry in multiple camera views.
- Processing the recordings is not recommended.
- Recording with the full ROI gives better results.
- Checkerboard patterns are distinct and easy to detect in an image. Additionally, the corners of squares on the checkerboard are ideal for localizing them because they have sharp gradients in two directions. In addition, these corners are also related to the fact that they are at the intersection of checkerboard lines. All these facts are used to robustly locate the corners of the squares in a checkerboard pattern.
- CharUco is preferred over chess boards since it is more robust to changes in brightness and sharpness.
- For the calibration board, use a board that has many squares. (6 should be okay, but not less than that)
- The board should be big enough to be detected by the camera. Using a small board is okay, but it should cover as much area as possible. Typically, the board should cover half the total area when seen front-parallel in the camera images.
- Mine is 1.8mm x 2.1 mm (the frame of the board is 2.1x2.4), although it can be increased since I started using the full ROI of cameras (which is nine times bigger).
- If checkers are too small, you might have trouble seeing the corners.
- Resolution is essential (2um) as these algorithms detect edges (should be sharp)
- The focus and position of the cameras should not change after the calibration.
- One dimension of the board should have an even number of squares, the other odd. That will help the algorithm eliminate 180-degree rotation ambiguity.
📕 Read about making a new charuco board here.
📙 Aruco basics here