The invention belongs to the technical field of testing and measuring, and particularly relates to a
fastener size measuring method and
system based on a structured
contour line. The method comprises the following steps: placing a calibration block on a detection platform for
image acquisition, and taking an upper edge line of the calibration block as a
reference line; the calibration block is taken down, and the
fastener is placed on a detection platform for
image acquisition; extracting a plurality of feature points from the outer contour of the
fastener image, calculating a symmetric line for representing the symmetry axis of the fastener, and correcting the outer
contour line of the
image based on the symmetric line; according to the corrected outer
contour line, a cylindrical surface outer contour straight line and a
conical surface outer contour straight line of the fastener are determined, and two intersection points of the cylindrical surface outer contour straight line and the
conical surface outer contour straight line on the left side and the right side of the fastener are calculated respectively; determining the distance from the midpoint of the connecting line of the two intersection points to the datum line; and determining the
processing precision of the fastener according to the distance and a preset
distance threshold value. According to the invention, the
measurement precision of the dimension of the fastener is improved.