The first self-calibration of halcon to be a general introduction to understand Cock fried-day self-calibration application and implementation in practical applications, specific programming details will be covered in a future article.
halcon is provided a self-calibration of the operator, which can without the use of calibration plate calibration of the internal reference camera (no focus), with respect to the plurality of calibration parameters can not be obtained outside the camera.
The internal reference can be obtained camera distortion correction, and thus self-calibration with respect to the pieces of calibration, more efficient in terms of distortion correction, easier to operate such equipment in the field, and maintenance.
After the distortion correction We can also place a reference object obtaining pixel equivalents, constructed world XY coordinate system for measurement, positioning applications.
-
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)
The code is a self-calibration routine process:
1. The imaging object edge determined XLD
2. Use radial_distortion_self_calibration function, determined in accordance with internal reference edge camera
3. change_radial_distortion_cam_par find the ideal undistorted internal reference
4. change_radial_distortion_image The internal reference camera, the image distortion correction
More routine reference 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.