halcon之屌炸天的自标定(1) 您所在的位置:网站首页 相机标定菲林片怎么用 halcon之屌炸天的自标定(1)

halcon之屌炸天的自标定(1)

2024-06-26 09:53| 来源: 网络整理| 查看: 265

 

本次先对halcon的自标定做个整体介绍,了解屌炸天的自标定在实际应用中的应用与实现方法,具体的编程细节将在后续的文章中介绍。

 

halcon提供了一种自标定的算子,它可以在不用标定板的情况下,标定出相机内参(无焦距),相对于多幅标定无法获取相机的外参。

 

求出了相机内参就可以进行畸变校正,因而自标定相对于多幅标定,在畸变校正方面更快捷,这样设备在现场更容易操作、维护。

 

在畸变校正以后我们同样可以放置一个参考物求取像素当量,构建XY世界坐标系,以用于测量、定位等应用。

 

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

radial_distortion_self_calibration.hdev

 

Calibrate the radial distortion coefficient and the center of distortion

radial_distortion_comparison.hdev

 

Compare results of camera calibration and radial distortion self-calibration

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有