A three-dimensional phase shift measurement method based on grayscale multiplexing Gray code

By redesigning the grey code and stripe pattern, the first unprojected grey code pattern is restored, which solves the problem of insufficient three-dimensional reconstruction efficiency and accuracy of super-high-speed objects in the prior art, and achieves higher motion speed tolerance and faster sampling time.

CN115451860BActive Publication Date: 2025-04-11CHENGDU AIRCRAFT INDUSTRY GROUP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210952057.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-04-11
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

The prior art is difficult to meet the three-dimensional reconstruction of ultra-high-speed objects, especially under the limitations between the object's motion speed and hardware performance, the efficiency and accuracy of dynamic measurements are insufficient.

Method used

By redesigning the grey code and stripe pattern, the first unprojected grey code pattern is restored, the number of projected patterns is reduced, sampling efficiency is improved, and the tolerance of dynamic measurements is improved through binarization and decoding techniques.

Benefits of technology

It has achieved an improvement in tolerance to the maximum motion speed of the object, shortened sampling time, and improved the efficiency of three-dimensional measurement and the accuracy of dynamic measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115451860B_ABST
    Figure CN115451860B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of active optical three-dimensional measurement, and specifically relates to a phase shift three-dimensional measurement method based on grayscale multiplexing Gray code, comprising the following steps: projecting a redesigned fringe pattern and Gray code pattern onto an object to be measured, wherein the Gray code encoding period is half of the fringe period; collecting the fringe pattern and Gray code pattern modulated by the height of the object; solving the wrapping phase of the object to be measured according to a formula; binarizing the grayscale value sequence of the Gray code pattern at each pixel point; solving the grayscale mean of the fringe pattern and the grayscale mean of the Gray code pattern at each pixel point, and restoring the first Gray code pattern by using the size relationship between the two; performing phase unfolding by assisting the wrapping phase according to the Gray code decoding result; calibrating the system parameters, and solving the three-dimensional coordinates by using the triangulation principle. The present invention solves the problem of bit errors at phase order jumps, improves the robustness of decoding, reduces Gray code projection patterns, and improves the efficiency of static and dynamic measurements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of active light three-dimensional measurement, and in particular relates to a phase shift three-dimensional measurement method based on grayscale multiplexing Gray code. Background Art

[0002] Gray code-assisted phase shift measurement technology is a branch of structured light measurement and is widely used in industrial inspection, cultural relic protection, medical reconstruction and other fields. With the continuous development of hardware technology and computer computing power, in order to explore the specific details of experimental mechanics and material mechanics, high-speed and high-precision three-dimensional reconstruction has become a hot topic in recent years. Due to the development of high-speed commercial projectors and high-speed cameras, Gray code-assisted phase shift technology has made it possible to obtain high-speed dynamic three-dimensional information in a low-cost manner. Before this, projection was mainly completed through array projectors and rotating gratings, which was costly and had average reconstruction effects.

[0003] However, today's dynamic measurement technology still cannot meet the requirements of ultra-high-speed object reconstruction. The movement speed of the object to be measured is related to the performance of the projector and camera. The faster the frame rate of projection and shooting, the higher the tolerance for the movement speed of the object to be measured, which depends on the hardware performance. Another major factor that restricts the speed of object movement is the number of projection patterns required for a reconstruction cycle, which depends on the encoding and decoding technology.

[0004] In the Gray code assisted phase shift method 3D measurement technology, complementary Gray code is often used to solve the order jump error in the wrapped phase unwrapping process, but it requires an extra codeword to generate two complementary orders. This method redesigns the Gray code and fringe pattern to restore the first unprojected Gray code pattern, thereby reducing one codeword, reducing the sampling time, and improving the efficiency of 3D measurement. Improve the tolerance of the maximum movement speed of the object in dynamic measurement. Summary of the invention

[0005] The present invention aims to make up for the shortcomings of the prior art by restoring the first Gray code pattern of the traditional Gray code assisted phase shift technology, thereby improving the reconstruction efficiency and shortening the sampling time, and providing a phase shift three-dimensional shape reconstruction method based on grayscale multiplexing Gray code.

[0006] In order to realize the above invention, the technical solution provided is as follows:

[0007] A phase shift three-dimensional measurement method based on grayscale multiplexing Gray code, the steps are as follows:

[0008] S1: Project a redesigned 256-grayscale stripe pattern with m amplitudes and N periods and a log2N-amplitude complementary Gray code pattern onto the object to be tested, set the mean brightness of the left and right sides of the stripe pattern to different values, and then set the mean brightness of the left and right sides of the Gray code pattern to be different, and make the mean brightness of the left and right sides of the stripe pattern and the Gray code pattern opposite. In the Gray code sequence, both the left and right parts have an all-0 and all-1 code. In order to correctly calculate the mean brightness of the Gray code pattern and eliminate the ambiguity of all-0 and all-1 codes, it is necessary to delete the all-1 code of the left half and the all-0 code of the right half, and then delete a code on the left or right side of the deleted all-1 code to ensure that the hamming distance of the adjacent code sequence is 1.

[0009] S2: Collect the gray code and stripe grayscale images that are highly modulated and deformed by the object.

[0010] S3: The truncated phase of the object is solved by the fringe pattern and the Gray code pattern is binarized.

[0011] S4: Solve the arithmetic mean of the stripe pattern and find the maximum and minimum values ​​of the Gray code sequence of the same pixel point to solve the mean, and use the grayscale mean size relationship between the two to restore the first Gray code pattern.

[0012] S5: After obtaining the binarization result, the auxiliary wrapping phase is used to perform phase unwrapping.

[0013] S6: Use the checkerboard calibration plate to calibrate the system and obtain the camera internal parameters and rotation and translation matrices. Then use the mapping of the unfolded wrapped phase of each pixel to the number of stripe pattern columns and pixel coordinates, and obtain the world coordinates of the object after triangulation calculation to complete the 3D reconstruction.

[0014] Gray code binarization method is:

[0015] According to the collected Gray code gray value sequence of each pixel point, the mean variance std(x,y) is solved, and the maximum grayscale max and minimum grayscale min in the sequence are found to obtain the Gray code grayscale mean GCM(x,y), and then binarized according to the following formula:

[0016] if std(x,y)<=stdthresh:

[0017]

[0018] if std(x,y)>stdthresh:

[0019]

[0020] Where stdthresh is a preset value for distinguishing all-0 all-1 coding from other general coding, seq(x,y,i) is the binarization result of the i-th image, GCM(x,y) is the grayscale mean of the collected Gray code pattern, FRM(x,y) is the grayscale mean of the collected Gray code pattern, and GCi(x,y) represents the grayscale value of the collected i-th Gray code.

[0021] The recovery formula for the first Gray code pattern is:

[0022]

[0023] Wherein, GC1(x, y) represents the first unprojected Gray code pattern, GCM(x, y) is the grayscale mean of the collected Gray code pattern, and FRM(x, y) is the grayscale mean of the collected Gray code pattern.

[0024] The decoding solution formula is:

[0025]

[0026] Where seq(x,y,i) represents the binarization result of the i-th Gray code pattern, v(x,y) represents the decimal value corresponding to the Gray code pattern of the binarization sequence, and the f() function represents the mapping relationship from the decimal value to the phase order k(x,y), which is the mapping relationship after deleting the specific Gray code encoding.

[0027] Compared with the prior art, the advantages of the present invention are as follows:

[0028] 1. By re-encoding and decoding the Gray code and phase shift pattern in the gray space, restoring the first Gray code pattern, and using the Gray code sequence for binarization, the problem of bit errors at the phase order jump is solved, the robustness of decoding is improved, the Gray code projection pattern is reduced, and the efficiency of static and dynamic measurements is improved.

[0029] 2. For the same encoding cycle, one projection pattern is reduced, thereby improving the measurement efficiency and shortening the sampling time. It is suitable for fast measurement of complex and dynamic scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The present invention is a flow chart of a phase shift three-dimensional measurement method based on grayscale multiplexing Gray code.

[0031] Figure 2 This is a schematic diagram of the Gray code sequence of the present invention.

[0032] Figure 3 This is one of the Gray code patterns of the present invention.

[0033] Figure 4This is one of the stripe patterns of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is to explain the present invention rather than to limit the present invention. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0035] The specific implementation method of the present invention is described below with reference to the accompanying drawings and examples, but the present invention is not limited to this embodiment.

[0036] Example 1.

[0037] like Figure 1 As shown, a phase shift three-dimensional measurement method based on grayscale multiplexing Gray code, the steps are as follows:

[0038] S1: Project a redesigned 256-grayscale stripe pattern with m amplitudes and N periods and a log2N-amplitude complementary Gray code pattern onto the object to be tested, set the mean brightness of the left and right sides of the stripe pattern to different values, and then set the mean brightness of the left and right sides of the Gray code pattern to be different, and make the mean brightness of the left and right sides of the stripe pattern and the Gray code pattern opposite. In the Gray code sequence, both the left and right parts have an all-0 and all-1 code. In order to correctly calculate the mean brightness of the Gray code pattern and eliminate the ambiguity of all-0 and all-1 codes, it is necessary to delete the all-1 code of the left half and the all-0 code of the right half, and then delete a code on the left or right side of the deleted all-1 code to ensure that the hamming distance of the adjacent code sequence is 1.

[0039] S2: Collect the gray code and stripe grayscale images that are highly modulated and deformed by the object.

[0040] S3: The truncated phase of the object is solved by the fringe pattern and the Gray code pattern is binarized.

[0041] S4: Solve the arithmetic mean of the stripe pattern and find the maximum and minimum values ​​of the Gray code sequence of the same pixel point to solve the mean, and use the grayscale mean size relationship between the two to restore the first Gray code pattern.

[0042] S5: After obtaining the binarization result, the auxiliary wrapping phase is used to perform phase unwrapping.

[0043] S6: Use the checkerboard calibration plate to calibrate the system and obtain the camera internal parameters and rotation and translation matrices. Then use the mapping of the unfolded wrapped phase of each pixel to the number of stripe pattern columns and pixel coordinates, and obtain the world coordinates of the object after triangulation calculation to complete the 3D reconstruction.

[0044] like Figure 2 , Figure 3 and Figure 4 As shown,

[0045] Gray code binarization method is:

[0046] According to the collected Gray code gray value sequence of each pixel point, the mean variance std(x,y) is solved, and the maximum grayscale max and minimum grayscale min in the sequence are found to obtain the Gray code grayscale mean GCM(x,y), and then binarized according to the following formula:

[0047] if std(x,y)<=stdthresh:

[0048]

[0049] if std(x,y)>stdthresh:

[0050]

[0051] Where stdthresh is a preset value for distinguishing all-0 all-1 coding from other general coding, seq(x,y,i) is the binarization result of the i-th image, GCM(x,y) is the grayscale mean of the collected Gray code pattern, FRM(x,y) is the grayscale mean of the collected Gray code pattern, and GCi(x,y) represents the grayscale value of the collected i-th Gray code.

[0052] The recovery formula for the first Gray code pattern is:

[0053]

[0054] Wherein, GC1(x, y) represents the first unprojected Gray code pattern, GCM(x, y) is the grayscale mean of the collected Gray code pattern, and FRM(x, y) is the grayscale mean of the collected Gray code pattern.

[0055] The decoding solution formula is:

[0056]

[0057] Where seq(x,y,i) represents the binarization result of the i-th Gray code pattern, v(x,y) represents the decimal value corresponding to the Gray code pattern of the binarization sequence, and the f() function represents the mapping relationship from the decimal value to the phase order k(x,y), which is the mapping relationship after deleting the specific Gray code encoding.

[0058] Example 2

[0059] S1: Projecting a redesigned 256-grayscale m-width stripe pattern with a period of N and a log2N-width complementary Gray code pattern onto the object to be measured.

[0060] S2: The gray code and stripe grayscale images that are highly modulated and deformed by the object to be measured are collected by a black and white camera.

[0061] S3: The truncated phase of each period is solved using the collected sinusoidal fringe pattern, and the grayscale sequence of each pixel of the Gray code pattern is binarized.

[0062] The steps to solve the Gray code binarization are as follows:

[0063] The mean variance std(x,y) is solved according to the collected Gray code grayscale value sequence of each pixel point, and the maximum grayscale max and minimum grayscale min in the sequence are found to obtain the Gray code grayscale mean GCM(x,y), and then the grayscale mean FRM(x,y) is solved according to the collected Gray code pattern.

[0064] By comparing the relationship between the mean variance and the preset value, different binarization methods are used, and the binarization formula of the Gray code sequence is:

[0065] if std(x,y)<=stdthresh:

[0066]

[0067] if std(x,y)>stdthresh:

[0068]

[0069] Where stdthresh is a preset value for distinguishing all-0 all-1 coding from other general coding, seq(x,y,i) is the binarization result of the i-th image, and GCi(x,y) represents the grayscale value of the i-th Gray code collected.

[0070] S4: Add the collected stripe patterns to obtain the arithmetic mean, and find the maximum and minimum values ​​of the Gray code sequence of the same pixel point to obtain the mean, and use the grayscale mean size relationship of the two types of patterns collected to restore the first unprojected Gray code pattern.

[0071] When the mean brightness of the Gray code is greater than the mean brightness of the stripe pattern, it corresponds to the 0 code of the first stripe pattern, otherwise it corresponds to the 1 code of the first stripe pattern. The recovery formula for the first stripe is as follows:

[0072]

[0073] Wherein, GC1(x, y) represents the first unprojected Gray code pattern, GCM(x, y) is the grayscale mean of the collected Gray code pattern, and FRM(x, y) is the grayscale mean of the collected Gray code pattern.

[0074] S5: After obtaining the binarization result, the auxiliary wrapping phase is used to perform phase unwrapping.

[0075] S6: Use the checkerboard calibration plate to calibrate the system, obtain the camera internal parameters, and the rotation and translation matrices of the camera and the world coordinate system and the rotation and translation matrices of the projector and the world coordinate system. Then, use the mapping of the unfolded wrapped phase of each pixel point to the number of stripe pattern columns and pixel point coordinates, rely on the calibration parameters, and obtain the world coordinates of the object after triangulation calculation to complete the 3D reconstruction.

[0076] The decoding process after Gray code binarization is as follows:

[0077] First, solve the decimal value corresponding to the binary sequence, and then use the known conversion relationship from decimal value to encoding period to solve the phase order. The formula for solving the phase order is as follows:

[0078]

[0079] Where seq(x,y,i) represents the binarization result of the i-th Gray code pattern, v(x,y) represents the decimal value corresponding to the Gray code pattern of the binarization sequence, and the f() function represents the mapping relationship from the decimal value to the phase order k(x,y), which is the mapping relationship after deleting the specific Gray code encoding.

[0080] The wrapped phase is expanded using the solved complementary Gray code order, and is processed separately according to the relationship between the wrapped phase and 0. The expansion formula is as follows:

[0081]

[0082] Where φ is the wrapped phase, k(x,y) is the phase order to be solved, Φ(x,y) is the unwrapped phase, and the floor() function represents the rounding down operation.

[0083] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

Claims

1. A three-dimensional phase shift measurement method based on grayscale multiplexing Gray code, characterized in that: The steps are as follows: S1: Projecting a redesigned 256-grayscale m-width period N stripe pattern and a log2N-width complementary Gray code pattern onto the object to be tested, setting the mean brightness of the left and right sides of the stripe pattern to different values, and then setting the mean brightness of the left and right sides of the Gray code pattern to be different, and making the mean brightness of the left and right sides of the stripe pattern and the Gray code pattern opposite in magnitude; in the Gray code sequence, both the left and right parts have an all-0 and all-1 code. In order to correctly calculate the mean brightness of the Gray code pattern and eliminate the ambiguity of all-0 and all-1 codes, it is necessary to delete the all-1 code of the left half and the all-0 code of the right half, and then delete a code on the left or right side of the deleted all-1 code to ensure that the hamming distance of adjacent code sequences is 1; S2: Collect the gray code and fringe grayscale images that are highly modulated and deformed by the object; S3: Determine the truncated phase of the object through the fringe pattern and binarize the Gray code pattern; S4: solving the arithmetic mean of the stripe pattern and finding the maximum and minimum values ​​of the Gray code sequence of the same pixel point to solve the mean, and using the grayscale mean size relationship between the two to restore the first Gray code pattern; S5: After obtaining the binarization result, the auxiliary wrapped phase is used to perform phase unwrapping; S6: Use a checkerboard calibration plate to calibrate the system to obtain the camera's intrinsic parameters and the rotation and translation matrix; then use the mapping of the unfolded wrapped phase of each pixel point to the number of fringe pattern columns and pixel point coordinates, and obtain the world coordinates of the object after triangulation calculation to complete the 3D reconstruction.

2. According to claim 1, a phase shift three-dimensional measurement method based on grayscale multiplexing Gray code, Features: Gray code binarization method is: According to the collected Gray code gray value sequence of each pixel point, the mean variance std(x,y) is solved, and the maximum grayscale max and minimum grayscale min in the sequence are found to obtain the Gray code grayscale mean GCM(x,y), and then binarized according to the following formula: if std(x,y)<=stdthresh: if std(x,y)>stdthresh: Where stdthresh is a preset value for distinguishing all-0 all-1 coding from other general coding, seq(x,y,i) is the binarization result of the i-th image, GCM(x,y) is the grayscale mean of the collected Gray code pattern, FRM(x,y) is the grayscale mean of the collected Gray code pattern, and GCi(x,y) represents the grayscale value of the collected i-th Gray code.

3. According to claim 2, a phase shift three-dimensional measurement method based on grayscale multiplexing Gray code, Features: The recovery formula for the first Gray code pattern is: Wherein, GC1(x, y) represents the first unprojected Gray code pattern, GCM(x, y) is the grayscale mean of the collected Gray code pattern, and FRM(x, y) is the grayscale mean of the collected Gray code pattern.

4. The three-dimensional phase shift measurement method based on grayscale multiplexing Gray code according to claim 3, Features: The decoding solution formula is: k(x,y)=f(v(x,y)) Where seq(x,y,i) represents the binarization result of the i-th Gray code pattern, v(x,y) represents the decimal value corresponding to the Gray code pattern of the binarization sequence, and the f() function represents the mapping relationship from the decimal value to the phase order k(x,y), which is the mapping relationship after deleting the specific Gray code encoding.

Citation Information

Patent Citations

  • A binary pattern defocus projection method for a structured light measurement system

    CN109242897A

  • Three-dimensional shape measurement method based on cyclic complementary Gray code

    CN109540039A