A structured light high reflection light suppression method, system, computer readable storage medium and computer program product
By employing a multi-level suppression strategy and Gray code differential verification method, the problems of black-and-white pixel imbalance and level misjudgment in Gray code decoding under high reflectivity scenarios are solved, thereby improving the integrity and robustness of 3D imaging under high reflectivity conditions. This method is suitable for structured light 3D measurement and industrial inspection.
Patent Information
- Application Number
- CN202610387054.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-02
AI Technical Summary
In highly reflective scenarios, Gray code decoding suffers from an imbalance in the ratio of black and white pixels, leading to light diffusion, photon overflow, and misjudgment of order. Existing technologies are inefficient and struggle to improve the integrity and robustness of 3D imaging.
By employing a multi-level suppression strategy and Gray code differential verification method, the accuracy of Gray code decoding is improved by reducing the gray value of Gray code encoding, correcting erroneous codewords by combining connected component analysis, and calculating the wrapping phase information using the phase shifting method. This achieves pixel-by-pixel binarization correction and spatial consistency constraints.
Without increasing the number of exposures or hardware complexity, it significantly improves the accuracy of Gray code decoding and the integrity of 3D imaging in highly reflective scenes, making it suitable for high real-time applications such as industrial online inspection.
Smart Images

Figure CN122130012A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of optical three-dimensional measurement and machine vision technology, and in particular to a method, system, computer-readable storage medium, and computer program product for suppressing high reflectivity of structured light. Background Technology
[0002] In structured light 3D measurement, the combination of phase-shifting (multi-line) and Gray code is the mainstream approach. The conventional method uses an additional projection of a pure black image plus a pure white image to calculate the mean, serving as a pixel-by-pixel binarization of the Gray code image set. The two additional projection images in the traditional method are as follows: Figure 4 As shown, and the effect after binarization is as follows. Figure 5 As shown.
[0003] However, Gray code decoding has a core flaw in highly reflective scenarios: (1) Imbalance in the ratio of black and white pixels leads to light diffusion: In multi-line coding, the ratio of white pixels to black pixels is about 1:16, which is relatively stable for high reflectivity. However, the ratio of black and white pixels in Gray code is close to 1:1.
[0004] (2) Photon overflow and order misjudgment: Due to photon scattering (diffraction), the strong light in the white high reflective area will "contaminate" the adjacent black area, causing the pixel gray value that should be black (low gray level) to rise abnormally.
[0005] (3) Consequences: This gray-scale anomaly interferes with the binarization determination of Gray code, causing errors in level calculation, which ultimately manifests as missing or incorrect depth jumps in 3D point clouds.
[0006] (4) Traditional methods are inefficient: Existing technologies mostly use multiple exposure methods, but at least three exposures are required, which is time-consuming and requires preset exposure parameters, resulting in low efficiency.
[0007] Therefore, there is an urgent need in this field for a method that can improve the accuracy and robustness of Gray code decoding in highly reflective scenes in order to improve the integrity of 3D imaging. Summary of the Invention
[0008] The purpose of this invention is to provide a method, system, computer-readable storage medium, and computer program product for suppressing high reflectivity of structured light, so as to solve or at least partially solve the technical problems mentioned in the background art.
[0009] To achieve this objective, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for suppressing high reflectivity of structured light based on a multi-level suppression strategy and Gray code differential verification, comprising: A multi-line coded structured light image is projected onto the object under test, and the corresponding imaging data is collected to obtain a multi-line coded phase-shift map with full pixel coverage. The wrapping phase information of the multi-line coded phase shift map is calculated using a phase-shifting algorithm; Construct a Gray code encoded image of the object to be tested. In the Gray code encoding stage, reduce the gray value corresponding to the white codeword in the Gray code to make it fall within the preset gray value threshold range. The Gray code image is binarized by using an inverse Gray code image that is complementary to the Gray code image to correct erroneous codewords in regions that are affected by high reflectivity and have not reached saturation. Then, the erroneous codewords in abnormal regions that are affected by high reflectivity and have reached saturation or are discretely distributed are corrected by using connected component analysis to obtain the Gray code binary result after connected component analysis correction. Based on the Gray code binary results corrected by connected component analysis, the corresponding phase order information is calculated. The unfolded absolute phase distribution map is obtained by using the wrapped phase information and the phase order information.
[0010] Optionally, the method for binarizing and correcting the Gray code-encoded image is as follows: Let G be any Gray code encoded image. For any pixel... grayscale value The corresponding inverse Gray code image at the pixel level grayscale value The binarized corrected Gray code encoded image G B At pixel The gray value at that location is ,but: ; Correcting G through connected component analysis B The method is as follows: The Gray code binary result G obtained after binarization correction B Connected region R k Set to: R k All pixels in the array have the same pixel value, and any two pixels can be connected by an 8-connected component; connect the connected component R... k Area A k Defined as: ; Based on area A k Determine R k The function for determining whether a region is a scattered erroneous codeword region is defined as follows: Where T is the preset pixel area threshold for the scattered error codeword region; right Perform inversion correction to obtain the Gray code binary result GC after connected component analysis correction. The inversion correction method is as follows: t represents the area value in the connected component analysis.
[0011] Optionally, the phase order information is calculated as follows: , ; Where V is the decimal codeword, K is the phase order, and m represents the number of Gray code images G. GC represents the known conversion relationship used to find the decimal codeword V and the order K. i For G C The i-th binary image in the dataset.
[0012] Optionally, the method for calculating the wrapping phase information is as follows: ; in, It represents the wrap-around phase, where N is the number of phase shift steps. It is the grayscale value of the phase shift fringe in the k-th frame of the multi-line coded phase shift map at pixel (x, y). This is the phase shift.
[0013] Optionally, after obtaining the unfolded absolute phase distribution map using the wrapped phase information and the phase order information, the method further includes: Based on the unfolded absolute phase distribution map, a three-dimensional reconstruction of the object under test is performed.
[0014] Optionally, the step of reducing the grayscale value corresponding to the white codeword in the Gray code to bring it within a preset grayscale threshold range is specifically implemented as follows: Reduce the grayscale value corresponding to the white codeword in Gray code to 128.
[0015] Secondly, the present invention provides a structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification, comprising: The image acquisition module is used to project a multi-line coded structured light image onto the object under test and acquire the corresponding imaging data to obtain a multi-line coded phase-shift map with full pixel coverage. The wrapping phase calculation module is electrically connected to the image acquisition module and is used to calculate the wrapping phase information of the multi-line coded phase shift map using a phase shift algorithm; The Gray code encoding module is used to construct the Gray code encoded image of the object under test. During the Gray code encoding stage, the gray values corresponding to the white code words in the Gray code are reduced to make them fall within the preset gray value threshold range. The codeword correction module is electrically connected to the Gray code encoding module. It is used to binarize the Gray code encoding image by using an inverse Gray code image that is complementary to the Gray code encoding image, to correct erroneous codewords in areas affected by high reflectivity and not yet saturated, and to correct erroneous codewords in abnormal areas affected by high reflectivity and saturated or exhibiting discrete distribution by using connected component analysis, thereby obtaining the Gray code binary result after connected component analysis correction. The phase order calculation module is electrically connected to the codeword correction module and is used to calculate the corresponding phase order information based on the corrected Gray code binary result after connected component analysis. The phase distribution output module is electrically connected to the phase order calculation module and the wrapped phase calculation module, and is used to obtain the unfolded absolute phase distribution map through the wrapped phase information and the phase order information.
[0016] Optionally, the method for binarizing and correcting the Gray code-encoded image is as follows: Let G be any Gray code encoded image. For any pixel... grayscale value The corresponding inverse Gray code image at the pixel level grayscale value The binarized corrected Gray code encoded image G B At pixel The gray value at that location is ,but: ; Correcting G through connected component analysis B The method is as follows: The Gray code binary result G obtained after binarization correction B Connected region R k Set to: R k All pixels in the array have the same pixel value, and any two pixels can be connected by an 8-connected component; connect the connected component R... k Area A k Defined as: ; Based on area A k Determine R k The function for determining whether a region is a scattered erroneous codeword region is defined as follows: Where T is the preset pixel area threshold for the scattered error codeword region; right Perform inversion correction to obtain the Gray code binary result GC after connected component analysis correction. The inversion correction method is as follows: t represents the area value in the connected component analysis.
[0017] Optionally, the phase order information is calculated as follows: , ; Where V is the decimal codeword, K is the phase order, and m represents the number of Gray code images G. GC represents the known conversion relationship used to find the decimal codeword V and the order K. i For G C The i-th binary image in the dataset.
[0018] Optionally, the method for calculating the wrapping phase information is as follows: ; in, It represents the wrap-around phase, where N is the number of phase shift steps. It is the grayscale value of the phase shift fringe in the k-th frame of the multi-line coded phase shift map at pixel (x, y). This is the phase shift.
[0019] Optionally, the structured light high reflectivity suppression system further includes a three-dimensional reconstruction module electrically connected to the phase distribution output module, the three-dimensional reconstruction module being used to perform three-dimensional reconstruction of the object under test based on the unfolded absolute phase distribution map.
[0020] Optionally, the step of reducing the grayscale value corresponding to the white codeword in the Gray code to bring it within a preset grayscale threshold range is specifically implemented as follows: Reduce the grayscale value corresponding to the white codeword in Gray code to 128.
[0021] Thirdly, the present invention provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification as described above.
[0022] Fourthly, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification as described above.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: This application proposes a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification. By combining the phase-shifting method and the Gray code encoding method, a multi-level progressive suppression strategy is proposed: at the source-end light control, the Gray code encoded gray value is reduced; at the differential logic verification, Gray code inverse encoding is introduced for pixel-by-pixel binarization correction; and at the spatial consistency constraint, saturated discrete error codewords are corrected through connected component analysis. Based on the above suppression strategy, the accuracy and robustness of Gray code decoding of the structured light system in high reflectivity scenarios are improved, thereby enhancing the integrity of 3D imaging. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 The flowchart illustrates a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification, provided in this embodiment of the invention.
[0026] Figure 2 This invention provides a wrap-around phase map calculated using a multi-line encoded line shift map with full pixel coverage.
[0027] Figure 3 It is an image encoded using a traditional primitive Gray code.
[0028] Figure 4 This is a traditional black-and-white binarized threshold image.
[0029] Figure 5 For use Figure 4 right Figure 3 Binarization yields the Gray code binary result image.
[0030] Figure 6 This invention provides a Gray code encoded image of an object to be tested, as an embodiment of the invention.
[0031] Figure 7 for Figure 6 Complementary decoded Gray code images.
[0032] Figure 8 For use Figure 7 right Figure 6 The binarized image is obtained after decoding correction.
[0033] Figure 9 To identify through connected component analysis Figure 8 The diagram illustrates the principle of erroneous codewords in the code.
[0034] Figure 10 To analyze the connected components Figure 8 The resulting Gray code binary image after correction.
[0035] Figure 11 A comparison diagram of phase order information between a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification provided in this embodiment of the invention and a traditional method.
[0036] Figure 12 The results show a 3D imaging comparison between a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification provided in this embodiment of the invention and a traditional method.
[0037] Figure 13 The results show a 3D imaging comparison between another structured light high reflectivity suppression method based on multi-level suppression strategy and Gray code differential verification provided in the embodiments of the present invention and the traditional method.
[0038] Figure 14 This is a 3D imaging comparison of a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification provided in this embodiment of the invention with traditional methods.
[0039] Figure 15 The results show a comparison of 3D imaging between a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification provided in this embodiment of the invention and a traditional method.
[0040] Figure 16 This is a diagram of a structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification, provided for an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0042] Example 1: To address the issue of order calculation errors in Gray code decoding during structured light 3D measurement under high-reflectivity scenarios due to overexposure, diffraction, and light diffusion, this embodiment proposes a structured light high-reflectivity suppression method based on a multi-level suppression strategy and differential coding verification. This method employs a structured light coding approach combining phase-shifting (multi-line) and Gray code. Multi-line coding acquires the encapsulated phase information through a phase-shifted image covering all pixels, exhibiting a significantly unbalanced black-and-white pixel ratio, with white pixels far outnumbering black pixels, thus maintaining high stability even under high-reflectivity conditions. Gray code is used for order calibration of the encapsulated phase; however, due to its close black-and-white pixel ratio, white codewords are prone to overexposure and diffraction under high-reflectivity conditions, causing grayscale contamination of adjacent black codeword areas and leading to order misjudgment.
[0043] This method constructs a multi-level progressive high reflectivity suppression technology scheme from three levels: source control of encoding, pixel-level logical discrimination, and spatial consistency constraints, so as to improve the robustness and accuracy of Gray code decoding in high reflectivity scenarios.
[0044] For details, please refer to Figure 1 , Figure 1 A flowchart of a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification is provided for embodiments of the present invention. The method includes: Step 110: Project a multi-line coded structured light image onto the object under test and collect the corresponding imaging data to obtain a multi-line coded phase-shift map with full pixel coverage.
[0045] By projecting a multi-line coded (such as sinusoidal stripes) structured light image onto the object under test and acquiring the corresponding imaging data, the wrapping phase information is calculated using a phase-shifting algorithm, providing a continuous phase basis for subsequent phase unfolding. It is understood that the phase-shifting algorithm is an existing technology, so its principle and calculation process will not be elaborated here.
[0046] Step 120: Calculate the wrapping phase information of the multi-line encoded phase shift map using the phase shift algorithm.
[0047] Specifically, the method for calculating the phase information of the package is as follows: ; in, It represents the wrap-around phase, where N is the number of phase shift steps. It is the grayscale value of the phase shift fringe in the k-th frame of the multi-line coded phase shift map at pixel (x, y). This is the phase shift.
[0048] For example, such as Figure 2 As shown, Figure 2 The package phase map is calculated from the multi-line encoded phase shift map.
[0049] Step 130: Construct a Gray code encoded image of the object to be tested. In the Gray code encoding stage, the gray values corresponding to the white code words in the Gray code are reduced to make them fall within the preset gray value threshold range. Specifically, during the Gray code encoding stage, the grayscale value corresponding to the white codeword in the Gray code is reduced to fall within a preset grayscale threshold range. For example, in this embodiment, the grayscale value corresponding to the white codeword in the Gray code is reduced to 128. Figure 6 As shown; Step 130 suppresses the overexposure of white characters under high reflectivity at the source and reduces the impact of light diffusion and diffraction on adjacent black character areas, thereby reducing the risk of misjudgment while ensuring coding contrast.
[0050] Step 141: Binarize the Gray code image by using the inverse Gray code image that is complementary to the Gray code image to correct erroneous codewords that are affected by high reflectivity and have not reached the saturation region.
[0051] This step is based on the original Gray code image (e.g., Figure 6 (as shown) and the decoded Gray code image (as shown) Figure 7 The grayscale difference relationship between the pixels (as shown) is used to perform pixel-by-pixel differential logic discrimination; when the original Gray code pixel has grayscale abnormality due to high reflectivity but has not yet reached saturation, it is compared with the corresponding inverse encoded pixel to realize the identification and correction of erroneous codewords.
[0052] Specifically, the method for binarization correction of Gray code encoded images is as follows: Let G be any Gray code encoded image. For any pixel... grayscale value The corresponding inverse Gray code image at the pixel level grayscale value The binarized corrected Gray code encoded image G B (like Figure 8 (As shown) at pixel point The gray value at that location is ,but: .
[0053] Step 142: Correct the erroneous codewords in abnormal regions that are affected by high reflectivity and have reached saturation or exhibit discrete distribution by using connected component analysis, and obtain the Gray code binary result after connected component analysis correction.
[0054] Furthermore, for abnormal codeword regions that are saturated or exhibit a discrete distribution due to high reflectivity, a connected component analysis method is introduced based on differential logic correction. Through spatial consistency constraints, non-real codeword regions are identified according to the area and distribution characteristics of connected regions, and corrective processing is performed on them to eliminate the influence of isolated noise points and local erroneous codewords.
[0055] Specifically, G is corrected through connected component analysis. B The method is as follows: The Gray code binary result G obtained after binarization correction B Connected region R k Set to: R k All pixels in the array have the same pixel value, and any two pixels can be connected by an 8-connected component; where the 8-connected component of pixel (x, y) is defined as: .
[0056] Connected component R k Area A k Defined as: ; like Figure 9 As shown, based on area A k Determine R k The function for determining whether a region is a scattered erroneous codeword region is defined as follows: Where T is the preset pixel area threshold for the scattered error codeword region; right Perform inversion correction to obtain the Gray code binary result G after connected component analysis correction. C ,like Figure 10 As shown.
[0057] The method for inversion correction is as follows: ; where t represents the area value of the connected component analysis.
[0058] Step 150: Calculate the corresponding phase order information based on the Gray code binary results after connected component analysis and correction.
[0059] Based on the Gray code binary results after the above multi-level suppression and correction processing, the corresponding phase order information is calculated to obtain accurate and stable order calibration results.
[0060] Specifically, the method for calculating phase order information is as follows: , ; Where V is the decimal codeword, K is the phase order, and m represents the number of Gray code images G. GC represents the known conversion relationship used to find the decimal codeword V and the order K. i For G C The i-th binary image in the dataset.
[0061] like Figure 11 As shown, Figure 11 In the diagram, a, b, c, and d are respectively: Figure 3 , Figure 6 , Figure 8 and Figure 10 Phase order information.
[0062] Step 160: Obtain the unfolded absolute phase distribution map by wrapping the phase information and phase order information.
[0063] This step combines the packaged phase information and phase order information to unfold the packaged phase and obtain the absolute phase distribution, thereby achieving stable 3D reconstruction in highly reflective scenes.
[0064] Step 170: Based on the unfolded absolute phase distribution map, perform three-dimensional reconstruction of the object under test.
[0065] For example, such as Figures 12-15 As shown, it illustrates the 3D imaging comparison results between this method and traditional methods; Figures 12-15 In the diagram, 'a' represents the original image of the object under test, and 'b', 'c', 'd', and 'e' represent images based on... Figure 11 The 3D image of the object under test is obtained by reconstructing the phase order information of a, b, c, and d in the image. By comparison, it can be seen that this method effectively suppresses Gray code decoding errors caused by overexposure, diffraction, and light diffusion under high reflectivity conditions without increasing the number of exposures or introducing additional optical hardware. This significantly improves the integrity, accuracy, and robustness of structured light 3D imaging in engineering applications.
[0066] In summary, this method, when applied to structured light 3D imaging, measurement, and detection in highly reflective scenarios, offers at least the following advantages compared to existing technologies: (1) By combining multi-line phase constraint with Gray code inverse coding error correction, the misjudgment of Gray code black code characters under high reflectivity conditions is effectively suppressed, and the accuracy of level calculation is improved. (2) Without increasing the number of exposures and hardware complexity, the integrity and continuity of three-dimensional imaging of highly reflective workpieces are significantly improved; (3) This method has good adaptability to workpieces with different reflectivity and is suitable for high real-time application scenarios such as industrial online inspection.
[0067] Example 2: Please refer to Figure 16 , Figure 16This invention provides an architecture diagram of a structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification. The system includes: The phase-shift map acquisition module 10 is used to project a multi-line coded structured light image onto the object under test and acquire the corresponding imaging data to obtain a multi-line coded phase-shift map with full pixel coverage. Package phase calculation module 20 and electrically connected phase shift map acquisition module 10 are used to calculate the package phase information of the multi-line coded phase shift map using a phase shift algorithm; Gray code encoding module 30 is used to construct a Gray code encoded image of the object to be tested. In the Gray code encoding stage, the gray value corresponding to the white codeword in the Gray code is reduced so that it is within the preset gray value threshold range. The codeword correction module 40 is electrically connected to the Gray code encoding module 30. It is used to binarize the Gray code image by using the inverse Gray code image that is complementary to the Gray code encoded image, to correct the erroneous codewords in the high reflectivity and unsaturated regions, and to correct the erroneous codewords in the abnormal regions that are high reflectivity and saturated or exhibit discrete distribution by using connected component analysis, so as to obtain the Gray code binary result after connected component analysis correction. The phase order calculation module 50 and the electrical connection codeword correction module 40 are used to calculate the corresponding phase order information based on the Gray code binary result after connected component analysis and correction. The phase distribution output module 60 is electrically connected to the phase order calculation module 50 and the wrapping phase calculation module 20, and is used to obtain the unfolded absolute phase distribution map through the wrapping phase information and phase order information. The 3D reconstruction module 70 and the phase distribution output module 60 are electrically connected to perform 3D reconstruction of the object under test based on the unfolded absolute phase distribution map.
[0068] Since the methods for obtaining relevant parameters and processing data have been described in detail in Embodiment 1, they will not be repeated in this embodiment.
[0069] Example 3: This embodiment also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification as described in Embodiment 1.
[0070] Since Example 1 has already described in detail the structured light high reflectivity suppression method based on multi-level suppression strategy and Gray code differential verification, it will not be repeated in this example.
[0071] Example 4: The present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification as described in Embodiment 1.
[0072] Since Example 1 has already described in detail the structured light high reflectivity suppression method based on multi-level suppression strategy and Gray code differential verification, it will not be repeated in this example.
[0073] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0074] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0075] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for suppressing high reflectivity of structured light based on a multi-level suppression strategy and Gray code differential verification, characterized in that, include: A multi-line coded structured light image is projected onto the object under test, and the corresponding imaging data is collected to obtain a multi-line coded phase-shift map with full pixel coverage. The wrapping phase information of the multi-line coded phase shift map is calculated using a phase-shifting algorithm; Construct a Gray code encoded image of the object to be tested. In the Gray code encoding stage, reduce the gray value corresponding to the white codeword in the Gray code to make it fall within the preset gray value threshold range. The Gray code image is binarized by using an inverse Gray code image that is complementary to the Gray code image to correct erroneous codewords in regions that are affected by high reflectivity and have not reached saturation. Then, the erroneous codewords in abnormal regions that are affected by high reflectivity and have reached saturation or are discretely distributed are corrected by using connected component analysis to obtain the Gray code binary result after connected component analysis correction. Based on the Gray code binary results corrected by connected component analysis, the corresponding phase order information is calculated. The unfolded absolute phase distribution map is obtained by using the wrapped phase information and the phase order information.
2. The structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification according to claim 1, characterized in that, The method for binarizing and correcting the Gray code-encoded image is as follows: Let G be any Gray code encoded image. For any pixel... grayscale value The corresponding inverse Gray code image at the pixel level grayscale value The binarized corrected Gray code encoded image G B At pixel The gray value at that location is ,but: ; Correcting G through connected component analysis B The method is as follows: The Gray code binary result obtained after binarization correction G B Connected region R k Set to: R k All pixels in the array have the same pixel value, and any two pixels can be connected by an 8-connected component; connect the connected component R... k Area A k Defined as: ; Based on area A k Determine R k The function for determining whether a region is a scattered erroneous codeword region is defined as follows: Where T is the preset pixel area threshold for the scattered error codeword region; right Perform inversion correction to obtain the Gray code binary result GC after connected component analysis correction. The inversion correction method is as follows: t represents the area value in the connected component analysis.
3. The structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification according to claim 2, characterized in that, The method for calculating phase order information is as follows: , ; Where V is the decimal codeword, K is the phase order, and m represents the number of Gray code images G. GC represents the known conversion relationship used to find the decimal codeword V and the order K. i For G C The i-th binary image in the dataset.
4. The structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification according to claim 1, characterized in that, The method for calculating the phase information of the package is as follows: ; in, It represents the wrap-around phase, where N is the number of phase shift steps. It is the grayscale value of the phase shift fringe in the k-th frame of the multi-line coded phase shift map at pixel (x, y). This is the phase shift.
5. The structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification according to claim 1, characterized in that, After obtaining the unfolded absolute phase distribution map using the wrapped phase information and the phase order information, the method further includes: Based on the unfolded absolute phase distribution map, a three-dimensional reconstruction of the object under test is performed.
6. The structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification according to claim 1, characterized in that, The process of reducing the grayscale value corresponding to the white codeword in the Gray code to bring it within a preset grayscale threshold range is specifically implemented as follows: Reduce the grayscale value corresponding to the white codeword in Gray code to 128.
7. A structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification, characterized in that, include: The phase-shift map acquisition module is used to project a multi-line coded structured light image onto the object under test and acquire the corresponding imaging data to obtain a multi-line coded phase-shift map with full pixel coverage. The wrapping phase calculation module is electrically connected to the phase shift map acquisition module and is used to calculate the wrapping phase information of the multi-line coded phase shift map using a phase shift algorithm; The Gray code encoding module is used to construct the Gray code encoded image of the object under test. During the Gray code encoding stage, the gray values corresponding to the white code words in the Gray code are reduced to make them fall within the preset gray value threshold range. The codeword correction module is electrically connected to the Gray code encoding module. It is used to binarize the Gray code encoding image by using an inverse Gray code image that is complementary to the Gray code encoding image, to correct erroneous codewords in areas affected by high reflectivity and not yet saturated, and to correct erroneous codewords in abnormal areas affected by high reflectivity and saturated or exhibiting discrete distribution by using connected component analysis, thereby obtaining the Gray code binary result after connected component analysis correction. The phase order calculation module is electrically connected to the codeword correction module and is used to calculate the corresponding phase order information based on the corrected Gray code binary result after connected component analysis. The phase distribution output module is electrically connected to the phase order calculation module and the wrapped phase calculation module, and is used to obtain the unfolded absolute phase distribution map through the wrapped phase information and the phase order information.
8. The structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification according to claim 7, characterized in that, The method for binarizing and correcting the Gray code-encoded image is as follows: Let G be any Gray code encoded image. For any pixel... grayscale value The corresponding inverse Gray code image at the pixel level grayscale value The binarized corrected Gray code encoded image G B At pixel The gray value at that location is ,but: ; Correcting G through connected component analysis B The method is as follows: The Gray code binary result G obtained after binarization correction B Connected region R k Set to: R k All pixels in the array have the same pixel value, and any two pixels can be connected by an 8-connected region; the area A of the connected region Rk is... k Defined as: ; Based on area A k Determine R k The function for determining whether a region is a scattered erroneous codeword region is defined as follows: Where T is the preset pixel area threshold for the scattered error codeword region; right Perform inversion correction to obtain the Gray code binary result G after connected component analysis correction. C The method for inversion correction is as follows: t represents the area value in the connected component analysis.
9. A structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification according to claim 8, characterized in that, The method for calculating phase order information is as follows: , ; Where V is the decimal codeword, K is the phase order, and m represents the number of Gray code images G. GC represents the known conversion relationship used to find the decimal codeword V and the order K. i For G C The i-th binary image in the dataset.
10. A structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification according to claim 7, characterized in that, The method for calculating the phase information of the package is as follows: ; in, It represents the wrap-around phase, where N is the number of phase shift steps. It is the grayscale value of the phase shift fringe in the k-th frame of the multi-line coded phase shift map at pixel (x, y). This is the phase shift.
11. A structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification according to claim 7, characterized in that, It also includes a three-dimensional reconstruction module electrically connected to the phase distribution output module, which is used to perform three-dimensional reconstruction of the object under test based on the unfolded absolute phase distribution map.
12. The structured light high reflectivity suppression system based on a multi-level suppression strategy and Gray code differential verification according to claim 7, characterized in that, The process of reducing the grayscale value corresponding to the white codeword in the Gray code to bring it within a preset grayscale threshold range is specifically implemented as follows: Reduce the grayscale value corresponding to the white codeword in Gray code to 128.
13. A computer-readable storage medium storing at least one instruction, characterized in that, The instructions are loaded and executed by the processor to implement a structured light high reflectivity suppression method based on a multi-level suppression strategy and Gray code differential verification as described in any one of claims 1-6.
14. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the structured light high reflectivity suppression method based on multi-level suppression strategy and Gray code differential verification as described in any one of claims 1-6.
