Coding structured light order correction algorithm based on self-increasing order
Through the self-increasing order coded structured light algorithm, the problems of middle order error and slow measurement speed of structured light three-dimensional measurement are solved, and high-precision and high-speed three-dimensional reconstruction is realized, which simplifies the operation process and avoids noise pollution.
Patent Information
- Application Number
- CN202411277744.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The existing three-dimensional structured light measurement technology faces the problem of order error when acquiring stripe orders, especially in the phase jump area, which affects the reconstruction accuracy, and the measurement speed is slow, making it difficult to meet the high-speed measurement needs.
Using the coded structured light order correction algorithm based on the self-increasing order, the order self-increasing and noise removal can be achieved through existing gratings, including the construction of a structured light three-dimensional measurement system, projecting sinusoidal patterns and phase coded patterns, and through three phases The shift method and decoding algorithm solve the wrapping phase and fringe order, combine the area threshold function and mask algorithm to eliminate miscellaneous points, obtain the interlaced fringe order, and divide the areas to perform absolute phase solutions.
No additional projection grating or filtering is required, which simplifies operation, improves experimental simplicity, ensures data accuracy and processing speed of three-dimensional measurements, effectively avoids neighborhood pollution, and improves measurement accuracy and speed.
Smart Images

Figure CN119309513A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of optical three-dimensional measurement, and in particular relates to a coding structured light order correction algorithm based on self-incrementing order. Background Art
[0002] Structured light three-dimensional measurement, with its non-contact, high-precision and real-time advantages, occupies an important position in the field of optical measurement. Among them, coded structured light technology is widely used in industrial inspection, human-computer interaction and 3D printing due to its simple structure and strong robustness. The existing system uses a projector to project two sets of digital gratings, phase shift and encoding, combined with camera acquisition and computer processing to achieve three-dimensional reconstruction of objects. However, this technology faces two core challenges: First, it is difficult to obtain the order of the fringe, especially in the phase jump area. Due to the instability near the wrapped phase boundary, order errors are easily caused, affecting the reconstruction accuracy. This difficulty stems from the complex correspondence between the encoded digital grating and the wrapped phase period, and the dynamic changes in the phase jump area. Second, the measurement speed is limited. The current phase-coded structured light technology is not yet mature and it is difficult to meet the needs of high-speed measurement.
[0003] There are also many solutions to the above technical problems. Depending on whether the order error is removed after or before the reconstructed three-dimensional data is obtained, it can be classified into post-correction method and pre-avoidance method. In terms of post-correction method, Professor Zhang Song of Purdue University proposed to detect and eliminate errors by judging the monotonicity of the unwrapped phase, but this method will increase the amount of calculation or cause neighboring contamination. Da Feipeng's research group at Southeast University proposed an adaptive median filtering method, which can alleviate the impact of noise and weaken the neighboring contamination problem, but this method is time-consuming and still needs more in-depth research on the real-time measurement of fringe projection profile technology.
[0004] In terms of the pre-avoidance method, Zhang Qican et al. proposed the complementary Gray code technology [3], which obtains two staggered fringe orders by projecting an additional fringe pattern. Although this method can effectively prevent the fringe order error, it is based on the premise of sacrificing the measurement speed. Wu Zhoujie et al. constructed two additional staggered phases from the original fringe sequence and divided each cycle of the fringe sequence into three parts to pre-avoid the generation of fringe order errors. However, when the phase quality of the wrapped phase is low, error propagation problems will occur. Overall, there is currently no good method that can solve the problem of reduced reconstruction accuracy caused by order noise caused by boundary instability in coded structured light in three-dimensional reconstruction while ensuring measurement speed. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a coded structured light order correction algorithm based on self-increment order, which realizes order self-increment and order noise removal through the existing grating without the need for additional projection grating, filtering or exchanging phase shift order. It can ensure the data accuracy of three-dimensional measurement and the operation processing speed.
[0006] In order to achieve the above technical effects, the present invention designs a coded structured light order correction algorithm based on self-incrementing order, which specifically includes the following steps:
[0007] S1: Build a structured light 3D measurement system consisting of a projection system and a camera;
[0008] S2: Projecting the sinusoidal pattern and the phase-encoded pattern onto the object surface in the form of an image sequence;
[0009] S3: The wrapped phase φ(x, y) of the sinusoidal pattern and the fringe order k(x, y) of the coded pattern are solved by the three-step phase shift method and the correlation decoding algorithm respectively;
[0010] S4: By comparing the fringe modulation intensity b(x, y) with the region segmentation threshold T h (x, y) is compared to obtain the ROI area, and then the wrapped phase in R(x, y) is solved based on the regional segmentation and fringe order k R (x,y);
[0011] S5: k is quantified by area threshold function R (x, y) to eliminate small area noise points and obtain k RZ (x, y); Next, find the position of the minimum phase point of each row within the order range, and finally obtain the phase mask M(x, y) by comparing the position size of each row;
[0012] S6: Fringe order k RZ (x, y) and the phase mask M(x, y) are combined to obtain the staggered fringe order Z(x, y);
[0013] S7: Through Make a judgment and divide the ROI area into three areas;
[0014] S8: Solve the absolute phase according to the solved interlaced fringe order and the divided areas.
[0015] Furthermore, in step S4, the wrapped phase in R(x,y) is solved and fringe order k R The method for (x,y) is:
[0016]
[0017] k R (x,y)=k(x,y)*R(x,y)
[0018] Where b(x,y) is the modulation intensity of the grating, I i (i=1,2,3) is the intensity of the sinusoidal grating, T h is the threshold for region segmentation.
[0019] Furthermore, the method for obtaining the phase mask M(x, y) in S5 is:
[0020] S5.1: Use binary area threshold algorithm to calculate k R The small area noise points of (x, y) are eliminated to obtain k RZ (x,y);
[0021] S5.2: Traverse the corresponding k RZ The position of the phase minimum of each row in the (x, y) order range, such as the position of the j-th order is recorded as Make the row position within each order range greater than The area of is set to 1, and the other areas are set to 0; after traversing each order, the synthetic area mask M(x, y) is obtained.
[0022] Furthermore, in step S6, the fringe order k RZ The method of synthesizing the staggered fringe order Z(x,y) and the phase mask M(x,y) is:
[0023]
[0024] The round[·] function is a rounding function.
[0025] Further, in step S7, by The method for making judgments and then dividing the ROI area into three areas is:
[0026]
[0027] Furthermore, in step S8, the method for solving the absolute phase according to the solved interlaced fringe order and the divided area is:
[0028] Φ(x,y)=[φ(x,y)+2πZ(x,y)]R1(x,y)+[φ(x,y)+2πk R (x,y)]R2(x,y)+[φ(x,y)+2π(Z(x,y)-1)]R3(x,y)
[0029] where φ(x,y) is the wrapping phase of the sinusoidal coding pattern.
[0030] Furthermore, the structured light three-dimensional measurement system includes an industrial CCD camera, a structured light projection system and a computer system, and the industrial CCD camera and the structured light projection system are both communicatively connected to the computer system.
[0031] The beneficial effects of the present invention are:
[0032] 1. The present invention does not require additional projection of gratings, filtering or exchange of phase shift order, and only avoids the jump region of the wrapped phase from appearing at the edge position of the order by self-incrementing the existing order, thereby simplifying the experimental operation and improving the simplicity of the experiment.
[0033] 2. The present invention realizes order self-increment and order noise removal through the existing grating without projecting additional grating or performing filtering operations, which can not only ensure the data accuracy of three-dimensional measurement, but also ensure the operation processing speed and effectively avoid the occurrence of neighborhood contamination. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for describing the embodiment are briefly introduced below.
[0035] Figure 1 A structural block diagram of a structured light three-dimensional measurement system used in a coded structured light order correction algorithm based on self-incrementing order according to the present invention;
[0036] Figure 2 It is a flow chart of a coded structured light order correction algorithm based on self-increasing order of the present invention;
[0037] Figure 3 The measurement target of the sudden surface change in Embodiment 2 of the present invention;
[0038] Figure 4 Gray code and phase coded modulation fringes captured by the camera in Example 2 of the present invention, wherein a is Gray code (GC) modulation fringes; b is phase coded (PC) modulation fringes;
[0039] Figure 5 : is an absolute phase diagram of Gray code and phase coding in Example 2 of the present invention; in the figure a is an absolute phase diagram of Gray code (GC), and b is an absolute phase diagram of phase coding (PC);
[0040] Figure 6 1 is a comparison diagram of the fringe orders of Gray code and phase coding in Example 2 of the present invention; in the figure, (a) is the comparison of the fringe orders of Gray code (GC), and (b) is the comparison of the fringe orders of phase coding (PC);
[0041] Figure 7 Figure 1 is the absolute phase diagram of GC and PC after correction by the method of the present invention; Figure a is the absolute phase diagram of GC after correction, and Figure b is the absolute phase diagram of PC after correction;
[0042] Figure 8 The measurement target with complex texture in Embodiment 3 of the present invention;
[0043] Fig. 9 : is the absolute phase diagram of GC and PC in Example 3 of the present invention; a is the absolute phase diagram of Gray code (GC); b is the absolute phase diagram of phase coding (PC);
[0044] Fig.10 The absolute phases of GC and PC after correction processing by the method of the present invention in Example 3 of the present invention; in the figure, a is the absolute phase diagram of GC after correction processing, and b is the absolute phase diagram of PC after correction processing. DETAILED DESCRIPTION
[0045] Example 1
[0046] The present invention discloses a coding structured light order correction algorithm based on self-incrementing order, comprising the following steps:
[0047] S1: Construct a structured light 3D measurement system consisting of an industrial CCD camera, a structured light projection system and a computer system. The structure diagram of the structured light 3D measurement system is as follows: Figure 1 As shown, specifically, the structured light projection system includes a projector and a mounting adjustment frame. The projector is mounted on the mounting adjustment frame. The height, angle, etc. of the projector can be adjusted by mounting the adjustment frame. The mounting adjustment clamp is a prior art and is not shown in the figure. Two industrial CCD cameras are provided. The two industrial CCD cameras are symmetrically arranged with the optical axis of the projector as the center. The industrial CCD camera outputs raw data, and its spectral range is also wide. It also has the advantages of low power consumption, high sensitivity and fast response speed, and is suitable for high-quality image processing algorithms. The industrial CCD camera and the structured light projection system are both connected to the computer system for communication. The computer system can control the structured light projection system, and the images collected by the industrial CCD camera are transmitted to the computer system for processing. The computer system includes a storage module, a communication module, an image acquisition module and a three-dimensional reconstruction module. The modules included in the computer system are prior art and can be directly selected and used. No more explanation is given here.
[0048] S2: Project the sinusoidal pattern and the phase-encoded pattern onto the object surface in the form of an image sequence.
[0049] S3: The wrapped phase φ(x, y) of the sinusoidal pattern and the fringe order k(x, y) of the coded pattern are solved respectively by the three-step phase shift method and the correlation decoding algorithm.
[0050] S4: By comparing the fringe modulation intensity b(x, y) with the region segmentation threshold T h (x, y) to obtain the ROI area, and then solve the wrapping phase in R(x, y) based on the region segmentation and fringe order k R (x, y). Obtain the ROI area, and then solve the wrapping phase in R(x, y) based on the region segmentation and fringe order k R The method for (x,y) is:
[0051]
[0052] k R (x,y)=k(x,y)*R(x,y)
[0053] Where b(x,y) is the modulation intensity of the grating, I i (i=1,2,3) is the intensity of the sinusoidal grating, T h is the threshold for region segmentation.
[0054] S5: k is quantified by area threshold function R (x, y) to eliminate small area noise points and obtain k RZ (x, y). Next, find the position of the minimum phase point of each row within the order range, and finally obtain the phase mask M(x, y) by comparing the position size of each row. Get k RZ (x, y), and then find the position of the minimum phase point of each row within the order range, and then obtain the phase mask M(x, y) by comparing the position size of each row:
[0055] The binary area threshold algorithm is used to R (x, y) to eliminate small area noise points; traverse the corresponding k RZ The position of the phase minimum of each row in the (x, y) order range, such as the position of the j-th order is recorded as Make the row position within each order range greater than The area with 1 is set to 1, and the other areas are set to 0. After traversing each order, the synthetic area mask M(x, y) is obtained.
[0056] S6: Fringe order k RZ The staggered fringe order Z(x,y) is obtained by combining the phase mask M(x,y). The method for obtaining the staggered fringe order Z(x,y) is as follows:
[0057]
[0058] The round[·] function is a rounding function.
[0059] S7: Through The ROI area is divided into three areas by making a judgment. The method of dividing the ROI area into three areas is:
[0060]
[0061] S8: Solve the absolute phase according to the solved interlaced stripe order and the divided area. The method for solving the absolute phase is:
[0062] Φ(x,y)=[φ(x,y)+2πZ(x,y)]R1(x,y)+[φ(x,y)+2πk R (x,y)]R2(x,y)+[φ(x,y)+2π(Z(x,y)-1)]R3(x,y)
[0063] where φ(x,y) is the wrapping phase of the sinusoidal coding pattern.
[0064] Example 2
[0065] In this embodiment, based on the structured light three-dimensional measurement system and method constructed in Embodiment 1, further exploration and verification are performed on the structured light three-dimensional measurement system and method, and experiments are performed on objects with sudden changes in the surface. The specific process is as follows:
[0066] like Figure 3 As shown, the selected mutant objects consist of a sculpture, a turbine blade, and a section of standard railway track with a mutant surface:
[0067] First, a fringe projection system is constructed, which consists of a projector and a camera. The specific structure is as follows Figure 1 As shown, after the projector projects stripes on the target object, the camera captures the modulated pattern on the surface of the measured object. During the experimental measurement, the measurement platform is placed 500-600mm in front of the measured object.
[0068] Then, two representative phase analysis methods in coded structured light technology, namely Gray coding (abbreviated as GC) and phase coding (abbreviated as PC), are selected for encoding. In this embodiment, GC and PC are used for calculation of wrapped phase and fringe order, where GC uses a three-step phase shift method with a frequency of 57 to solve the wrapped phase and 7 binary fringes for phase unwrapping, while PC uses a three-step phase shift method with a frequency of 10 to solve the wrapped phase and 3 coded fringes for experiments. The gray code and phase coded modulated fringes captured by the camera are shown as follows: Figure 4 As shown in a and b;
[0069] Phase unwrapping is performed on the two methods to obtain the corresponding absolute phase. The absolute phase diagrams of GC and PC are shown as follows: Figure 5 As shown in a and b; then the captured edge portion that is prone to phase jump is processed using the correction method proposed by the present invention, and the corrected phases of the two methods are re-unfolded to obtain the corresponding corrected absolute phase and corrected fringe order.
[0070] Specifically, the fringe orders of GC and PC after correction processing by the method in this method are as follows: Figure 6 As shown in a and b, the absolute phases of GC and PC after correction by the method of the present invention are respectively as follows: Figure 7 As shown in a and b. Figure 5 It can be seen from Figures a and b that both the GC and PC methods are affected by the phase jump error, and it can be seen that there are more phase jump error points at the edge of the two figures. Figure 6 It can be seen that the jump points of the original fringe order of the two methods are successfully eliminated after correction, and the number of jump point errors is reduced. Figure 7 and Figure 5 It can be seen from the comparison that in the same area, the phase jump errors obtained by the two original methods have obvious improvement effects to a certain extent after the correction processing of the present invention. In summary, the results show that the method of the present invention has a strong ability to suppress the phase jump error when measuring objects with sudden surface changes.
[0071] Example 3
[0072] In this embodiment, an experiment is conducted on an object with complex textures. The selected measurement target is a statue with complex textures placed in front of the panel. Figure 8 As shown;
[0073] A fringe projection system as described in Example 2 is constructed, and Gray coding (abbreviated as GC) and phase coding (abbreviated as PC) are used to encode the measurement target, and then the absolute phases of the two methods are obtained through fringe projection and phase unwrapping. The absolute phase diagrams of GC and PC in this example are shown as follows: Fig. 9 As shown in a and b
[0074] Similarly, the captured part that is prone to phase jump is processed using the correction method proposed by the present invention, and the corrected phases of the two methods are re-unfolded to obtain the corrected absolute phase.
[0075] The absolute phases of GC and PC after correction by the method of the present invention are as follows: Fig.10 As shown in a and b. Fig.10 As can be seen from Figures a and b, both the GC and PC methods are affected by phase jump errors, and the PC method is more likely to produce decoding errors when measuring experimental objects with complex textures. Fig.10 It can be seen from the two figures that after the correction processing of this method, most of the phase jump errors have been corrected, and Fig. 9 Compared with the method in b, this method is less affected by the decoding error of the PC method. The above results show that the method in the present invention also has a strong ability to suppress phase jump errors when measuring objects with complex surface textures.
[0076] In summary, the two results of Example 2 and Example 3 show that the present invention can effectively suppress phase jump errors, it can more accurately reconstruct the mutation part of the object surface, and effectively improve the measurement accuracy; the method of the present invention is not only suitable for objects with smooth and simple surfaces, but can also effectively deal with objects with surface mutations and complex textures. It has strong adaptability and wide applicability. It realizes order self-increment and order noise removal through the existing grating, which can not only ensure the data accuracy of three-dimensional measurement, but also ensure the operation processing speed.
[0077] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described.
Claims
1. A coded structured light order correction algorithm based on self-incrementing order, characterized in that: The following steps are involved: S1: Build a structured light 3D measurement system consisting of a projection system and a camera; S2: Projecting the sinusoidal pattern and the phase-encoded pattern onto the object surface in the form of an image sequence; S3: The wrapped phase φ(x, y) of the sinusoidal pattern and the fringe order k(x, y) of the coded pattern are solved by the three-step phase shift method and the correlation decoding algorithm respectively; S4: By comparing the fringe modulation intensity b(x, y) with the region segmentation threshold T h (x, y) to obtain the ROI area, and then solve the wrapping phase in R(x, y) based on the regional segmentation and fringe order k R (x,y); S5: k is calculated by area threshold function R The small area noise points of (x, y) are eliminated to obtain k RZ (x, y); Next, find the position of the minimum phase point of each row within the order range, and finally obtain the phase mask M(x, y) by comparing the position size of each row; S6: Fringe order k RZ (x, y) and the phase mask M(x, y) are combined to obtain the staggered fringe order Z(x, y); S7: Through Make a judgment and divide the ROI area into three areas; S8: Solve the absolute phase according to the solved interlaced fringe order and the divided areas.
2. The coded structured light order correction algorithm based on self-incrementing order according to claim 1, characterized in that: In step S4, the wrapped phase in R(x,y) is solved and fringe order k R The method for (x,y) is: k R (x,y)=k(x,y)*R(x,y) Where b(x,y) is the modulation intensity of the grating, I i (i=1,2,3) is the intensity of the sinusoidal grating, T h is the threshold for region segmentation.
3. According to claim 2, a coded structured light order correction algorithm based on self-incrementing order is characterized in that: The method for obtaining the phase mask M(x, y) in S5 is: S5.1: Use binary area threshold algorithm to calculate k R The small area noise points of (x, y) are eliminated to obtain k RZ (x,y); S5.2: Traverse the corresponding k RZ The position of the phase minimum of each row in the (x, y) order range, such as the position of the j-th order is recorded as Make the row position within each order range greater than The area of is set to 1, and the other areas are set to 0; after traversing each order, the synthetic area mask M(x, y) is obtained.
4. The coded structured light order correction algorithm based on self-increasing order according to claim 1, characterized in that: In step S6, the fringe order k RZ The method of synthesizing the staggered fringe order Z(x,y) and the phase mask M(x,y) is as follows: The round[·] function is a rounding function.
5. The coded structured light order correction algorithm based on self-incrementing order according to claim 1, characterized in that: In step S7, by The method for making judgments and then dividing the ROI area into three areas is:
6. The coded structured light order correction algorithm based on self-increasing order according to claim 1, characterized in that: In step S8, the method for solving the absolute phase according to the solved interlaced fringe order and the divided areas is: Φ(x,y)=[φ(x,y)+2πZ(x,y)]R1(x,y)+[φ(x,y)+2πk R (x,y)]R2(x,y)+[φ(x,y)+2π(Z(x,y)-1)]R3(x,y) where φ(x,y) is the wrapping phase of the sinusoidal coding pattern.
7. The coded structured light order correction algorithm based on self-incrementing order according to claim 1, characterized in that: The structured light three-dimensional measurement system comprises an industrial CCD camera, a structured light projection system and a computer system. The industrial CCD camera and the structured light projection system are both communicatively connected with the computer system.
Citation Information
Patent Citations
Hand-held comfort and stationarity tester for train
CN101526427A
Phase unwrapping method based on malposition fringes in three-dimensional scanning system
CN101650164A
Physical parameter estimation method, device and electronic equipment
CN106092158A
Three-dimensional morphology visual measurement method and system based on speckle embedded phase shift stripes
CN111473744A
Dislocation composite coding method applied to structured light high-speed accurate measurement
CN116358444A