Search

CN-121810720-B - Contour selection method, device, equipment and storage medium of line laser profiler

CN121810720BCN 121810720 BCN121810720 BCN 121810720BCN-121810720-B

Abstract

The application relates to the technical field of vision, in particular to a contour selection method, a device, equipment and a storage medium of a line laser profiler, which are used for collecting image data containing multi-row light band information by a camera, calculating energy values of each row of light band peak values, sequencing the light band peak values, dividing the image data into high and low threshold value peak value sets according to a first preset threshold value and a second preset threshold value, selecting alternative high-quality peak values from the high threshold value peak value sets according to a peak mode, calculating alternative high-quality peak value point position continuity, determining a final high-quality peak value set, and repairing the final high-quality peak value set and the high and low threshold value peak value sets to obtain a final contour point set. The application effectively solves the problem of inaccurate contour selection of the existing algorithm under complex illumination, and improves the measurement precision and reliability.

Inventors

  • YAO WENZHENG
  • GUO JIAJIA
  • HE FUQIANG

Assignees

  • 光子(深圳)精密科技有限公司

Dates

Publication Date
20260512
Application Date
20260306

Claims (10)

  1. 1. A profile selection method of a line laser profiler, the method comprising: Calculating energy values of each peak value of each row of light band information in image data which is acquired by a linear laser profiler camera and contains a plurality of rows of light band information, and sequencing the peak value of each row of light band information from large to small according to the energy values; dividing each column of ordered peaks into a high-threshold peak value set and a low-threshold peak value set according to a first preset threshold value and a second preset threshold value, wherein the high-threshold peak value set is a set with energy values higher than the first preset threshold value in each column of peak energy values, and the low-threshold peak value set is a set with energy values higher than the second preset threshold value but lower than the first preset threshold value in each column of peak energy values; selecting a corresponding peak value from the high-threshold peak value set according to a peak value mode to obtain an alternative high-quality peak value set; calculating the continuity of each point position of the alternative high-quality peak value set so as to determine a final high-quality peak value set in the alternative high-quality peak value set according to the continuity; and repairing the multi-column light band information according to the high-threshold peak value set and the low-threshold peak value set based on the final high-quality peak value set to obtain a final contour point set.
  2. 2. The line laser profiler profile selection method of claim 1, wherein the repairing the multi-column optical band information based on the final high-quality peak set and the high-threshold peak set to obtain a final profile point set comprises: Initializing a right set to be repaired and a left set to be repaired to be the image width of the image data, and setting all elements of the right set to be repaired and the left set to be repaired to be a default value of-1; Traversing each column of elements in the right to-be-repaired set and the final high-quality peak set from left to right, and setting the corresponding point in the right to-be-repaired set as the current point when encountering the current point in the final high-quality peak set as the high-quality peak point; When encountering a current point in the final high-quality peak value set as a non-high-quality peak value, taking the nearest high-quality peak value on the left side of the current non-high-quality peak value as a reference, searching a peak value point which is closest to the reference height and smaller than a third preset threshold value in a combined set of the high-threshold value peak value set and the low-threshold value peak value set to replace a corresponding point in the right to-be-repaired set, marking the repaired point as a new high-quality peak value until traversing is completed, and generating a right repair set; traversing each column of elements in the left to-be-repaired set and the final high-quality peak value set from right to left, and setting the corresponding point in the left to-be-repaired set as the current point when encountering the current point in the final high-quality peak value set as the high-quality peak value point; When encountering a current point in the final high-quality peak value set as a non-high-quality peak value, taking the nearest high-quality peak value on the right side of the current non-high-quality peak value as a reference, searching a peak value point which is closest to the reference height and smaller than the third preset threshold value in a combined set of the high-threshold value peak value set and the low-threshold value peak value set to replace a corresponding point in the left to-be-repaired set, marking the repaired point as a new high-quality peak value until traversing is completed, and generating a left repair set; and merging the right restoration set and the left restoration set to obtain the final contour point set.
  3. 3. The line laser profiler profile selection method of claim 2, wherein the merging the right repair set and the left repair set to obtain the final profile point set comprises: Acquiring a merging mode, wherein the merging mode comprises right restoration priority, left restoration priority, energy intensity priority, near priority and far priority; When right restoration is selected to be prior, taking the right restoration set as a reference, selecting the right restoration set as the final contour point set, and filling uncovered points in the right restoration set with corresponding points in the left restoration set; When the left restoration is selected to be prior, taking the left restoration set as a reference, selecting the left restoration set as the final contour point set, and filling uncovered points in the left restoration set with corresponding points in the right restoration set; When the energy intensity is selected to be prior, calculating the energy intensity value of the peak value of the corresponding point in each corresponding point in the right restoration set and the left restoration set, and selecting the point with the maximum energy intensity as the corresponding point of the final contour point set; when near priority is selected, calculating the distance between each corresponding point in the right restoration set and the left restoration set and a preset reference point, and selecting the point closest to the distance as the corresponding point of the final contour point set; When far priority is selected, calculating the distance between each corresponding point in the right repair set and the left repair set and the preset reference point, and selecting the point with the farthest distance as the corresponding point of the final contour point set.
  4. 4. A line laser profiler profile selection method as set forth in claim 3, further comprising: when it is determined that a current point cannot be repaired in both the right repair set and the left repair set, then the current point is included in the final set of contour points if and only if the current point is unimodal.
  5. 5. The line laser profiler profile selection method of claim 1, wherein the peak modes include a standard mode, a near mode, a far mode, and a single peak mode, wherein selecting a corresponding peak from the high threshold peak set according to the peak mode, obtaining an alternative high quality peak set includes: when the standard mode is selected, selecting the peak value with the maximum energy intensity in each column of high-threshold peak values as an alternative high-quality peak value, wherein the high-threshold peak value set comprises a plurality of columns of high-threshold peak values; when the near mode is selected, selecting a peak value closest to a preset reference point as an alternative high-quality peak value of each column of high-threshold peak values; When the far mode is selected, selecting a peak value farthest from the preset reference point as an alternative high-quality peak value of each column of high-threshold peak values; When a single-peak mode is selected, only the peak value which exists only in each column of high-threshold peak values is reserved as an alternative high-quality peak value, and if a plurality of peak values exist in the current column of high-threshold peak values, all the peak values are removed, wherein the current column of high-threshold peak values are any column of high-threshold peak values; And integrating the selected alternative high-quality peaks from each column of high-threshold peaks into the alternative high-quality peak set.
  6. 6. The line laser profiler profile selection method of claim 1, wherein the calculating the continuity of each point location of the candidate set of good quality peaks comprises: Selecting a plurality of adjacent continuous points by taking the target point as a center to form a local analysis window for the target point in the alternative high-quality peak value set, wherein the target point is any point in the alternative high-quality peak value set; In the local analysis window, removing two end points in the continuous points, and respectively calculating second derivatives for the rest continuous points; and calculating the continuity of the target point position according to the second derivative.
  7. 7. The line laser profiler profile selection method of claim 6, wherein the determining a final set of good peaks from the candidate set of good peaks based on the continuity comprises: Comparing the continuity of the target point position with a preset fourth threshold value; when the continuity is determined to be smaller than the preset fourth threshold value, judging the target point position as a high-quality peak point; and traversing all the points in the alternative high-quality peak value set, screening out high-quality peak value points meeting the continuity condition, and forming the final high-quality peak value set.
  8. 8. A profile selection device for a line laser profiler, the device comprising: The energy calculating and sorting module is used for calculating the energy value of each peak value of each column of light band information in the image data which is acquired by the linear laser profiler camera and contains the light band information of a plurality of columns, and sorting the peak value of each column of light band information from large to small according to the energy value; The system comprises a threshold segmentation module, a threshold segmentation module and a threshold segmentation module, wherein the threshold segmentation module is used for segmenting each column of ordered peaks into a high threshold peak set and a low threshold peak set according to a first preset threshold and a second preset threshold, the high threshold peak set is a set with energy values higher than the first preset threshold in each column of peak energy values, and the low threshold peak set is a set with energy values higher than the second preset threshold but lower than the first preset threshold in each column of peak energy values; the alternative peak value selection module is used for selecting a corresponding peak value from the high-threshold peak value set according to a peak value mode to obtain an alternative high-quality peak value set; The high-quality peak value determining module is used for calculating the continuity of each point position of the alternative high-quality peak value set so as to determine a final high-quality peak value set in the alternative high-quality peak value set according to the continuity; And the contour restoration selection module is used for restoring the multi-column optical band information according to the high-threshold peak value set and the low-threshold peak value set based on the final high-quality peak value set to obtain a final contour point set.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the line laser profiler profile selection method according to any one of claims 1 to 7 when the computer program is executed.
  10. 10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the profile selection method of a line laser profiler according to any one of claims 1 to 7.

Description

Contour selection method, device, equipment and storage medium of line laser profiler Technical Field The present application relates to the field of vision processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for selecting a line laser profiler profile. Background In many fields such as modern industrial detection, measurement and automated production, accurate acquisition of three-dimensional contour information of an object has a vital meaning. The line laser profilometer is used as a high-efficiency non-contact three-dimensional measuring device, and is widely applied to industries such as automobile manufacturing, electronic assembly, aerospace and the like by virtue of the advantages of being capable of rapidly scanning the surface of an object and acquiring high-precision profile data. The method captures reflected light by using a camera by projecting ray laser to the surface of the object, and further analyzes and obtains the outline information of the object, thereby providing key data support for quality control, dimension measurement, reverse engineering and the like of products. Currently, line laser profilers commonly employ some basic profile selection algorithms when processing multi-peak profiles to select an effective profile. These algorithms are mainly based on several simple ways of profile selection, near end (near), far end (far), standard (normal, i.e. energy maximum), etc. Specifically, near-end selection algorithms tend to select profile peaks nearer to the camera, far-end selection algorithms focus on selecting profile peaks farther from the camera, while standard selection algorithms typically select the most energy profile peak as the active profile. However, in a complex illumination environment, various stray light and secondary reflection phenomena often exist. The intense reflected light may strike the device housing, surrounding objects, and then be reflected back to the camera a second time. Such secondary reflections can create additional, unintended bright spots or bands of light beside or above/below the laser stripe in the image, resulting in a multi-peak profile. In this case, existing contour selection algorithms often fail to accurately select the desired contour. For example, the near-end selection algorithm may misselect the near-end bright spot formed by stray light or secondary reflection as an effective contour, the far-end selection algorithm may be similarly disturbed to select a non-target contour, and the standard selection algorithm may also select a wrong contour under the conditions of multiple peaks and small peak energy difference although the standard selection algorithm is based on the maximum energy. The unexpected profile selection result can seriously affect the measurement accuracy and reliability of the line laser profiler, and further adversely affect the industrial production process based on the measurement data, such as the problems of product quality reduction, production efficiency reduction and the like. Disclosure of Invention In order to overcome the defects of the prior art, the invention provides a contour selection method, a device, equipment and a storage medium of a line laser profiler, which can accurately select an expected contour under the condition of complex multi-layer light bands. A first aspect of the present application provides a profile selection method of a line laser profiler, the method comprising: Calculating energy values of each peak value of each row of light band information in image data which is acquired by a linear laser profiler camera and contains a plurality of rows of light band information, and sequencing the peak value of each row of light band information from large to small according to the energy values; dividing each column of ordered peaks into a high-threshold peak value set and a low-threshold peak value set according to a first preset threshold value and a second preset threshold value, wherein the high-threshold peak value set is a set with energy values higher than the first preset threshold value in each column of peak energy values, and the low-threshold peak value set is a set with energy values higher than the second preset threshold value but lower than the first preset threshold value in each column of peak energy values; selecting a corresponding peak value from the high-threshold peak value set according to a peak value mode to obtain an alternative high-quality peak value set; calculating the continuity of each point position of the alternative high-quality peak value set so as to determine a final high-quality peak value set in the alternative high-quality peak value set according to the continuity; and repairing the multi-column light band information according to the high-threshold peak value set and the low-threshold peak value set based on the final high-quality peak value set to obtain a final contour point set. In an optional imp