The invention belongs to the technical field of
machine vision, and discloses a line
structured light center line extraction method, which comprises the following steps of:
cutting an image shot by acamera, extracting features, performing preprocessing and correcting a background; selecting a segmentation threshold value, and carrying out binarization
processing on the corrected light bar image;carrying out Refinement
processing by adopting a refinement
algorithm, and carrying out closed operation on the image after refinement
processing to obtain an image containing a single-pixel light barcenter line; Selecting m pixel points from the center line of the single-pixel light bar, converting the m pixel points into corresponding image coordinates, carrying out
distortion correction on theimage coordinates, and carrying out fitting by utilizing the image coordinates subjected to
distortion correction to obtain the center line of the line
structured light. According to the method, theproblem of non-uniform image background can be solved, the background
gray level is equalized, and the segmentation precision is improved, so that the
structured light strip image with a certain pixelwidth is obtained, the extraction speed, the extraction precision and the accuracy of center line extraction are improved, and the real-time requirement of a
visual detection system is met.