halcon座標轉換(機器人座標轉換用)

#圖像座標
r:=[431, 355, 507, 53, 507]
c:=[505, 543, 316, 127, 883]
#物理座標(例如機器人座標)
r1:=[0, 2.0, -2.0, 10, -2.0]
c1:=[0, 1.0, -5.0, -10, 10]poi

row:=670
col:=789
vector_to_hom_mat2d (r, c, r1,c1 , HomMat2D)
affine_trans_point_2d (HomMat2D, row,col, Qx, Qy)   #圖像座標仿射爲物理座標(例如機器人座標)co

hom_mat2d_invert (HomMat2D, HomMat2DInvert)affine_trans_point_2d (HomMat2DInvert, Qx, Qy, Px, Py) #物理座標仿射爲圖像座標

相關文章
相關標籤/搜索