步骤:1°在图片中找到9点对应的图像坐标
2°输入棋盘格对应的9点实际坐标
3°使用vector_to_hom_mat2d算子得到二维仿射变换矩阵
4°验证(可有可无[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5eic3j0t-1640053658933)(C:%5CUsers%5CAdministrator%5CDesktop%5CHalcon%5C%E6%A3%8B%E7%9B%98%E6%A0%BC%5CLT%5C15_12_15.bmp#pic_center)]
)
代码如下:
1° 图片中找9点坐标代码
get_image_size (Image, Width, Height)
gen_contour_polygon_xld (L1, [200,200], [1150,1500])
get_contour_xld (L1, Row1, Col1)
gen_contour_polygon_xld (L2, [330,330], [1150,1500])
get_contour_xld (L2, Row2, Col2)
gen_contour_polygon_xld (L3, [460,460], [1150,1500])
get_contour_xld (L3, Row3, Col3)
gen_contour_polygon_xld (L4, [180,470], [1200,1200])
get_contour_xld (L4, Row4, Col4)
gen_contour_polygon_xld (L5, [180,470], [1330,1330])
get_contour_xld (L5, Row5, Col5)
gen_contour_polygon_xld (L6, [180,470], [1460,1460])
get_contour_xld (L6, Row6, Col6)
create_metrology_model (Metr