2、单目相机外参标定(camera_calibration_external)

本文详细介绍了如何进行单目相机的外部参数标定,包括从图像点获取外部参数、考虑标定板厚度的校正以及通过三个点对应关系求解相机外参。此外,还展示了如何将测量点从图像坐标转换到世界坐标,并应用测量工具进行世界坐标的标定测量。
摘要由CSDN通过智能技术生成
*外参标定即为相机坐标系和系统世界坐标系关系的旋转和平移矩阵;可以简化理解为一个3*3的矩阵
ImgPath := '3d_machine_vision/calib/'
dev_close_window ()
dev_open_window (0, 0, 652, 494, 'black', WindowHandle)
dev_update_off ()
dev_set_draw ('margin')
dev_set_line_width (1)
set_display_font (WindowHandle, 14, 'courier', 'true', 'false')
* Read the internal camera parameters from file
*读取刚刚得到的相机内参;ps:外参标定必须先标定好相机的内参
read_cam_par ('camera_parameters.dat', CamParam)
* Determine the external camera parameters and world coodinates from image points
*这个外参相机参数能通过图像来获得,如果这个标定板直接放置下测量平面上的话
* The external camera parameters can be determined from an image, where the
* calibration plate is positioned directly on the measurement plane
read_image (Image, ImgPath + 'calib_11')
dev_display (Image)
CaltabName := 'caltab_30mm.descr'
create_calib_data ('calibration_object', 1, 1, CalibDataID)
* Here, the final camera parameters are already known and can be used instead
* of the starting values used in the program 'camera_calibration_internal.hdev'
set_calib_data_cam_param (CalibDataID, 0, 'area_scan_division', CamParam)
set_calib_data_calib_object (CalibDataID, 0, CaltabName)
find_calib_object (Image, CalibDataID, 0, 0, 1, [], [])
get_calib_data_observ_contours (Caltab, CalibDataID, 'caltab', 0, 0, 1)
PoseForCalibrationPlate(这个表示这张图片中相机对应的相机外参为多少)
get_calib_data_observ_points (CalibDataID, 0, 0, 1, RCoord, CCoord, Index, PoseForCalibrationPlate)
dev_set_color ('green')
dev_display (Caltab)
dev_set_color ('red')
disp_caltab (WindowHandle, CaltabName, CamParam, PoseForCalibrationPlate, 1)
dev_set_line_width (3)
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值