相机标定
创建一个标定板,运行后会在当前目录创建一个名为board_charuco_d6.png
的图片(已经内置在Modules/object_detection/shell/board_charuco_d6.png),使用A4进行打印
./Modules/object_detection/shell/create_board_charuco.sh
运行标定程序,程序会读取相机id为0的画面,根据画面提示,按c
键添加标定图像(建议添加20张以上),然后按esc
键程序开始根据获取到图像进行相机内参计算(画面会卡住,此时正在计算),等待计算完成
./Modules/object_detection/shell/calibrate_camera_charuco_cam0.sh
将生成的文件重命名为calib_webcam_640x480.yaml
替换掉Modules/object_detection/shell/calib_webcam_640x480.yaml
中的文件
使用方式可以参考Modules/object_detection/launch/aruco_det.launch
文件对标定参数的使用
对于create_board_charuco中参数含义如下
"{w | | Number of squares in X direction }"
"{h | | Number of squares in Y direction }"
"{sl | | Square side length (in meters) }"
"{ml | | Marker side length (in meters) }"
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "
"DICT_6X6_50=8, DICT_6X6_100=9, DICT_6X6_250=10, DICT_6X6_1000=11, DICT_7X7_50=12,"
"DICT_7X7_100=13, DICT_7X7_250=14, DICT_7X7_1000=15, DICT_ARUCO_ORIGINAL = 16}"
"{@outfile |<none> | Output file with calibrated camera parameters }"
"{v | | Input from video file, if ommited, input comes from camera }"
"{ci | 0 | Camera id if input doesnt come from video (-v) }"
"{dp | | File of marker detector parameters }"
"{rs | false | Apply refind strategy }"
"{zt | false | Assume zero tangential distortion }"
"{a | | Fix aspect ratio (fx/fy) to this value }"
"{pc | false | Fix the principal point at the center }"
"{sc | false | Show detected chessboard corners after calibration }"
"{cw | | (MIPI parameter) Camera width }"
"{ch | | (MIPI parameter) Camera height }"
"{dw | | (MIPI parameter) Display width }"
"{dh | | (MIPI parameter) Display height }"
"{fr | | (MIPI parameter) Framerate }"
"{fm | | (MIPI parameter) Flip method }";