A fringe pattern design method for nonlinear correction of structured light projection
By encoding and superposing black and white stripe patterns, combined with binary encoding and phase shifting technology, high-quality sinusoidal stripes that do not require nonlinear correction and defocus are generated, solving the problem of nonlinear errors in optical three-dimensional measurement and improving measurement efficiency. accuracy and reduced hardware limitations.
Patent Information
- Application Number
- CN202111412041.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-11-25
AI Technical Summary
In existing optical three-dimensional measurement technology, the gamma effect of the projector causes nonlinear errors in the collected fringe images, making it difficult to ensure the accuracy and quality of the measurement results. Moreover, existing correction methods require nonlinear correction or defocusing of the equipment in advance. Limits hardware performance and measurement accuracy.
A stripe pattern design method for nonlinear correction of structured light projection is adopted. By encoding and superposing several black and white stripe patterns to make them consistent with the sinusoidal phase shift pattern, black and white coded stripes that do not need to be corrected in advance are generated, using binary values. The combination of encoding and phase-shifting technology avoids defocusing operations and directly generates high-quality sinusoidal stripes.
It realizes structured light projection without advance nonlinear correction and defocus function, reduces hardware limitations, avoids stripe contrast reduction and edge jump problems caused by defocus operation, and improves measurement accuracy and quality.
Smart Images

Figure CN114170345B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical measurement, and in particular, relates to a fringe pattern design method for nonlinear correction of structured light projection. Background Art
[0002] Optical 3D measurement technology is of great significance in modern measurement. Among many 3D measurement technologies, fringe projection profilometry has the advantages of simple structure, high precision, high speed, low cost, and easy implementation. It is widely used in industry and scientific research. By projecting fringes onto the surface of the object to be measured, the camera collects and analyzes the highly modulated image of the object surface, and measures the 3D surface data of the object. Due to the gamma effect of common projectors on the market, the fringes collected have nonlinear errors. If the nonlinear problem of projection is not avoided and corrected, the accuracy and quality of the measurement results are difficult to guarantee.
[0003] Many studies have proposed methods to correct nonlinear problems and conducted corresponding experiments to prove the effectiveness of these methods. Zhang compared the effects of active and passive projection nonlinear gamma compensation methods on reducing phase error (Zhang, Song. Comparative study on passive and active projector nonlinear gamma calibration [J]. Applied Optics, 2015, 54 (13): 3834-3841.). The active method ensures the sinusoidality of the fringe by correcting the fringe pattern before projection, while the passive method compensates for the phase error after capturing the modulated sinusoidal fringe. The results show the difference between the two methods and provide a reference for correcting nonlinear problems. Inspired by the application of artificial intelligence in optical imaging, Feng et al. proposed a correction method based on deep learning (Feng S, Zuo C, Zhang L, et al. Generalized framework for non-sinusoidal fringe analysis using deep learning [J]. Photonics Research: English Edition, 9 (6): 15.). The deep learning technology proposed in this method can analyze the factors and image data that cause non-sinusoidal shapes. Through a well-trained deep neural network, the phase errors caused by various non-sinusoidal patterns are effectively suppressed. Using binary fringes for projection measurement can actively avoid the gamma effect of the projector, but the direct projection of binary fringes has high-order harmonics and is not suitable for direct measurement. Lei et al. proposed a binary square wave defocusing technology (Squared Binary Defocusing Method, SBM), which defocuses the binary fringes to a certain extent, effectively filters out the high-order harmonics in the light field, and obtains high-quality sinusoidal fringes (Lei S, Zhang S. Flexible 3-D shape measurement using projector defocusing [J]. Optics Letters, 2009, 34 (20): 3080-2.). This technology has laid the foundation for the defocused three-dimensional measurement method. Today, binary defocusing technology has been widely used in the field of three-dimensional measurement. Ayubi et al.
[12] proposed a method of obtaining sinusoidal stripes using one-dimensional modulation defocusing technology using sinusoidal pulse width modulation (SPWM).By adding a carrier frequency to the sinusoidal signal and limiting its amplitude, the sinusoidal stripes can be slightly defocused to obtain binary stripes (Pulse-width modulation indefocused three-dimensional fringe projection [J]. Optics Letters, 2010, 35 (21): 3682-3684.). Subsequently, William Lohry et al. proposed a two-dimensional area modulation technique. When the projector is not fully focused, the local 2×2 pixels are modulated to create five grayscale values to improve the quality of the stripes. Using this two-dimensional modulation technique, when the stripe pattern is dense and the projector is almost focused, the phase error can be greatly reduced (Lohry W, Song Z. 3D shape measurement with 2D area modulated binary patterns [J]. Optics and Lasers in Engineering, 2012, 50 (7): 917–921.). Although three-dimensional measurement through defocusing technology can reduce phase errors, it will also reduce the contrast of the stripes and increase the error of stripe edge jumps during phase resolution. Summary of the invention
[0004] Purpose of the invention: The present invention proposes a stripe pattern design method for nonlinear correction of structured light projection, which does not require advance nonlinear correction of the projection device, does not require the device to have a defocus function, and does not require a defocus operation, thereby solving the problem of hardware limitations and the effects of reduced stripe contrast and aggravated stripe edge jumps during defocusing caused by defocus operations.
[0005] Technical solution: To achieve the purpose of the present invention, the technical solution adopted by the present invention is: a fringe pattern design method for nonlinear correction of structured light projection, comprising the following steps:
[0006] Step 1: Encode several black and white stripe patterns according to the light intensity change within one cycle of the standard N-step sinusoidal phase-shifted stripes;
[0007] Step 2: Perform a superposition operation on the coded black and white stripe pattern so that the pattern formed after the operation is consistent with the sinusoidal phase shift pattern;
[0008] Step 3: Analyze the relationship between the resolution of the image data collected by the camera and the resolution of the projector projection pattern, adjust the coded stripes and the distance of the camera collecting image data, and determine the unit pixel width of each black and white stripe;
[0009] Step 4: Generate black and white coded stripes corresponding to N-step sinusoidal phase-shifted stripes according to the unit pixel width of each black and white stripe determined in step 3.
[0010] Preferably, in step 1, the black and white stripe pattern encoding process is as follows:
[0011] The leftmost stripe of the first cycle of the first black-and-white coding pattern is black, and the stripe connected to it is white; the last stripe of the first cycle of the first black-and-white coding pattern is white, and the remaining middle stripes of the first cycle are all black; the stripes of the remaining cycles of the first black-and-white coding pattern are realized by overall displacement of the stripes of the first cycle;
[0012] The first period of the i-th black-and-white coded pattern is achieved by shifting the white stripe at the left end of the first period of the i-1-th black-and-white coded pattern by one unit distance to the right and the white stripe at the right end by one unit distance to the left. The stripes of the remaining periods of the i-th black-and-white coded pattern are achieved by overall displacement of the stripes of the first period.
[0013] Preferably, in step 2, the superposition operation process of the black and white stripe coding is described as follows:
[0014]
[0015] Where I is the obtained fringe image, m is the number of images required to design a fringe image, I n is the coded black and white stripe image, n is the serial number of the coded pattern, I b A completely black image.
[0016] Preferably, in step three, the distance at which the camera collects image data is adjusted so that the lateral distance of the projection pattern is completely captured by the camera.
[0017] Preferably, in step 3, the unit pixel width of the black and white stripes is described as:
[0018]
[0019] Where W is the unit pixel width of the designed black and white stripes, W p is the lateral resolution of the projector, T is the reference sinusoidal phase-shifted fringe period, and m is the number of images required to form a fringe image.
[0020] Preferably, in step 3, the lateral resolution of the acquired image is described as:
[0021]
[0022] Among them, W c is the lateral resolution of the image collected by the designed camera, W p is the lateral resolution of the projector, and W is the unit pixel width of the designed black and white stripes.
[0023] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0024] The present invention is based on the proposed fringe pattern design method for nonlinear correction of structured light projection, which does not require the projection device to be nonlinearly corrected in advance, does not require the device to have a defocusing function, and is less restricted by hardware. Furthermore, since there is no need to perform a defocusing operation, there will be no reduction in fringe contrast and an increase in the effect of fringe edge jumps during de-phase due to the defocusing operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0026] Figure 2 It is a black and white coded stripe pattern of an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of a periodic black and white coded image superposition processing principle of an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of obtaining a sinusoidal fringe image from a black and white coded image according to an embodiment of the present invention;
[0029] Figure 5 Schematic diagram of stripe unit width according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] The fringe pattern design method for nonlinear correction of structured light projection according to the present invention has the following process: Figure 1, the coding strategy combining binary coding and phase shift technology is adopted, and the three-dimensional measurement using binary stripes can avoid the nonlinearity of the structured light system. At the same time, referring to the N-step sinusoidal phase shift stripe pattern, the light intensity change within one cycle of the sinusoidal stripe is analyzed, and several black and white stripes are encoded, so that the pattern composed of the encoded black and white stripes after a series of superposition operations is basically consistent with the sinusoidal phase shift pattern. Considering that the data calculation using the pattern composed of superposition operations is likely to cause the calculated data to be discrete, the relationship between the resolution of the image data collected by the camera and the resolution of the projector projection pattern is analyzed, and the distance between the encoded stripes and the camera to collect the image data is adjusted to ensure that the data of each pixel obtained is unique. Based on the proposed stripe pattern design method for nonlinear correction of structured light projection, the projection equipment does not need to have a defocus function, and is less restricted by hardware. And because there is no need to perform a defocus operation, it will not cause the defocus operation to reduce the contrast of the stripes and increase the effect of the edge jump of the stripes during phase resolution.
[0032] The standard N-step phase-shifted fringe pattern can be described as:
[0033] I n =A(x,y)+B(x,y)cos[φ(x,y)+2kπ / N]
[0034] (n=1,2,...,N)
[0035] Among them, I n represents the nth image, A(x, y) is the background light intensity, B(x, y) is the object surface reflectivity, φ(x, y) is the designed phase value, k is an arbitrary integer, and N represents N-step phase shift.
[0036] The fringe pattern design method for nonlinear correction of structured light projection according to the present invention comprises the following steps:
[0037] Step 1: Encode several black and white stripe patterns according to the light intensity variation within one cycle of the standard N-step sinusoidal phase-shifted stripes.
[0038] This embodiment uses 8 black and white coding patterns to obtain sinusoidal fringes (the required number of phase shift patterns is determined according to the actual number of displacement steps, for example: 4-step phase shift requires 32 black and white coding patterns). Figure 2The following are two cycles of coding patterns. The light intensity of a cycle of the reference sinusoidal stripes increases from low to high and then from high to low. Therefore, the leftmost stripe of the first cycle of the first black and white coding pattern is black, and then the light intensity increases, and the stripes following it are white; due to the symmetry of a cycle of sinusoidal stripes, the stripes at the end of the first cycle of the first black and white coding pattern are also white; the remaining middle stripes of the first cycle are black. The remaining several cycles of stripes are realized by displacement. In the first cycle of the second black and white coding pattern, the white stripes at the left end of the first cycle of the first black and white coding pattern are shifted to the right by one unit, and the white stripes at the right end of the first cycle are shifted to the left by one unit. The stripe patterns of the remaining cycles of the second black and white coding pattern are similarly realized by displacement. The subsequent 6 patterns are analogous to the above method to form 8 stripes. In the constructed 8 images, black represents 0 and white represents 1. It can be seen that the column vectors composed in half a cycle are linearly independent, which is convenient for subsequent calculations.
[0039] Step 2: If Figure 3-4 As shown, multiple black and white patterns are used to form a pattern similar to sinusoidal stripes: for the eight collected patterns and one completely black pattern, the sinusoidal stripes are obtained according to the following processing:
[0040]
[0041] Where I is the obtained sinusoidal fringe image, I1~I8 are the encoded black and white fringe images, and the digital subscript is the serial number of the encoded pattern. b A completely black image.
[0042] Step 3: The distance at which the camera collects image data is adjusted to determine the unit pixel width of each black and white stripe.
[0043] The lateral distance of the projected pattern needs to be completely captured by the camera, and the unit pixel width of the black and white stripes is designed to be:
[0044]
[0045] Where W is the unit pixel width of the designed black and white stripes, W p is the lateral resolution of the projector, T is the reference sinusoidal phase-shifted fringe period, and m is the number of images required to form a fringe image.
[0046] In this embodiment, the lateral resolution data for generating a projection pattern is designed to be 1024, and the stripe period is 32, so there are 32 lateral data in one period. Since the number of black and white superimposed patterns is designed to be 8, the 8 images are superimposed together to form at most 8 linearly independent column vectors to combine into stripes of different grayscales. Using the symmetry from high to low and from low to high in the period of similar sinusoidal stripes, only 16 data out of the 32 data in one period of black and white coded stripes need to be designed. Since 8 images can only form 8 different grayscale levels, each two data in the 16 data designed for the projection image are assigned one grayscale level, so the unit width of the stripe is two pixels, such as Figure 5 shown.
[0047] In order to make the data of each pixel of the acquired image unique, the lateral resolution of the acquired image can be described as:
[0048]
[0049] Among them, W c is the lateral resolution of the image collected by the designed camera, W p is the lateral resolution of the projector, and W is the unit pixel width of the designed black and white stripes.
[0050] Therefore, in the embodiment, one pixel of the image captured by the camera should contain at least two projection data, and the lateral resolution of the image captured by the camera should be less than 1024 / 2, that is, 512 pixels.
[0051] Step 4: Generate black and white coded stripes corresponding to N-step sinusoidal phase-shifted stripes according to the unit pixel width of each black and white stripe determined in step 3.
[0052] Based on the above steps, the proposed fringe pattern design method for nonlinear correction of structured light projection does not require nonlinear correction of the projection device in advance, does not require the device to have a defocus function, and is less restricted by hardware. In addition, since there is no need for a defocus operation, the defocus operation will not reduce the fringe contrast and aggravate the effect of fringe edge jump during de-phase.
[0053] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A fringe pattern design method for nonlinear correction of structured light projection, characterized by: include: Step 1: Encode several black and white stripe patterns according to the light intensity change within one cycle of the standard N-step sinusoidal phase-shifted stripes; Step 2: Perform a superposition operation on the coded black and white stripe pattern so that the pattern formed after the operation is consistent with the sinusoidal phase shift pattern; Step 3: Analyze the relationship between the resolution of the image data collected by the camera and the resolution of the projector projection pattern, adjust the coded stripes and the distance of the camera collecting image data, and determine the unit pixel width of each black and white stripe; Step 4: Generate black and white coded stripes corresponding to N-step sinusoidal phase-shifted stripes according to the unit pixel width of each black and white stripe determined in step 3.
2. The stripe pattern design method according to claim 1, characterized in that: In step 1, the black and white stripe pattern encoding process is as follows: The leftmost stripe of the first cycle of the first black-and-white coding pattern is black, and the stripe connected to it is white; the last stripe of the first cycle of the first black-and-white coding pattern is white, and the remaining middle stripes of the first cycle are all black; the stripes of the remaining cycles of the first black-and-white coding pattern are realized by overall displacement of the stripes of the first cycle; The first period of the i-th black-and-white coded pattern is achieved by shifting the white stripe at the left end of the first period of the i-1-th black-and-white coded pattern by one unit distance to the right and the white stripe at the right end by one unit distance to the left. The stripes of the remaining periods of the i-th black-and-white coded pattern are achieved by overall displacement of the stripes of the first period.
3. The stripe pattern design method according to claim 1 or 2, characterized in that: In step 2, the superposition operation process of the black and white stripe coding is described as follows: Where I is the obtained fringe image, m is the number of images required to design a fringe image, I n is the coded black and white stripe image, n is the serial number of the coded pattern, I b A completely black image.
4. The stripe pattern design method according to claim 1, characterized in that: In step three, the distance at which the camera collects image data is adjusted so that the lateral distance of the projection pattern is completely captured by the camera.
5. The stripe pattern design method according to claim 1 or 4, characterized in that: In step 3, the unit pixel width of the black and white stripes is described as: Where W is the unit pixel width of the designed black and white stripes, W p is the lateral resolution of the projector, T is the reference sinusoidal phase-shifted fringe period, and m is the number of images required to form a fringe image.
6. The stripe pattern design method according to claim 5, characterized in that: In step 3, the lateral resolution of the acquired image is described as: Among them, W c is the lateral resolution of the image collected by the designed camera, W p is the lateral resolution of the projector, and W is the unit pixel width of the designed black and white stripes.
