Halcon respective calculated angles Operator Summary

First, the region (Region)

Direction of the region 1) elliptic_axis () is calculated (-π / 2 <θ <= π / 2)

     The operator is through moments_region_2nd () operator, and the area centroid of the area direction graphical Geometric Moments (geometrical moment) to find. 0 is the angular direction in the horizontal direction, a direction generally refers to the region of the angle of the major axis in the horizontal direction (note: gen_ellipse and elliptic_axis not reversible operation, by elliptical area gen_ellipse obtained, then there will be errors elliptic_axis calculated, it is not particularly understanding)

2) orientation_region () direction of the region is calculated (-π <= θ <π)

    Calculated with elliptic_axis, when the tire and the maximum distance of the center of gravity point of the abscissa to the left of the center of gravity, the angle value computed + π

3) gen_rectangle2 direction calculation area (-π / 2 <θ <= π / 2)

 Second, the profile (XLD)

  1) line_orientation () calculated direction of the line (-π / 2 <θ <= π / 2)

  2) angle_ll () angle calculation line (-π <= θ <π)

  3) gen_measure_rectangle2 obtain a measurement moment, the angular range (--π <θ <= π)

  4) After the operator performs edges_sub_pix subsequent operator is related to the angle:

select_contours_xld (): 'direction' angle range of 0-π, the input value will be automatically converted between the 0-π, the following effect is the same code for two
select_contours_xld (ContoursSplit, LineContour1, 'direction', 1.45+π, 1.65+π, -0.5, 0.5)
select_contours_xld (ContoursSplit, LineContour2, 'direction', 1.45, 1.65, -0.5, 0.5)
get_contour_attrib_xld (ObjectSelected3, 'edge_direction', Attrib): 
'edge_direction' angle in the range of 0-2 * π, defined boundary direction as follows: the direction along the boundary, as a bright area on the left, right for the dark region. For example: For the vertical line, from left to right when the polarity is from dark to bright, then the corresponding angle of 270 °, or 90 ° was

  

 

Guess you like

Origin www.cnblogs.com/baiyy-daheng/p/11406939.html