A binocular structured light measurement method and system based on full polarization coding
Through the fully polarization-encoded binocular structured light measurement method, polarization fringes and Gray code information are used for phase expansion, which solves the problems of low measurement efficiency and low accuracy in the traditional binocular structured light measurement method, and achieves efficient and stable three-dimensional measurement.
Patent Information
- Application Number
- CN202411046617.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-08-01
AI Technical Summary
The traditional binocular structured light measurement method is limited by the number of projected fringes and the reflection characteristics of the surface of the object being measured, resulting in low measurement efficiency and low accuracy.
Using a fully polarization-encoded binocular structured light measurement method, by projecting and photographing fully polarized fringes, the phase shift information and Gray code information are calculated and binarized, and the phase shift fringe pattern and complementary Gray code diagram are used for phase expansion to achieve 3D measurement.
The number of projected fringes is greatly reduced, the search range of phase matching is narrowed, the measurement efficiency and accuracy are improved, and three-dimensional measurements can be performed more stably.
Smart Images

Figure CN118640829B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of three-dimensional measurement technology, and in particular to a binocular structured light measurement method based on full polarization coding and a system thereof. Background Art
[0002] Compared with stereo vision, binocular structured light measurement method calculates depth information by matching the absolute phase of fringes, so it has lower requirements on the surface features of the object being measured, avoiding the matching ambiguity problem that may occur in stereo vision in complex scenes, so that it can calculate depth data more accurately and has a wider range of applications. Compared with monocular structured light, binocular structured light measurement technology does not need to consider the current academic difficulties of projector calibration, can complete calibration quickly, has higher calibration efficiency, and adapts to more measurement scenarios. The traditional binocular structured light measurement method faces the problem of low measurement efficiency. The number of projected fringes and the phase matching algorithm are the main reasons affecting the measurement efficiency. Therefore, a fully polarized binocular structured light measurement method is proposed to achieve efficient and stable phase matching. Summary of the invention
[0003] The present disclosure proposes a binocular structured light measurement method based on full polarization encoding to solve the following problems: Due to the limitations and influence of conditions such as the number of projected fringes and the reflective characteristics of the surface of the object being measured, the traditional binocular structured light measurement method faces the problems of low measurement efficiency and low measurement accuracy.
[0004] According to one aspect of the present disclosure, a binocular structured light measurement method based on full polarization coding is provided, comprising:
[0005] S10, obtaining completely polarized fringes on the object under test; wherein the completely polarized fringes are obtained by projecting completely polarized coded fringes onto the object under test by a projector and photographing them by two polarization cameras;
[0006] S20, calculating the phase shift information and Gray code information embedded in the complete polarization stripes, and binarizing the Gray code information to obtain a phase shift stripe image and a binary complementary Gray code image;
[0007] S30, performing phase unwrapping using the calculated phase-shift fringe pattern and the binarized complementary Gray code pattern to complete three-dimensional measurement.
[0008] Preferably, the fully polarization coded stripes are generated by superposition of two groups of different polarization stripes, and the two groups of different polarization stripes are respectively expressed as:
[0009] ,
[0010] ,
[0011] In the formula, n represents the nth polarization fringe to be superimposed, , represents the horizontal polarization vector at a point, represents the vertical polarization vector at a point, A (x,y) is the background intensity, is the fringe intensity, is the contrast of the stripes, ϕ (x,y) is the phase value.
[0012] Preferably, the phase shift information embedded in the fully polarized fringes is , The Stokes parameters of the two polarization fringes are obtained by complementary splicing to obtain the phase-shifted fringe pattern, specifically: The traditional complementary Gray coding white stripe area stripes are retained, and The black stripe area stripes of the traditional complementary Gray coding are retained for splicing.
[0013] Preferably, the Gray code information embedded in the fully polarized stripes is calculated as follows:
[0014] ,
[0015] In the formula, is the calculated phase shift information, is the Gray code information embedded in the fully polarized stripes, This is the fringe pattern taken by the camera when the polarizer in front of the camera is 0 degrees. This is the fringe pattern captured by the camera when the polarizer in front of the camera is 90 degrees.
[0016] Preferably, the Gray code information is binarized and expressed as:
[0017] ,
[0018] In the formula, It is a binary complementary Gray code.
[0019] Preferably, the phase unwrapping using the calculated phase shift fringe pattern and the binarized complementary Gray code pattern includes obtaining the absolute value of the difference between the absolute phase values in the left and right windows for stereo matching, which is expressed as:
[0020] ,
[0021] In the formula, is the sum of absolute differences, is the absolute phase value of the left view, is the absolute phase value of the right view, d is the disparity value, DTo match the window, i , j Respectively represent traversing each pixel in the matching area.
[0022] Preferably, the phase unwrapping is performed using the calculated phase-shift fringe pattern and the binary complementary Gray code pattern, which is expressed as:
[0023] ,
[0024] In the formula, is the absolute phase, and is the stripe order.
[0025] According to one aspect of the present disclosure, a binocular structured light measurement system based on full polarization coding is provided, comprising:
[0026] A fully polarized fringe acquisition module is used to acquire fully polarized fringe on the object under test; wherein, the fully polarized fringe is obtained by projecting fully polarized coded fringe onto the object under test by a projector and photographed by two polarization cameras;
[0027] A phase shift information and Gray code information calculation module calculates the phase shift information and Gray code information embedded in the fully polarized stripes, and performs binarization processing on the Gray code information to obtain a phase shift stripe diagram and a binarized complementary Gray code diagram;
[0028] The phase unwrapping module uses the calculated phase-shift fringe pattern and the binary complementary Gray code pattern to perform phase unwrapping and complete three-dimensional measurement.
[0029] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the above-mentioned binocular structured light measurement method based on complete polarization encoding.
[0030] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned binocular structured light measurement method based on complete polarization encoding is implemented.
[0031] Compared with the prior art, the beneficial effects of the present disclosure are:
[0032] 1) This paper proposes a new projection stripe, which extracts the Stokes vector information in the stripe to generate a polarization Gray code pattern, thereby greatly reducing the number of stripe projections.
[0033] 2) The present disclosure proposes a stereo matching strategy with epipolar lines and complementary Gray code constraints as constraints, which can further narrow the search range of corresponding points and achieve stable phase unfolding without projecting additional Gray code stripes.
[0034] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0035] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0037] Figure 1 The flow chart of the binocular structured light measurement method based on full polarization encoding is shown;
[0038] Figure 2 The flow chart of polarization fringe generation is shown;
[0039] Figure 3 The fringe calculation flow chart of the fully polarization-encoded binocular structured light measurement method is shown;
[0040] Figure 4 A schematic diagram of the stereo matching principle is shown;
[0041] Figure 5 A schematic diagram showing the measurement of a complex-shaped metal object is shown;
[0042] Figure 6 The block diagram of the binocular structured light measurement system based on full polarization encoding is shown. DETAILED DESCRIPTION
[0043] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0044] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0045] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0046] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0047] It can be understood that the above-mentioned binocular structured light measurement method and system embodiments based on full polarization encoding mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not go into details.
[0048] Limited and affected by the number of projected fringes and the reflective characteristics of the surface of the object being measured, the traditional binocular structured light measurement method faces problems such as low measurement efficiency and low measurement accuracy. In order to solve these problems, a binocular structured light measurement method based on full polarization encoding is proposed to achieve efficient and stable phase matching.
[0049] Based on the above idea, the present invention proposes a binocular structured light measurement method based on complete polarization coding. Figure 1 A flow chart of a method for measuring binocular structured light based on full polarization coding is shown. The method comprises:
[0050] S10, obtaining completely polarized fringes on the object under test; wherein the completely polarized fringes are obtained by projecting completely polarized coded fringes onto the object under test by a projector and photographing them by two polarization cameras;
[0051] S20, calculating the phase shift information and Gray code information embedded in the complete polarization stripes, and binarizing the Gray code information to obtain a phase shift stripe image and a binary complementary Gray code image;
[0052] S30, performing phase unwrapping using the calculated phase-shift fringe pattern and the binarized complementary Gray code pattern to complete three-dimensional measurement.
[0053] The specific steps of the binocular structured light measurement method based on full polarization encoding are as follows:
[0054] S10, obtaining completely polarized fringes on the object under test; wherein the completely polarized fringes are completely polarized coded fringes projected by a projector onto the object under test and photographed by two polarization cameras.
[0055] In the embodiment of the present disclosure and other possible embodiments, the equipment, including the polarization camera and the 3LCD projector, is first installed. The projector and the polarization camera are both placed nearly horizontally, and the camera is calibrated using the MATLAB dual-target calibration toolbox. The distance between the measured object and the measurement system is about 0.6m.
[0056] In this embodiment, the Stokes vector is composed of four Stokes parameters: , , , The Stokes vector is composed of the average values of the light intensity.
[0057] ,
[0058] In the formula, represents the total intensity of the incident light, Indicates whether the light is closer to horizontal polarization or vertical polarization. , , , Respectively represent the light intensity after the light passes through the 0, 45, 90, and 135 degree polarizer. , They represent right-handed circularly polarized light and left-handed circularly polarized light respectively.
[0059] Furthermore, the full polarization encoding method changes the Stokes vector of the grayscale fringe The purple and green stripes record two different ranges of The polarization stripes of two colors correspond to two polarization states. With the inherent modulation characteristics of the 3LCD projector, polarized light in pixels can be stably projected onto the surface of an object. The purple light projected by the projector is 90-degree vertical linear polarized light, and the green light projected is 0-degree horizontal linear polarized light, so that the polarization state of the projector projected stripes can be intuitively observed and distinguished by color. The fully polarized coded stripes are generated by superimposing two groups of different polarized stripes, and the two groups of different polarized stripes are respectively represented as:
[0060] ,
[0061] ,
[0062] In the formula, n represents the nth polarization fringe to be superimposed, , represents the horizontal polarization vector at a point, represents the vertical polarization vector at a point, A (x,y) is the background intensity, is the fringe intensity, is the contrast of the stripes, ϕ (x,y) is the phase value.
[0063] A new set of PMPS fringes can be obtained by superimposing parts of the two sets of polarization fringe patterns. The white stripe portion of the complementary Gray code is The fusion can obtain a set of multi-polarization coded stripes. Compared with the traditional polarization coded structured light pattern, the light intensity of the multi-polarization coding method is not uniform, so it has more information.
[0064] In the embodiment of the present disclosure, by changing the grayscale stripe Stokes vector The purple and green stripes record two different ranges of The two colors of polarization stripes correspond to two polarization states. After calculating the two sets of polarization stripes, we can get the complete phase-shifted stripes and the binary polarization Gray code stripes, thus reducing the projected stripes by half.
[0065] S20, calculating the phase shift information and Gray code information embedded in the complete polarization stripes, and binarizing the Gray code information to obtain a phase shift stripe image and a binary complementary Gray code image.
[0066] In the embodiments of the present disclosure and other possible embodiments, the fully polarized phase-shifted fringes can be described by the vector addition of Stokes parameters. By combining two polarized fringe patterns, the Stokes parameters of the fully polarized phase-shifted fringes can carry additional polarized Gray code information. The phase shift information embedded in the fully polarized fringes is represented by , The Stokes parameters of the two polarization fringes can generate five completely polarized phase-shifted fringe images by complementary splicing. Specifically: The traditional complementary Gray coding white stripe area stripes are retained, and The black stripe area stripes of the traditional complementary Gray code are retained for splicing, such as Figure 2 shown.
[0067] The Gray code information embedded in the fully polarized stripes is calculated as follows:
[0068] ,
[0069] In the formula, is the calculated phase shift information, is the Gray code information embedded in the fully polarized stripes, This is the fringe pattern taken by the camera when the polarizer in front of the camera is 0 degrees. This is a fringe pattern taken by the camera when the polarizer in front of the camera is 90 degrees. The polarization camera can record the polarization patterns of 0 degrees and 90 degrees at the same time after a single exposure, so a single exposure can be used to obtain a fringe pattern. and one , that is, after calculation, one phase-shifted fringe and one Gray code fringe to be processed can be obtained after one exposure.
[0070] Gray code stripes at this time It is not an ideal Gray code stripe, so it needs to be binarized. The specific binarization process is expressed as:
[0071] ,
[0072] In the formula, It is a binary complementary Gray code. After the binary processing, five partial complementary Gray code images can be obtained. , and then combine the five fringe images The absolute phase can be solved for binocular stereo matching. The fringe calculation flow chart of the fully polarization-encoded binocular structured light measurement method is as follows: Figure 3 shown.
[0073] In the fringe encoding strategy, the gray value of the fringe is used to calculate the phase information, and the original fringe is adjusted. The range embeds the polarization Gray code information into the stripes. In the area where the original Gray code value is 0, the Gray code to be processed The value range of is [-1, 0]; in the area where the original Gray code value is 1, The value range of is [0, 1]. After processing, a set of binary Gray code stripes can be obtained, so there is no need for complex algorithms. After binarization, a stable Gray code fringe pattern can be obtained. In the phase matching algorithm, the phase shift order information hidden in the polarization fringe is used to further narrow the search area from the polar line to the polar line segment, thereby speeding up the matching speed and improving the matching accuracy without the need for other algorithms.
[0074] S30, performing phase unwrapping using the calculated phase-shift fringe pattern and the binarized complementary Gray code pattern to complete three-dimensional measurement.
[0075] In the embodiments of the present disclosure and other possible embodiments, the SAD (Sum of Absolute Difference) matching algorithm based on the sum of absolute differences has the advantages of small computational complexity and high speed. Stereo matching of absolute phase has the advantages of good noise resistance, strong robustness, and the ability to handle scenes with a large field of view compared to traditional stereo matching. It can make up for the disadvantages of the SAD matching algorithm and have a faster matching speed while maintaining excellent accuracy. The core of the SAD algorithm is to calculate the sum of the absolute values of the numerical differences of two areas in two images, and judge the similarity of the two matching primitives based on this. The calculation process is as follows:
[0076] The absolute value of the difference between the absolute phase values in the left and right windows is obtained for stereo matching, which is expressed as:
[0077] ,
[0078] In the formula, is the sum of absolute differences, is the absolute phase value of the left view, is the absolute phase value of the right view, d is the disparity value, D To match the window, i , j Respectively represent each pixel in the traversal matching area. By statistically analyzing the absolute phase values in the two matching windows, the absolute value of the difference between the absolute phase values in the left and right windows is obtained. When the calculated SAD is the smallest, it is identified as the best matching window.
[0079] Furthermore, the phase unwrapping is performed using the calculated phase shift fringe pattern and the binary complementary Gray code pattern, which is expressed as:
[0080] ,
[0081] In the formula, is the absolute phase, and is the stripe order.
[0082] In this embodiment, stereo matching is performed after obtaining the absolute phase; after epipolar correction, the search range is reduced from the entire absolute phase map to a single line of the absolute phase map. When unfolding the wrapped phase, each group of pixel areas has a unique phase shift order, and the phase shift order and the epipolar line can form a horizontal and vertical bidirectional constraint. For the convenience of representation, the two parts of the stripe order area are represented by and Name, take the stripe order and The stable middle part can divide the absolute phase into 32 regions, thus avoiding the problem of instability at the edge of the fringe order and ensuring that the pixels at the boundary can be accurately matched during the search. Figure 4 shown.
[0083] Furthermore, the point cloud is calculated using the matching results and calibration data to complete the three-dimensional reconstruction.
[0084] In order to verify the ability of the present invention to measure complex metal objects, this experiment performed 3D reconstruction of the P38 rail. Figure 5 shown. Figure 5 (a) is P38 rail. Figure 5 (b) is the reconstruction result of the disclosed method, Figure 5 (c) is the reconstruction result of the traditional method. Figure 5 (d) is a partial enlarged view of the reconstruction result of the disclosed method. Figure 5 (e) is a partial enlarged image of the reconstruction result of the traditional method. Since the object under test has a deep slope and uneven surface reflection, dark rust is more difficult to be modulated by stripes than light-colored objects, making the highly reflective part more difficult to measure.
[0085] The experimental results demonstrate the effectiveness of the method, indicating that the fully polarization-encoded binocular structured light measurement method designed in the embodiment of the present disclosure can more completely reconstruct metal objects with complex shapes.
[0086] It can be proved from the above that the binocular structured light measurement method based on full polarization coding designed in the embodiment of the present disclosure has strong applicability, and only simple calculations are required to extract stable phase-shifted fringes and Gray code fringes. In addition, in terms of matching strategy, polarization Gray code information can assist phase matching, so that the area to be matched can be limited to a very small range without other complex algorithms or projection of additional fringe patterns, thereby greatly reducing the amount of calculation for stereo matching.
[0087] As another aspect of the embodiment of the present disclosure, a binocular structured light measurement system 100 based on full polarization coding is also provided. Figure 6 As shown, including:
[0088] A fully polarized stripe acquisition module 1 is used to acquire fully polarized stripes on the object under test; wherein the fully polarized stripes are obtained by projecting fully polarized coded stripes onto the object under test by a projector and photographed by two polarization cameras;
[0089] Phase shift information and Gray code information calculation module 2 calculates the phase shift information and Gray code information embedded in the fully polarized stripes, and performs binarization processing on the Gray code information to obtain a phase shift stripe diagram and a binarized complementary Gray code diagram;
[0090] The phase unwrapping module 3 performs phase unwrapping using the calculated phase shift fringe pattern and the binary complementary Gray code pattern to complete the three-dimensional measurement.
[0091] Based on the description of the above embodiments, it can be seen that the embodiments of the present disclosure can achieve the following technical effects:
[0092] 1) This paper proposes a new projection stripe, which extracts the Stokes vector information in the stripe to generate a polarization Gray code pattern, thereby greatly reducing the number of stripe projections.
[0093] 2) The present disclosure proposes a stereo matching strategy with epipolar lines and complementary Gray code constraints as constraints, which can further narrow the search range of corresponding points and achieve stable phase unfolding without projecting additional Gray code stripes.
[0094] The present disclosure also provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above-mentioned binocular structured light measurement method based on complete polarization encoding. The electronic device can be provided as a terminal, a server, or other forms of equipment.
[0095] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned binocular structured light measurement method based on full polarization encoding is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0096] Those skilled in the art can understand that in the above-mentioned binocular structured light measurement method and system based on full polarization encoding in the specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0097] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0098] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A binocular structured light measurement method based on full polarization coding, characterized in that: The steps include: S10, obtaining completely polarized fringes on the object under test; wherein the completely polarized fringes are obtained by projecting completely polarized coded fringes onto the object under test by a projector and photographing them by two polarization cameras; S20, calculating the phase shift information and Gray code information embedded in the complete polarization stripes, and binarizing the Gray code information to obtain a phase shift stripe image and a binary complementary Gray code image; S30, performing phase unwrapping using the calculated phase-shift fringe pattern and the binary complementary Gray code pattern to complete three-dimensional measurement; The fully polarization-coded stripes are generated by superposition of two groups of different polarization stripes, and the two groups of different polarization stripes are respectively expressed as: , , In the formula, n represents the nth polarization fringe to be superimposed, , represents the horizontal polarization vector at a point, represents the vertical polarization vector at a point, A (x,y) is the background intensity, is the fringe intensity, is the contrast of the stripes, ϕ (x,y) is the phase value; The phase shift information embedded in the fully polarized fringes is given by , The Stokes parameters of the two polarization fringes are obtained by complementary splicing to obtain the phase-shifted fringe pattern, specifically: The traditional complementary Gray coding white stripe area stripes are retained, and The black stripe area stripes of the traditional complementary Gray code are retained for splicing; The Gray code information embedded in the fully polarized stripes is calculated as follows: , In the formula, is the calculated phase shift information, is the Gray code information embedded in the fully polarized stripes, This is the fringe pattern taken by the camera when the polarizer in front of the camera is 0 degrees. This is the fringe pattern taken by the camera when the polarizer in front of the camera is at 90 degrees; The Gray code information is binarized and expressed as: , In the formula, It is a binary complementary Gray code; The phase unwrapping using the calculated phase shift fringe pattern and the binary complementary Gray code pattern includes obtaining the absolute value of the difference between the absolute phase values in the left and right windows for stereo matching, which is expressed as: , In the formula, is the sum of absolute differences, is the absolute phase value of the left view, is the absolute phase value of the right view, d is the disparity value, D To match the window, i , j Respectively represent traversing each pixel in the matching area.
2. The method according to claim 1, characterized in that The phase unwrapping is performed using the calculated phase shift fringe image and the binary complementary Gray code image, which is expressed as: , In the formula, is the absolute phase, and is the stripe order.
3. Based on the fully polarization-encoded binocular structured light measurement system, it is characterized by: include: A fully polarized fringe acquisition module is used to acquire fully polarized fringe on the object under test; wherein, the fully polarized fringe is obtained by projecting fully polarized coded fringe onto the object under test by a projector and photographed by two polarization cameras; A phase shift information and Gray code information calculation module calculates the phase shift information and Gray code information embedded in the fully polarized stripes, and performs binarization processing on the Gray code information to obtain a phase shift stripe diagram and a binarized complementary Gray code diagram; Phase unwrapping module, which uses the calculated phase-shift fringe pattern and the binary complementary Gray code pattern to perform phase unwrapping and complete three-dimensional measurement; The fully polarization-coded stripes are generated by superposition of two groups of different polarization stripes, and the two groups of different polarization stripes are respectively expressed as: , , In the formula, n represents the nth polarization fringe to be superimposed, , represents the horizontal polarization vector at a point, represents the vertical polarization vector at a point, A (x,y) is the background intensity, is the fringe intensity, is the contrast of the stripes, ϕ (x,y) is the phase value; The phase shift information embedded in the fully polarized fringes is given by , The Stokes parameters of the two polarization fringes are obtained by complementary splicing to obtain the phase-shifted fringe pattern, specifically: The traditional complementary Gray coding white stripe area stripes are retained, and The black stripe area stripes of the traditional complementary Gray code are retained for splicing; The Gray code information embedded in the fully polarized stripes is calculated as follows: , In the formula, is the calculated phase shift information, is the Gray code information embedded in the fully polarized stripes, This is the fringe pattern taken by the camera when the polarizer in front of the camera is 0 degrees. This is the fringe pattern taken by the camera when the polarizer in front of the camera is at 90 degrees; The Gray code information is binarized and expressed as: , In the formula, It is a binary complementary Gray code; The phase unwrapping using the calculated phase shift fringe pattern and the binary complementary Gray code pattern includes obtaining the absolute value of the difference between the absolute phase values in the left and right windows for stereo matching, which is expressed as: , In the formula, is the sum of absolute differences, is the absolute phase value of the left view, is the absolute phase value of the right view, d is the disparity value, D To match the window, i , j Respectively represent traversing each pixel in the matching area.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the binocular structured light measurement method based on complete polarization encoding is implemented as described in any one of claims 1 to 2.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the binocular structured light measurement method based on complete polarization encoding according to any one of claims 1 to 2 is implemented.
