以这种方式解决它:
*shift pose to desired zero on ground plane…
set_origin_pose (Pose, -0.0134, 0.221343, 0.000, Pose)
grab_image (Image, AcqHandle)
*make a copy of the original pose and rotate it 90 degrees along the x axis.. New pose is with 0/0 in same location as ground pose, but perpendicular to it.
newpose := Pose
newpose[3] := newpose[3]-90
*move the vertical plane along the Y axis of the ground plane (Z axis of the vertical plane). In this case 15 cm…
set_origin_pose (newpose, -0, -0, -0.15, newpose)
*klick on the image to measure coordinates in mm relative to the zero point of the vertical plane.
while (1)
disp_message (3600, 'Measure one point: left mouse button', 'window', 12, 12, 'red', 'false')
disp_message (3600, 'Exit measure mode: right mouse button', 'window', 36, 12, 'red', 'false')
get_mbutton (3600, Row, Column, Button)
if (Button == 4)
break
endif
dev_display (Image)
dev_set_color ('green')
disp_cross (3600, Row, Column, 6, 0)
image_points_to_world_plane (CamParam, newpose, Row, Column, 1, X1, Y1)
disp_message (3600, 'X = ' + X1, 'window', 320, 400, 'red', 'false')
disp_message (3600, 'Y = ' + Y1, 'window', 340, 400, 'red', 'false')
endwhile