halcon之屌炸天的自标定(1)
本次先对halcon的自标定做个整体介绍,了解屌炸天的自标定在实际应用中的应用与实现方法,具体的编程细节将在后续的文章中介绍。
halcon提供了一种自标定的算子,它可以在不用标定板的情况下,标定出相机内参(无焦距),相对于多幅标定无法获取相机的外参。
求出了相机内参就可以进行畸变校正,因而自标定相对于多幅标定,在畸变校正方面更快捷,这样设备在现场更容易操作、维护。
在畸变校正以后我们同样可以放置一个参考物求取像素当量,构建XY世界坐标系,以用于测量、定位等应用。
-
123456789
edges_sub_pix (GrayImage,Edges,'canny',1.0,20,40)segment_contours_xld (Edges,ContoursSplit,'lines_circles',5,8,4)radial_distortion_self_calibration (ContoursSplit,SelectedContours, \640,480,0.08,42,'division', \'variable',0,CameraParam)get_domain (GrayImage,Domain)change_radial_distortion_cam_par ('fullsize',CameraParam,0,CamParamOut)change_radial_distortion_image (GrayImage,Domain,ImageRectified, \CameraParam,CamParamOut)

上述代码是一个常规的自标定流程:
1.求出拍摄物体的边缘XLD
2.使用radial_distortion_self_calibration函数,根据边缘求出相机内参
3.change_radial_distortion_cam_par 求出理想无畸变内参
4.change_radial_distortion_image 根据相机内参,对图像进行畸变校正
更多例程参考halcon example
| Calibrate the radial distortion coefficient and the center of distortion | ||
| Compare results of camera calibration and radial distortion self-calibration |
T. Thormälen, H. Broszio: “Automatic line-based estimation of radial lens distortion”; in: Integrated Computer-Aided Engineering; vol. 12; pp. 177-190; 2005.
本文介绍了HALCON中自标定的功能与应用,通过提取物体边缘的直线来求解相机的内部参数,进而进行畸变校正。文章还提供了一个自标定的基本流程,并讨论了在实际项目中如何应用。

1943

被折叠的 条评论
为什么被折叠?



