Light spot extraction method and device for lattice structured light
Through sub-region, multi-channel discrimination algorithm and median filtering technology, the contour inaccuracy and noise caused by overexposure in spot extraction are solved, and the spot center positioning accuracy and image quality are improved.
Patent Information
- Application Number
- CN202411407817.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-10
AI Technical Summary
When the existing spot extraction method processes overexposed images, the contour extraction is inaccurate, resulting in low accuracy in spot center positioning and incomplete noise removal.
Using a discriminant algorithm of region-dividing and multi-channels, the diffraction zero-order center point is determined, the image is divided into four regions, and the pixel values of different colors of the channel are selected according to different regions for median filtering and denoising, and combining the edge detection algorithm to determine the edge of the spot. and center.
It effectively removes noise, improves the integrity of contour extraction and the accuracy of the center point of the spot, maximizes the distribution characteristics of edge points, and reduces data loss.
Smart Images

Figure CN119295502A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional measurement and image processing, and in particular to a method and device for extracting a spot of dot matrix structured light. Background Art
[0002] 3D reconstruction has important applications in industrial measurement, medical diagnosis, virtual reality, autonomous driving, national defense science and technology, and other fields. Optical 3D measurement methods provide important front-end data for 3D reconstruction. The current mainstream optical 3D measurement methods include projected structured light, time-of-flight method, binocular vision, etc. Among them, the measurement using dot matrix structured light obtained by optical diffraction has the characteristics of high measurement accuracy, strong anti-interference ability, and simple structure compared with time-of-flight method and binocular vision.
[0003] Using image processing technology to extract light spots is an indispensable step in 3D reconstruction. Traditional methods of light spot extraction include threshold segmentation, edge detection, morphological processing, etc. These methods generally have good extraction effects on images with obvious brightness of feature points. However, after close-range dot matrix structured light illumination, the captured light spot image will be overexposed due to the excessive light intensity in the center of the image. Overexposure will cause a large range of high-brightness pixel points to appear in the obtained image, directly leading to blurred edges, and at the same time due to the presence of other noise points.
[0004] The above-mentioned spot extraction method has a poor effect on overexposed image processing, incomplete noise removal or inaccurate contour extraction, which directly leads to low accuracy in spot center positioning and even erroneous extraction points. Summary of the invention
[0005] The purpose of the present invention is to provide a method and device for spot extraction of dot structured light, so as to solve the problems of inaccurate contour extraction and low spot center positioning accuracy caused by overexposure in the spot extraction process in the related art. Considering that dot structured light uses monochromatic light, overexposure will cause the loss of some brightness details of the image, so that the overexposed pixels in the image will contain the strongest brightness of the three colors of R, G, and B, while other normal pixels will only contain one color information.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions: A spot extraction method for dot matrix structured light comprises: determining the diffraction zero-order center point of the collected dot matrix structured light according to the light intensity distribution characteristics of Fraunhofer diffraction, and determining three successively enlarged radius values R1, R2, and R3 based on the high-brightness pixel points caused by overexposure and the low-brightness pixel points corresponding to the high-order diffraction spots, thereby dividing the image into four areas, which are successively designated as S1, S2, S3, and S4 from the diffraction zero-order center to the outside; selecting the B channel pixel value of the image in the S1 area as the grayscale image of the area, selecting the G channel pixel value of the image in the S2 area as the grayscale image of the area, and selecting the R channel pixel value of the image in the S3 and S4 areas as the grayscale image of the area; setting a high threshold to perform median filtering on the S3 area to remove noise, and setting a low threshold to perform median filtering on the S4 area to remove noise; superimposing the four obtained grayscale images as the grayscale image of the image; performing an edge detection algorithm on the grayscale image to determine the edge of each spot; constructing a connected domain and displaying the center of the spot.
[0007] In a spot extraction method for dot-matrix structured light of the present invention, the Fraunhofer diffraction light intensity distribution is: , Among them, U (x, y) represents the light intensity corresponding to the coordinate point (x, y), k represents the wave vector, λ represents the central wavelength of the laser, z represents the light propagation length, and u (x', y') is the transmission function of the diffraction element used, which needs to be determined according to the diffraction element used for measurement.
[0008] In a spot extraction method for dot matrix structured light of the present invention, the radius value R is calculated as follows: , Where (x0, y0) is the coordinate of the center point of the diffraction zero order, and (x, y) is the coordinate of the target point.
[0009] It should be pointed out that in a spot extraction method for dot matrix structured light of the present invention, different R, G, and B channel pixel values are selected in different regions, taking a 632.8nm red light laser as an example. In the measurement of lasers of different color wavelengths, the principle followed in the selection of channels in different regions is: the S1 region containing the zero-order center of diffraction selects one of the RGB channels with a larger difference from the laser light frequency, the S2 region adjacent to S1 selects one of the RGB channels with the second largest difference from the laser frequency, and S3 and S4 select RGB channels of the same color as the laser. In this way, the optimal choice for balancing the quality and noise of the near-axis spot and off-axis spot is obtained.
[0010] In a spot extraction method for dot matrix structured light of the present invention, the high threshold and low threshold median filtering, the threshold size selection needs to be determined according to the characteristics of the image pixel size, so as to achieve better near point denoising and far point denoising effects.
[0011] In a spot extraction method for dot matrix structured light of the present invention, the edge detection includes: defining two edge templates for detecting directions of +45° and -45° as convolution kernels to perform convolution operation on the image, so as to obtain the edge of the spot.
[0012] The present invention also provides a light spot projection device for dot matrix structured light, comprising: a laser, used to generate a monochromatic light wave with high brightness and good directionality; an axicon array, which diffracts the light beam after laser irradiation to obtain periodic dot matrix structured light; a camera, used to capture the light spot of the dot matrix structured light; and a curtain, used to uniformly measure the background and receive the diffraction light spot of the dot matrix structured light.
[0013] The beneficial effects of the present invention are as follows: by using a regional and multi-channel discrimination algorithm, the problem of unclear light spots caused by strong light intensity near the zero-order center of the image diffraction generated by overexposure when the camera captures the light spot of the point structured light is solved. The stray light generated by the paraxial diffraction is removed, the distribution characteristics of the light spot near the zero-order center of the diffraction are completely extracted, and the noise of the entire image is effectively removed at the same time. The light spot distribution characteristics of the edge points are retained to the maximum extent, and data loss can be minimized while ensuring accuracy, greatly improving the integrity of contour extraction and the accuracy of the center point of the light spot. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 It is a schematic diagram of a spot extraction device for dot matrix structured light of the present invention; Figure 2 It is a schematic flow chart of a method for extracting a spot of dot-matrix structured light according to an embodiment of the present invention; Figure 3 is a schematic diagram of a low threshold processing result under a traditional binarization algorithm of an embodiment of the present invention; Figure 4 is a schematic diagram of a high threshold processing result under a traditional binarization algorithm of an embodiment of the present invention; Figure 5 is a schematic diagram of the area division after the annular multi-channel processing according to an embodiment of the present invention; Figure 6 This is a complete schematic diagram of a light spot grayscale image obtained by using a ring-shaped multi-channel algorithm according to an embodiment of the present invention; Figure 7is a schematic diagram of spot edge contour detection according to an embodiment of the present invention; Figure 8 Schematic diagram of extracting the center position of a light spot according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0017] Combine the following Figures 1 to 8 A method and device for extracting a spot of dot-matrix structured light according to the present invention are described, and a rendering obtained by a traditional processing algorithm is included as a comparison with the present invention.
[0018] (I) Using the spot extraction device of dot-matrix structured light to obtain the spot image of dot-matrix structured light The experimental optical path is Figure 1 After the setup is completed, turn on the red laser with a central wavelength of 632.8nm. After it stabilizes, use the camera to expose and capture the dot matrix structured light on the screen to obtain a dot matrix structured light spot image with a resolution of 3456*5184.
[0019] It should be pointed out that a red laser is used in this step, and theoretically the spot image only contains R channel information. However, due to overexposure and paraxial diffraction stray light effects, the paraxial part of the image contains G and B channel color information and has more noise. Figure 3 The schematic diagram of the low threshold processing result using the traditional binarization algorithm shows that the overall brightness of the near-axis part is very high, and it is impossible to perform spot edge detection and center point extraction. Figure 4 This is a schematic diagram of the high threshold processing result under the traditional binarization algorithm. It can be found that the far-axis light spot is lost under the high threshold due to the weakening of the far-axis light intensity.
[0020] 2. Determining the zero-order center of diffraction The transmission function of the diffraction element axicon array used in the embodiment of the present invention is: , Where n represents the refractive index of the axicon array, β represents the cone base angle of the axicon array, and R represents the basic radius of a single axicon.
[0021] Based on the Fraunhofer diffraction light intensity distribution formula described in the invention content, the light intensity distribution function on the curtain can be obtained:
[0022] Find the coordinates P0 (1930, 1722) of the diffraction zero-order central pixel point, and set R1 = 600, R2 = 900, and R3 = 1700.
[0023] (III) Ring-shaped multi-channel processing and median filtering for denoising According to the pixel distance formula in the invention content, the distance d between other pixel points and the diffraction zero-order central pixel point P0 can be obtained. When d < R1, it is a pixel point in region S1; when R1 < d < R2, it is a pixel point in region S2; when R2 < d < R3, it is a pixel point in region S3; when R3 < d, it is a pixel point in region S4. Extract S1 of the B channel of the light spot map, S2 of the G channel of the light spot map, S3 of the R channel of the light spot map, and S4.
[0024] (IV) Median filtering for denoising and image fusion Set a 7*7 convolution kernel and a 180-pixel threshold to perform median filtering for denoising on S3, set a 7*7 convolution kernel and a 90-pixel threshold to perform median filtering for denoising on S4, and perform image fusion on the four obtained ring-shaped S regions. As Figure 5 shows a schematic diagram of the area division after ring-shaped multi-channel processing, Figure 6 is a schematic diagram of the complete light spot grayscale image obtained using the ring-shaped multi-channel algorithm.
[0025] (V) Edge detection Set edge templates for detecting the positive 45° direction and the negative 45° direction, perform two-dimensional image filtering processing to obtain the edge contour of the light spot, as Figure 7 shown in the schematic diagram of the light spot edge contour detection.
[0026] (VI) Construct connected regions and extract and display the light spot center After labeling the connected regions, use the existing method to measure the center of the connected region and extract the light spot center coordinates, as Figure 8 shown in the schematic diagram of extracting the light spot center position (only the coordinates of some light spots are shown).
[0027] The above are only the specific implementation manners of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for extracting spots of dot-matrix structured light, comprising the following steps: The zero-order diffraction center point of the collected dot structured light is determined according to the light intensity distribution characteristics of Fraunhofer diffraction, and three successively enlarged radius values R1, R2, and R3 are determined based on the high-brightness pixel points caused by overexposure and the low-brightness pixel points corresponding to the high-order diffraction spots, so that the image is divided into four areas, which are successively designated as S1, S2, S3, and S4 from the zero-order diffraction center to the outside; in the S1 area, the B channel pixel value of the image is selected as the grayscale image of the area, in the S2 area, the G channel pixel value of the image is selected as the grayscale image of the area, and in the S3 and S4 areas, the R channel pixel value of the image is selected as the grayscale image of the area; A high threshold is set to perform median filtering on the S3 area to remove noise, and a low threshold is set to perform median filtering on the S4 area to remove noise; the four obtained grayscale images are superimposed as the grayscale image of the image; an edge detection algorithm is performed on the grayscale image to determine the edge of each light spot; Construct a connected domain and display the center of the light spot; A light spot projection device for dot-matrix structured light comprises: a laser for generating monochromatic light with high brightness and good directivity; an axicon array for diffracting a light beam after laser irradiation to obtain periodic dot-matrix structured light; a camera for capturing the light spot of the dot-matrix structured light; and a curtain for uniformly measuring the background and receiving the diffraction light spot of the dot-matrix structured light.
2. A method and device for spot extraction according to claim 1, characterized in that: The Fraunhofer diffraction light intensity distribution is: , Among them, U (x, y) represents the light intensity corresponding to the coordinate point (x, y), k represents the wave vector, λ represents the central wavelength of the laser, z represents the light propagation length, and t (x', y') is the transmission function of the diffraction element used, which needs to be determined according to the diffraction element used for measurement.
3. A method and device for spot extraction according to claim 1, characterized in that: The radius value R is calculated by: , Where (x0, y0) is the coordinate of the center point of the diffraction zero order, and (x, y) is the coordinate of the target point.
4. According to the method and device for spot extraction described in claim 1, it is characterized in that: The high threshold and low threshold median filtering described above, the threshold size selection needs to be determined according to the characteristics of the image pixel size, so as to achieve better near point denoising and far point denoising effects.
5. The method and device for spot extraction according to claim 1, characterized in that: The edge detection includes: defining two edge templates for detecting directions of +45° and -45° as convolution kernels to perform convolution operation on the image, so as to obtain the edge of the light spot.
Citation Information
Patent Citations
Light spot extraction and light spot mass center determination method
CN107784669A
Edge extraction-based light spot identification method and system
CN115131576A
Optical transceiver beacon light spot center positioning method, storage medium and electronic equipment
CN115393440A
System and method for generating and detecting central rotational symmetric array structured light field
CN118409437A