Polarization sinusoidal fringe pattern correction method, structured light three-dimensional reconstruction method and system
By fitting the gamma value of the LCD projector, the polarization sinusoidal stripe pattern is corrected and three-dimensional reconstruction is combined with polarization encoding, the error problem caused by the gamma effect in the three-dimensional measurement of the LCD projector is solved, and a higher accuracy of three-dimensional Reconstruct the effect.
Patent Information
- Application Number
- CN202411200989.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-29
Smart Images

Figure CN118714467B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of polarization fringe measurement, and in particular to a polarization sinusoidal fringe pattern correction method, a structured light three-dimensional reconstruction method and a system. Background Art
[0002] With the development of digital display technology, commercial projectors have made it easier and more convenient to generate and control stripe patterns and are widely used. However, in order to meet the sensory requirements of human vision, commercial projectors have introduced the gamma effect to make the visual effect better, but the effect of three-dimensional morphology measurement will be significantly reduced. In the phase shift method, the number of phase shift steps is usually increased to reduce the impact of the nonlinear error caused by the gamma effect on the phase calculation, but this will reduce the operation speed. Especially when performing three-dimensional measurement of HDR objects, polarized structured light is a very stable measurement method. However, it is essential to use an LCD projector to generate polarized structured light. Nonlinear error is an inherent error of the measurement system. Although polarization-coded structured light measurement uses polarization degree instead of traditional light intensity for calculation, it is still affected by the gamma effect. Summary of the invention
[0003] The present disclosure provides a polarization sinusoidal fringe pattern correction method, a structured light three-dimensional reconstruction method and system, which can solve at least one of the problems mentioned in the background technology. To solve the above technical problems, the present disclosure provides the following technical solutions:
[0004] As one aspect of an embodiment of the present disclosure, a method for correcting a polarization sinusoidal fringe pattern is provided, comprising the following steps:
[0005] generating no less than four grayscale images with different first grayscale values;
[0006] Acquire at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then through a camera;
[0007] Fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images to obtain a gamma value of the LCD projector;
[0008] Correcting the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern;
[0009] Fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images to obtain a gamma value of the LCD projector includes:
[0010] The first gray value is expressed as , the second gray value is expressed as , due to the gamma distortion artificially added by the LCD projector, the actual relationship between the two is as follows:
[0011] ,
[0012] in, is the gamma value, due to the first gray value generated is a fixed grayscale value, and the second grayscale value is obtained according to the measurement ,Will As the dependent variable, As independent variables, we get the following polynomial:
[0013] ,
[0014] in, are coefficients of the polynomial, and the second grayscale values of at least four camera images are fitted with the first grayscale values of the corresponding grayscale images to obtain a fitting formula:
[0015] ,
[0016] in, is the second grayscale value of the Nth camera image, where N is a natural number greater than 3, and the coefficients of the polynomial are calculated according to the fitting formula , and then get the expression of the polynomial, and calculate according to the polynomial to get , and then Substitute the value of into the gamma formula to get the gamma value;
[0017] Correcting the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern includes:
[0018] The polarized sinusoidal fringe pattern is precoded using the gamma value, which is expressed as:
[0019] ,
[0020] in, Represented as sinusoidal stripes precoded with gamma value, Represented as the initialization intensity value of the sinusoidal fringes, is the amplitude of the sinusoidal fringes, is the wrapping phase, In N is the phase shift number, n is the nth phase shift.
[0021] As another aspect of the embodiments of the present disclosure, a polarization structured light three-dimensional reconstruction method is provided, which adopts the polarization sinusoidal stripe pattern correction method and obtains a new polarization stripe pattern in combination with polarization coding for three-dimensional reconstruction.
[0022] Optionally, the new polarization fringe pattern is combined with polarization encoding for three-dimensional reconstruction, including:
[0023] The polarization coding assisted phase shift method is used to guide the unfolding of the wrapped phase to achieve three-dimensional reconstruction of polarization structured light.
[0024] Optionally, a polarization coding assisted phase shift method is used to guide the unwrapping of the wrapped phase, comprising:
[0025] Calculate the wrapping phase using the four-step phase shift method , as follows:
[0026] ,
[0027] in, , , and are the 0th to 3rd phase shift linear polarization degrees respectively;
[0028] Polarization coding guides phase unwrapping, as follows:
[0029] ,
[0030] in, is the phase value after unwrapping, is the first-order fringe order, is the second-order fringe order, where and The value of is obtained by looking up the table.
[0031] As another aspect of the embodiments of the present disclosure, a polarization sinusoidal fringe pattern correction system is provided, comprising:
[0032] A grayscale image generating unit, generating no less than four grayscale images with different first grayscale values;
[0033] A camera image acquisition unit, which acquires at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then through a camera;
[0034] A gamma value calculation unit is configured to obtain a gamma value of an LCD projector by fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images; comprising:
[0035] The first gray value is expressed as , the second gray value is expressed as , due to the gamma distortion artificially added by the LCD projector, the actual relationship between the two is as follows:
[0036] ,
[0037] in, is the gamma value, due to the first gray value generated is a fixed grayscale value, and the second grayscale value is obtained according to the measurement ,Will As the dependent variable, As independent variables, we get the following polynomial:
[0038] ,
[0039] in, are coefficients of the polynomial, and the second grayscale values of at least four camera images are fitted with the first grayscale values of the corresponding grayscale images to obtain a fitting formula:
[0040] ,
[0041] in, is the second grayscale value of the Nth camera image, where N is a natural number greater than 3, and the coefficients of the polynomial are calculated according to the fitting formula , and then get the expression of the polynomial, and calculate according to the polynomial to get , and then Substitute the value of into the gamma formula to get the gamma value;
[0042] A gamma value correction unit, which corrects the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern; comprising:
[0043] The polarized sinusoidal fringe pattern is precoded using the gamma value, which is expressed as:
[0044] ,
[0045] in, Represented as sinusoidal stripes precoded with gamma value, Represented as the initialization intensity value of the sinusoidal fringes, is the amplitude of the sinusoidal fringes, is the wrapping phase, In N is the phase shift number, n is the nth phase shift.
[0046] As another aspect of the embodiments of the present disclosure, a polarization structured light three-dimensional reconstruction system is provided, comprising the polarization sinusoidal stripe pattern correction system and a three-dimensional reconstruction unit, wherein the three-dimensional reconstruction unit performs three-dimensional reconstruction based on the obtained new polarization stripe pattern combined with polarization coding.
[0047] As another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for correcting a polarization sinusoidal stripe pattern or the method for three-dimensional reconstruction of a polarization structured light is implemented.
[0048] As another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the polarization sinusoidal stripe pattern correction method or the polarization structured light three-dimensional reconstruction method is implemented.
[0049] Compared with the prior art, the phase calculated using the polarization phase shift stripes after correction disclosed in the present invention is better, and the phase error is reduced and more converged, and the ideal phase can be obtained without phase compensation; the reconstruction result of the three-dimensional point cloud obtained after correction can eliminate the "water ripple" phenomenon caused by the gamma effect, and improve the accuracy of polarization structured light three-dimensional measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a method for correcting a polarized sinusoidal fringe pattern;
[0051] Figure 2 is the polarization sinusoidal fringe pattern after correction;
[0052] Figure 3 is the phase contrast diagram;
[0053] Figure 4 It is the phase error comparison diagram;
[0054] Figure 5 It is a three-dimensional reconstruction comparison map;
[0055] Figure 6 is a schematic block diagram of a polarization sinusoidal fringe pattern correction system 100;
[0056] Figure 7 is a schematic block diagram of a polarization structured light 3D reconstruction system 200 . DETAILED DESCRIPTION
[0057] 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.
[0058] 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.
[0059] It can be understood that the above-mentioned various method embodiments 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.
[0060] In addition, the present disclosure also provides a polarization sinusoidal stripe pattern correction system or a polarization structured light three-dimensional reconstruction system, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any polarization sinusoidal stripe pattern correction method or polarization structured light three-dimensional reconstruction method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.
[0061] The execution subject of the polarization sinusoidal fringe pattern correction method or the polarization structured light three-dimensional reconstruction method may be a computer or other device capable of implementing the polarization sinusoidal fringe pattern correction method or the polarization structured light three-dimensional reconstruction method. For example, the method may be executed by a terminal device or a server or other processing device. In some possible implementations, the polarization sinusoidal fringe pattern correction method or the polarization structured light three-dimensional reconstruction method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0062] Example 1
[0063] This embodiment provides a polarization sinusoidal fringe pattern correction method or a polarization structured light three-dimensional reconstruction method, such as Figure 1 As shown, the following steps are included:
[0064] S10, generating no less than four grayscale images with different first grayscale values;
[0065] S20, acquiring at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then using a camera;
[0066] S30, fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images to obtain a gamma value of the LCD projector;
[0067] S40, correcting the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern.
[0068] Based on the above configuration, the phase calculated by the polarization phase shift fringes after correction in the embodiment of the present disclosure is better, and the phase error is reduced and more convergent, so the ideal phase can be obtained without phase compensation.
[0069] The following describes in detail each step of the embodiment of the present disclosure.
[0070] S10, generating no less than four grayscale images with different first grayscale values;
[0071] Among them, n grayscale images are generated using computer software: , , …, , wherein n is a natural number not less than 4, and the n grayscale images have different grayscale values, preferably fixed values, that is, the first grayscale values are different fixed values, which facilitates subsequent fitting.
[0072] S20, obtaining at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then obtaining the camera image. , , …, , that is, the output image of the LCD projector is obtained.
[0073] In some embodiments, the number of grayscale images is preferably 6.
[0074] S30: Fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images to obtain a gamma value of the LCD projector.
[0075] The LCD projector can be regarded as an “inverse camera”. When only the gamma effect is considered, the first grayscale value of the projector input is Is the second gray value of the output After gamma distortion, we can get the actual relationship between the two as shown in the gamma formula:
[0076] ,
[0077] Since the first gray value generated is a fixed grayscale value, and the second grayscale value is obtained according to the measurement , which in turn As the dependent variable, As an independent variable, let its expression be:
[0078] ,
[0079] in, are the coefficients of the polynomial, and the second grayscale values of at least four camera images are fitted with the first grayscale values of the corresponding grayscale images. Assume that the number of fitting points is , enter the first gray value The grayscale value of the image actually obtained by the camera is , n=1-N , then the following equation can be obtained:
[0080] ,
[0081] Convert it into matrix form to get the fitting formula:
[0082] ,
[0083] in, is the second grayscale value of the Nth camera image, where N is a natural number greater than 3. The coefficients of the polynomial can be obtained by the least squares method according to the fitting formula. , and then get the expression of the polynomial, and calculate according to the polynomial to get , and then Substitute the value of into the gamma formula to get the gamma value.
[0084] S40, correcting the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern.
[0085] Among them, the calculated gamma value is substituted into the formula for generating polarized sinusoidal fringes, that is, the corrected fringes are:
[0086] ,
[0087] in, Represented as sinusoidal stripes precoded with gamma value, Represented as the initialization intensity value of the sinusoidal fringes, is the amplitude of the sinusoidal fringes, is the wrapping phase, In N is the phase shift number, n is the nth phase shift.
[0088] The phase calculated using the polarization phase shift fringes corrected by the embodiment of the present disclosure is better, and the phase error is reduced and more convergent, so the ideal phase can be obtained without phase compensation.
[0089] Example 2
[0090] The disclosed embodiment is a method for obtaining polarized sinusoidal stripes after correction (gamma value precoding) in embodiment 1, and then performing three-dimensional reconstruction of polarized structured light. The new polarized stripe pattern is combined with polarization coding for three-dimensional reconstruction, including:
[0091] Polarization coding assisted phase shifting method is used to guide the unfolding of the wrapped phase to achieve three-dimensional reconstruction of polarized structured light. The reconstruction result of the three-dimensional point cloud obtained after correction can eliminate the "water ripple" phenomenon caused by the gamma effect and improve the accuracy of three-dimensional measurement of polarized structured light.
[0092] In some embodiments, the unfolding of the wrapped phase is guided by using a polarization coding assisted phase shifting method, including:
[0093] Calculate the wrapping phase using the four-step phase shift method , as follows:
[0094] ,
[0095] in, , , and are the 0th to 3rd phase shift linear polarization degrees respectively;
[0096] Polarization coding guides phase unwrapping, as follows:
[0097] ,
[0098] in, is the phase value after unwrapping, is the first-order fringe order, is the second-order fringe order, where and The value of is obtained by looking up the table.
[0099] In order to verify the effectiveness of the method proposed in the embodiment of the present disclosure relative to the prior art, a polarization structured light coded stripe projection three-dimensional measurement system was used for experimental verification, wherein the system consists of a projector, a camera, a polarizer, an object to be measured, etc., wherein the projector is an LCD (CB-FH52) projector produced by EPSON, with a resolution of 1920*1080. The camera is a CMOS (BFS-U3-23S3M-C) grayscale camera (equipped with an HC1605 lens) from FLIR, with a resolution of 1920*1200. At the same time, a linear polarizer (OPSP25.4) produced by Zolix was installed in front of the camera lens. The camera and the projector are placed next to each other, and the object to be measured is placed at the focal length after the camera is focused, and the exposure time is adjusted and fixed. Take 6 grayscale images, and calculate the gamma value according to the method in Example 1 of the present disclosure, and use the gamma value to correct the polarized sinusoidal stripes to obtain the following Figure 2 The corrected polarization sinusoidal fringe pattern is shown in FIG. 1 ; a new polarization fringe pattern is generated, and the phase contrast and phase error before and after correction are compared to obtain the following: Figure 3 The phase contrast diagram and Figure 4 The phase error comparison diagram shown in the figure; According to the phase error comparison diagram, it can be seen that, finally, the effectiveness of the method is proved by the three-dimensional reconstruction results, and the following is obtained Figure 5 The comparison of the three-dimensional reconstruction shown in Figure 5 The upper picture is after correction, and the lower picture is before correction). The phase diagram of the uncorrected polarized sinusoidal stripes has waves, which finally makes the 3D reconstructed point cloud have water ripples, affecting the accuracy of 3D measurement. The phase diagram of the corrected polarized sinusoidal stripes has better effect, and the 3D point cloud reconstruction effect is also better.
[0100] Example 3
[0101] Embodiment 3 of the present disclosure provides a polarization sinusoidal fringe pattern correction system 100, such as Figure 6 As shown, including:
[0102] A grayscale image generating unit 1 generates no less than four grayscale images with different first grayscale values;
[0103] A camera image acquisition unit 2 is configured to acquire at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then through a camera;
[0104] The gamma value calculation unit 3 is configured to obtain a gamma value of the LCD projector by fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images, including:
[0105] The first gray value is expressed as , the second gray value is expressed as , due to the gamma distortion artificially added by the LCD projector, the actual relationship between the two is as follows:
[0106] ,
[0107] in, is the gamma value, due to the first gray value generated is a fixed grayscale value, and the second grayscale value is obtained according to the measurement ,Will As the dependent variable, As independent variables, we get the following polynomial:
[0108] ,
[0109] in, are coefficients of the polynomial, and the second grayscale values of at least four camera images are fitted with the first grayscale values of the corresponding grayscale images to obtain a fitting formula:
[0110] ,
[0111] in, is the second grayscale value of the Nth camera image, where N is a natural number greater than 3, and the coefficients of the polynomial are calculated according to the fitting formula , and then get the expression of the polynomial, and calculate according to the polynomial to get , and then Substitute the value of into the gamma formula to get the gamma value;
[0112] The gamma value correction unit 4 corrects the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern, including:
[0113] The polarized sinusoidal fringe pattern is precoded using the gamma value, which is expressed as:
[0114] ,
[0115] in, Represented as sinusoidal stripes precoded with gamma value, Represented as the initialization intensity value of the sinusoidal fringes, is the amplitude of the sinusoidal fringes, is the wrapping phase, In N is the phase shift number, n is the nth phase shift.
[0116] Based on the above system, the phase calculated using the polarization phase shift fringes corrected by the embodiment of the present disclosure is better, and the phase error is reduced and more convergent, so the ideal phase can be obtained without phase compensation.
[0117] Those skilled in the art can understand that this embodiment is a system corresponding to the method in Embodiment 1. In the absence of conflict, each unit in the system of this embodiment can implement the method in any embodiment in Embodiment 1.
[0118] Example 4
[0119] Embodiment 4 of the present disclosure provides a polarization structured light three-dimensional reconstruction system 200, such as Figure 7 As shown, it includes the polarization sinusoidal stripe pattern correction system 100 and the three-dimensional reconstruction unit 5. The three-dimensional reconstruction unit 5 performs three-dimensional reconstruction according to the obtained new polarization stripe pattern combined with polarization coding, wherein the corresponding method in Example 2 can be implemented correspondingly. The reconstruction result of the three-dimensional point cloud obtained after correction can eliminate the "water ripple" phenomenon caused by the gamma effect, thereby improving the accuracy of three-dimensional measurement of polarization structured light.
[0120] Example 5
[0121] Embodiment 5 of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the polarization sinusoidal stripe pattern correction method or the polarization structured light three-dimensional reconstruction method in Embodiment 1 when executing the computer program.
[0122] Embodiment 5 of the present disclosure is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0123] The electronic device may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different system components (including the memory and the processor).
[0124] The bus includes data bus, address bus and control bus.
[0125] The memory may include volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0126] The memory may also include a program tool having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0127] The processor executes various functional applications and data processing by running computer programs stored in the memory.
[0128] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, etc.). Such communication may be performed through an input / output (I / O) interface. In addition, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0129] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0130] Example 6
[0131] Embodiment 6 of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, the steps of the polarization sinusoidal stripe pattern correction method or the polarization structured light three-dimensional reconstruction method in Embodiment 1 are implemented.
[0132] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0133] In a possible implementation, the present disclosure can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the polarization sinusoidal stripe pattern correction method or the polarization structured light three-dimensional reconstruction method described in Example 1.
[0134] Among them, the program code for executing the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.
[0135] Although embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present disclosure, and the scope of the present disclosure is defined by the appended claims and their equivalents.
Claims
1. A method for correcting a polarization sinusoidal fringe pattern, characterized in that: The steps include: generating no less than four grayscale images with different first grayscale values; Acquire at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then through a camera; Fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images to obtain a gamma value of the LCD projector; Correcting the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern; Fitting the second grayscale values of at least four camera images and the first grayscale values of the corresponding grayscale images to obtain a gamma value of the LCD projector includes: The first gray value is expressed as , the second gray value is expressed as , due to the gamma distortion artificially added by the LCD projector, the actual relationship between the two is as follows: , in, is the gamma value, due to the first gray value generated is a fixed grayscale value, and the second grayscale value is obtained according to the measurement ,Will As the dependent variable, As independent variables, we get the following polynomial: , in, are the coefficients of the polynomial, and the second grayscale values of at least four camera images are fitted with the first grayscale values of the corresponding grayscale images. Assume that the number of fitting points is , enter the first gray value The gray value of the image actually obtained by the camera is , n=1-N , then the following equation can be obtained: , Convert it into matrix form to get the fitting formula: , in, is the second grayscale value of the Nth camera image, N is a natural number greater than 3, and the coefficients of the polynomial are calculated according to the fitting formula , and then get the expression of the polynomial, and calculate according to the polynomial to get , and then Substitute the value of into the gamma formula to get the gamma value; Correcting the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern includes: The polarized sinusoidal fringe pattern is precoded using the gamma value, which is expressed as: , in, Represented as sinusoidal stripes precoded with gamma value, Represented as the initialization intensity value of the sinusoidal fringes, is the amplitude of the sinusoidal fringes, is the wrapping phase, In N is the phase shift number, n is the nth phase shift.
2. A polarization structured light three-dimensional reconstruction method, characterized in that: The polarization sinusoidal fringe pattern correction method as claimed in claim 1 is adopted, and a new polarization fringe pattern is obtained and combined with polarization coding for three-dimensional reconstruction.
3. The polarization structured light 3D reconstruction method according to claim 2, characterized in that: New polarization fringe patterns combined with polarization encoding for 3D reconstruction include: The polarization coding assisted phase shift method is used to guide the unfolding of the wrapped phase to achieve three-dimensional reconstruction of polarization structured light.
4. The polarization structured light three-dimensional reconstruction method according to claim 3, characterized in that: The polarization-encoded assisted phase shifting method is used to guide the unwrapping of the wrapped phase, including: Calculate the wrapping phase using the four-step phase shift method , as follows: , in, , , and are the 0th to 3rd phase shift linear polarization degrees respectively; Polarization coding guides phase unwrapping, as follows: , in, is the phase value after unwrapping, is the first-order fringe order, is the second-order fringe order, where and The value of is obtained by looking up the table.
5. A polarization sinusoidal fringe pattern correction system, characterized in that: include: A grayscale image generating unit, generating no less than four grayscale images with different first grayscale values; A camera image acquisition unit, which acquires at least four camera images corresponding to the grayscale image, wherein the camera image is obtained by projecting the at least four grayscale images with different first grayscale values onto a standard aluminum plate through an LCD projector and then through a camera; A gamma value calculation unit is configured to obtain a gamma value of an LCD projector by fitting the second grayscale values of at least four camera images and the first grayscale values of corresponding grayscale images; comprising: The first gray value is expressed as , the second gray value is expressed as , due to the gamma distortion artificially added by the LCD projector, the actual relationship between the two is as follows: , in, is the gamma value, due to the first gray value generated is a fixed grayscale value, and the second grayscale value is obtained according to the measurement ,Will As the dependent variable, As independent variables, we get the following polynomial: , in, are the coefficients of the polynomial, and the second grayscale values of at least four camera images are fitted with the first grayscale values of the corresponding grayscale images. Assume that the number of fitting points is , enter the first gray value The gray value of the image actually obtained by the camera is , n=1-N , then the following equation can be obtained: , Convert it into matrix form to get the fitting formula: , in, is the second grayscale value of the Nth camera image, where N is a natural number greater than 3, and the coefficients of the polynomial are calculated according to the fitting formula , and then get the expression of the polynomial, and calculate according to the polynomial to get , and then Substitute the value of into the gamma formula to get the gamma value; A gamma value correction unit, which corrects the polarization sinusoidal fringe pattern based on the gamma value to obtain a new polarization fringe pattern; comprising: The polarized sinusoidal fringe pattern is precoded using the gamma value, which is expressed as: , in, Represented as sinusoidal stripes precoded with gamma value, Represented as the initialization intensity value of the sinusoidal fringes, is the amplitude of the sinusoidal fringes, is the wrapping phase, In N is the phase shift number, n is the nth phase shift.
6. A polarization structured light three-dimensional reconstruction system, characterized in that: It comprises the polarization sinusoidal stripe pattern correction system as claimed in claim 5 and a three-dimensional reconstruction unit, wherein the three-dimensional reconstruction unit performs three-dimensional reconstruction according to the obtained new polarization stripe pattern combined with polarization coding.
7. 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, it implements the polarization sinusoidal stripe pattern correction method described in claim 1, or the polarization structured light three-dimensional reconstruction method described in any one of claims 2-4.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the polarization sinusoidal stripe pattern correction method described in claim 1 or the polarization structured light three-dimensional reconstruction method described in any one of claims 2-4 is implemented.
