The document describes algorithms for marker detection, board detection, and camera calibration using Aruco.
For marker detection, it involves converting to grayscale, thresholding, finding contours, filtering valid markers by checking border and calculating Hamming distance, and computing the marker ID.
For board detection, it detects markers, reads intrinsic/board parameters, and calculates extrinsic parameters using solvePnP and projectPoints.
For camera calibration, it captures frames with varying distance between, detects markers/board per frame, runs calibrateCamera to update intrinsics, filters outliers, and performs final calibration.
25. Read board config
- number of markers
- info of markers (id, corner position)
Created by aruco_create_board.exe
26. Calc extrinsic parameters (1)
Parameter Description
objPoints corner positions of markers
in board config (3D)
imagePoints corner positions of
detected markers in input
image (2D)
rvec Rotation matrix
tvec Translation matrix
(1) Estimate extrinsic parameters (rvec, tvec)
27. Calc extrinsic parameters (2)
(2) Refine extrinsic parameters
- Error check with rvec, tvec.
- Exclude point pairs of which projection error is greater than ‘repj_err_thres’
- Re-calculate extrinsic parameters with the filtered pairs
Result!!
31. Overview
1. Capture some frames
a. Maintain distance(tvec) between already captured frames
2. Detect markers and board of each frame
a. Get corner points of each marker
b. cv::calibrateCamera() – with current pairs of points
c. Store current pairs of points
d. Update intrinsic parameters
3. cv::calibrateCamera()
4. Filter outliers of points
a. cv::projectPoints()
b. cv::calibrateCamera()
32. Capture frames
new_tvec
if (new_tvec – old_tvecs) > thres then
capture current frame
old_tvecs.add(new_tvec)
store object_points
store image_points
update intrinsic parameters (cv::calibrateCamera)
end if
old_tvecs
- For various point of view