0

i am trying to do a hand-eye calibration for machine vision with halcon. this is my code: PositionGeneration (Socket, WindowHandle, TupleWithPositions)

CaptureWithZivid (Image)

select_obj (Image, ColorPhoto, 5)

dev_display (ColorPhoto)

* Saving the picture
write_image (ColorPhoto, 'png none', 0, 'Image'+I)
try
    
    tuple_number (TupleWithPositions, PoseCoordinates)
    X := PoseCoordinates[0]
    Y := PoseCoordinates[1]
    Z := PoseCoordinates[2]
    A := PoseCoordinates[3]
    B := PoseCoordinates[4]
    C := PoseCoordinates[5]

    create_pose (X, Y, Z, A, B, C, 'Rp+T', 'abg', 'point', Pose)
    
    find_calib_object (ColorPhoto, CalibDataID, 0, 0, I, 'alpha', 0.2)

    set_calib_data (CalibDataID, 'tool', I, 'tool_in_base_pose', Pose)
    set_calib_data_observ_pose (CalibDataID, 0, 0, I, Pose)
    
    get_calib_data_observ_contours (Caltab, CalibDataID, 'caltab', 0, 0, I)
    
    get_calib_data_observ_points (CalibDataID, 0, 0, I, Row, Column, Index, Pose)
    
    dev_set_color ('green')
    dev_display(Image)
    dev_display (Caltab)

What i am getting when i get to the calibrate_hand_eye: enter image description here

i am getting this error: enter image description here

how can i fix it, since i believe i've added all the poses i need.

  • Have you tried using calibration assistant? It will give you image quality estimation for each image and once you're done, you can export the code. – Vladimir Perković Aug 31 '23 at 07:13
  • @VladimirPerković yes, i've tried, but i am making a hand-eye calibration thats why i am doing it this way. I want the whole process to be automated – Viktor Petrov Aug 31 '23 at 11:07

0 Answers0