Halcon XLD contour operation, contour intersection complement

8.1 Acquiring the image data of the trajectory

 Get contour coordinates get_contour_xld     

Operator: get_contour_xld(Contour : : : Row, Col)

Example: get_contour_xld(Contours4, Row26, Col)

Contours4 (input object): input contour object

Row26 (output control parameter 1): output the row coordinates of each point of the contour

Col (output control parameter 2): the ordinate of each point of the output contour

8.2 Save and read the profile

Save contour: save the contour as a DXF file write_contour_xld_dxf

Operator: write_contour_xld_arc_info(Contours : : FileName : )

Example: write_contour_xld_arc_info(Contours4, '119')

Contours4 (input object): input contour object

119 (input control parameters): input file name

 Read Contours: Read DXF files into read_contour_xld_dxf

Operator: read_contour_xld_arc_info( : Contours : FileName : )

Example: read_contour_xld_arc_info(Contours4, '112')

Contours4 (output object): output contour object

112 (input control parameters): input file name

8.3 Set Operations of Contours

Intersection of closed contours: intersection_closed_contours_xld

算子:intersection_closed_contours_xld(Contours1, Contours2 : ContoursIntersection : : )

示例:intersection_closed_contours_xld (ContEllipse, ContEllipse1, ContoursIntersection1)

ContEllipse(input object 1): input contour object 1

ContEllipse1 (input object 2): input contour object 2

ContoursIntersection1 (output object): Output the contours of the intersecting part of two contour objects

 Difference of closed contours: difference_closed_contours_xld

算子:difference_closed_contours_xld(Contours, Sub : ContoursDifference : : )

示例:difference_closed_contours_xld (ContEllipse, ContoursIntersection1, ContoursDifference)

ContEllipse (input object 1): input larger contour object

ContoursIntersection1 (input object 2): input small contour objects

ContoursDifference (output object): output the contour object after subtraction    

Guess you like

Origin blog.csdn.net/a296026640/article/details/130463161