The invention relates to the technical field of size detection, in particular to a component size detection
system based on
machine vision, which comprises an interference area identification module, an edge repair module, a structure clustering module, a
distortion analysis module and an attitude restoration module. According to the method, the
gray level change trend of each pixel and the adjacent points in the image is obtained, the high-reflection suspected interference area is identified, the edge response cancellation
processing is executed, and linear interpolation compensation is carried out by combining the effective edge response values of the adjacent areas; after a continuous contour trend is constructed, clustering and sub-grouping division are carried out according to an included angle difference trend between contour geometric vectors, a three-axis direction response
linear array variation amplitude is extracted to construct a
distortion curvature mapping table, existence of non-equal-interval deformation is judged, reverse angle compensation is applied, and a three-axis intersection point convergence process is completed through a nonlinear optimization
algorithm; and according to the three-dimensional coordinates, calculating a geometric dimension and outputting a detection result, thereby realizing self-adaptive detection of different postures and surface interference component dimensions.