High-precision phase decoding method and system of structured light three-dimensional measurement system
Through technical means, the construction of m groups of n-step parallel shifted sinusoidal grating coding patterns and Gray code grating coding patterns and the probability consistent averaging method are adopted. Through the construction method, the technical problems existing in the existing technology are solved, the technical problems existing in the existing technology are solved, and the technical problems in the field of structured light measurement with high precision are achieved, thereby improving the technical application in the technical field of measurement.
Patent Information
- Application Number
- CN202510988592.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-21
AI Technical Summary
In existing three-dimensional measurement systems, phase errors caused by factors such as component nonlinear response and dark current affect the accuracy of measurement results. Existing methods are complex to operate or costly, making them difficult to be widely used.
The phase decoding results are optimized by constructing m groups of n-step phase-shifted sinusoidal grating coding patterns and Gray code grating coding patterns, combining the probability consistent averaging method, group misalignment measurement and probability error compensation.
It effectively suppresses the phase error caused by nonlinear response and random dark current, improves the accuracy and stability of the measurement system, simplifies the operation process, reduces computing resource consumption, and achieves higher technical means.
Smart Images

Figure CN120820067A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional measurement technology, and in particular to a high-precision phase decoding method and system for a structured light three-dimensional measurement system. Background Art
[0002] In modern manufacturing, cultural heritage protection, biomedicine, and scientific research, structured light three-dimensional measurement technology is widely used due to its high precision and non-contact advantages. This technology usually uses a special light source to project a preset pattern (i.e., structured light) onto the target object, and by analyzing the light pattern displayed on the surface of the object captured by the camera system, it measures the detailed information of the object, thereby further reconstructing the three-dimensional surface morphology of the object. However, the accuracy of this measurement technology is often affected by the response characteristics of each component in the measurement system. For example, in a system that uses optical components to project coded structured light, the projected fringe pattern may deviate from the ideal periodic pattern due to the gamma nonlinear characteristics of the components. The camera lens and photosensitive array may also cause the fringe pattern to be distorted in the image. The dark current in the electronic device will cause the pixel value of a specific position in the image to fluctuate within a certain range. These factors introduce errors in the phase calculation, thereby affecting the accuracy of the measurement results.
[0003] Existing technologies generally address this problem through software correction methods and hardware improvements, such as adjusting the gamma settings of the light projection components or using cameras with high dynamic range. These methods are either complex to operate, requiring frequent maintenance and calibration, or are too costly to be widely applicable. Furthermore, while existing phase unwrapping techniques can effectively process continuous phase images, they often require additional processing steps or more complex algorithms when processing images containing numerous jumps or faults. This not only increases computing resource consumption but also prolongs processing time. For example, Chinese invention patent application publication number CN110230994A, "A Method for Correcting Phase Measurement Errors Using a Grating Image Phase Shifting Method Based on Image Point Traceability," utilizes image point traceability mapping relationships in the reverse direction of the optical path, enabling known, error-free ideal phase information encoded in a computer to be directly used to correct the erroneous phase information obtained from disturbed captured images. In practical application, this method requires significant software modifications and may also involve hardware modifications or the need to rebuild the hardware.
[0004] Therefore, a new phase decoding method is needed that can not only effectively solve the phase error caused by nonlinear response and dark current of measurement system components, improve the precision and accuracy of the three-dimensional measurement system, but also simplify the operation process and reduce computing resource consumption. Summary of the Invention
[0005] The technical problem to be solved by the present invention is how to solve the phase error problem caused by nonlinear response of components and random dark current in a three-dimensional measurement system.
[0006] The present invention solves the above technical problems through the following technical solutions: a high-precision phase decoding method for a structured light three-dimensional measurement system, the method comprising:
[0007] S1. Construct m groups of structured light patterns: construct m groups of n-step phase-shifted sinusoidal grating coding patterns and corresponding Gray code grating coding patterns;
[0008] S2, projecting m groups of n-step phase-shifted sinusoidal structured light patterns and Gray code structured light patterns onto the object to be measured, capturing the scene after each projection, and obtaining corresponding structured light projection images;
[0009] S3, performing a phase decoding calculation on each set of structured light projection images to obtain an absolute phase;
[0010] S4. Perform probability uniform averaging on the m groups of absolute phases to obtain an optimized phase decoding result.
[0011] Beneficial effects: The present invention adopts phase-shifted sinusoidal encoding and Gray code structured light, uses Gray code to assist the phase decoding of the phase-shifted sinusoidal grating image, obtains the absolute phase containing phase information and period information, adopts the probability consistent averaging method to average the results of m measurements, optimizes the absolute phase, and obtains a more accurate phase estimation value. Through group staggered measurement and probabilistic error compensation, the phase error caused by the nonlinear response of each component and random dark current is suppressed, which can effectively compensate for the nonlinear response and random error in the measurement system, obtain high-precision periodic phase decoding, improve the phase estimation accuracy, and thus effectively improve the measurement accuracy and measurement stability of the system.
[0012] Preferably, the method of constructing m groups of n-step phase-shifted sinusoidal grating coding patterns includes: first constructing m*n-step phase-shifted sinusoidal grating patterns, and then dividing them into m groups of n-step phase-shifted sinusoidal grating patterns, or directly constructing m groups of n-step phase-shifted sinusoidal grating patterns by group.
[0013] Beneficial effects: The present invention provides two methods for constructing m groups of n-step phase-shifted sinusoidal grating coding patterns. First, an m*n-step phase-shifted sinusoidal grating pattern is constructed, and then divided into m groups of n-step phase-shifted sinusoidal grating patterns. All patterns can be generated and saved at one time, and directly read when used, which can save calculation time; and one group of sinusoidal grating patterns is generated each time and its projection image is obtained for calculation and repeated m times. The storage space of a group of sinusoidal grating patterns and images can be reused.
[0014] Preferably, when an m*n-step phase-shifted sinusoidal grating pattern is first constructed and then divided into m groups of n-step phase-shifted sinusoidal grating patterns, the value Y of the k-th pattern at the x-th pixel position is k The expression of (x) is:
[0015]
[0016] When constructing m groups of n-step phase-shifted sinusoidal grating patterns directly, the value Y of the pattern of the b-th step in the a-th group at the x-th pixel position is a,b The expression of (x) is:
[0017]
[0018] Among them, V max is the maximum pixel value in the set pattern, V min is the minimum pixel value in the pattern, and T is the number of pixels occupied by each sine cycle.
[0019] Preferably, the kth pattern Y k (x) and pattern Y of step b of group a a,b The conversion method between (x) is:
[0020]
[0021] k=(b-1)m+a
[0022] Among them, % represents the modular operation, which refers to the remainder obtained by dividing the number before the symbol by the number after the symbol. Indicates a round-up operation, and its value is the smallest integer not less than the number within the symbol.
[0023] Preferably, the process of constructing the corresponding Gray code grating encoding pattern includes:
[0024] Generate and record the required number of bits, i.e., the Gray code of L bits and its corresponding code sequence, a total of 2 L code words, the code sequence is 1 to 2 L , and set the corresponding relationship between pattern numbers 1 to L and Gray code bits 1 to L;
[0025] The generated Gray code is expanded bit by bit in sequence as the basis for filling the pixel values in the pattern. If the code bit value is 0, the pixel value V0 is filled in the corresponding position in the pattern. V0 is taken as 0 or the minimum pixel value V in the set pattern. min , the code value is 1, fill the corresponding position in the pattern with pixel value V1, V1 is taken as 255 or V max , V max The maximum pixel value in the set pattern.
[0026] Preferably, the method for expanding the Gray code bit by bit in sequence adopts a row sorting method or a column sorting method, and the pattern pixel value filling adopts method one or method two, wherein method one is: each pattern is generated serially in sequence, each pattern first generates a basic pattern in its grating arrangement direction, and then the basic pattern is copied in the grating direction; method two is: each pattern is generated in parallel, and the filling value corresponding to each bit of each code word is filled into the image position corresponding to each code bit according to the Gray code sequence.
[0027] Preferably, step S3 includes:
[0028] Represent the sinusoidal structured light projection image as a function of a specific position, and solve the truncated phase of each set of sinusoidal structured light projection images at the pixel position (x, y);
[0029] Using the Gray code structured light projection information at the pixel position, the sine cycle number of the pixel position (x, y) is obtained;
[0030] Combine the truncated phase of the pixel position (x, y) with the sine cycle number to obtain the absolute phase of the pixel position (x, y).
[0031] Beneficial effects: The present invention utilizes the characteristic that any two adjacent codes of Gray code differ by only one binary number. Gray code structured light gives each sinusoidal period a unique code, which can solve the problem of period jump.
[0032] Preferably, the absolute phase Φ of the pixel position (x, y) a The formula for (x,y) is:
[0033]
[0034] in, is the truncated phase of the ath group at the pixel position (x,y), s(x,y) is the sine cycle number of the pixel position (x,y), and (x,y) represents the pixel at the xth column and yth row in the image.
[0035] Preferably, the process of performing probabilistic uniform averaging on the m groups of absolute phases includes:
[0036] Set error conditions and calculation termination conditions. The error conditions include one or both of the threshold value τ of the degree to which data points are allowed to deviate from the mean and the mean estimation accuracy ε. The calculation termination conditions include one or more of the maximum number of loop calculations l, the mean estimation accuracy ε, and the minimum number of samples D involved in the mean calculation.
[0037] Calculate the average of each number in the valid number set and compare it with the error condition and calculation termination condition. Eliminate data that exceeds the threshold of the deviation from the average. Repeat the calculation until the error condition or calculation termination condition is met. The average obtained by the last calculation is used as the optimized phase decoding result.
[0038] Beneficial effects: The random and nonlinear errors at a certain point can be modeled using Gaussian distribution. The present invention takes random factors into account during the measurement process, adopts a probability uniform averaging method, and combines the periodic characteristics of sinusoidal structured light to effectively reduce errors, eliminate low-order harmonic errors, and obtain accurate phase estimation results, thereby achieving high-precision phase decoding.
[0039] The present invention also provides a high-precision phase decoding system for a structured light three-dimensional measurement system, the system comprising:
[0040] A structured light pattern construction unit, configured to construct m groups of structured light patterns: constructing m groups of n-step phase-shifted sinusoidal grating coding patterns and corresponding Gray code grating coding patterns;
[0041] a structured light projection image acquisition unit, configured to project m groups of n-step phase-shifted sinusoidal structured light patterns and a Gray code structured light pattern onto the object under test, capture the scene after each projection, and obtain the corresponding structured light projection image;
[0042] A phase decoding calculation unit is used to perform a phase decoding calculation on each set of structured light projection images to obtain an absolute phase;
[0043] The optimization unit is used to perform probability uniform averaging on the m groups of absolute phases to obtain an optimized phase decoding result. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Flowchart of a high-precision phase decoding method for a structured light three-dimensional measurement system provided in Example 1 of the present invention;
[0045] FIG2( a ) shows the values of the first group of two groups of sinusoidal grating patterns in Example 3 of the present invention;
[0046] FIG2( b ) shows the values of the second group of the two groups of sinusoidal grating patterns in Example 3 of the present invention;
[0047] Figure 3 These are two sets of sinusoidal grating coded projection images captured in Example 3 of the present invention;
[0048] Figure 4 is the value of the 5-bit Gray code grating pattern in Example 3 of the present invention;
[0049] Figure 5 The 5-bit Gray code grating encoded projection image obtained by shooting in Example 3 of the present invention;
[0050] Figure 6 In the high-precision phase decoding method for a structured light 3D measurement system provided in Example 1 of the present invention, taking the threshold τ for the degree to which a data point deviates from the mean as 1 standard deviation as an example, the changes in the set of valid numbers and the comparison of the values during the calculation process of the probabilistic uniform averaging method are shown;
[0051] Figure 7 In the high-precision phase decoding method for a structured light 3D measurement system provided in Example 1 of the present invention, taking the threshold τ for the degree to which data points are allowed to deviate from the mean as a fixed value of 0.1 as an example, the changes in the set of valid numbers and the comparison of the values during the calculation process of the probabilistic consistent averaging method are shown;
[0052] Figure 8 Schematic diagram of a high-precision phase decoding system for a structured light three-dimensional measurement system provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0053] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the following describes the technical solutions of the present invention clearly and completely with reference to specific embodiments and the accompanying drawings. It is obvious that the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0054] Example 1
[0055] See also Figure 1 This embodiment provides a high-precision phase decoding method for a structured light 3D measurement system, including the following steps:
[0056] Step 1: Construct m groups of structured light patterns: construct m groups of n-step phase-shifted sinusoidal grating coding patterns and corresponding Gray code grating coding patterns, where m is greater than or equal to 2, n is greater than or equal to 2, and n is usually greater than or equal to 3.
[0057] Using a sinusoidal grating pattern, the position of the object surface can be represented by a phase, and phase encoding and decoding can be performed in the range of 0 to 2π (equivalent to -π to π); using a Gray code grating pattern, the period numbers of multiple sinusoidal periods can be encoded and decoded; therefore, using a phase-shifted sinusoidal grating pattern of multiple periods assisted by a Gray code grating pattern, the position of the object surface can be phase encoded and decoded using values greater than 2π, that is, encoding and decoding of phase and period numbers in multiple ranges of 0 to 2π, and the combination of phase and period number is called absolute phase.
[0058] The coded structured light pattern in this invention can use either vertical or horizontal stripes. Generally, when the width is greater than the height, vertical stripes are recommended to achieve more repeat periods within the same pattern unit size. The pixel values in the pattern can be grayscale or color. Generally, grayscale pixel values are more computationally efficient, while color pixel values yield richer information.
[0059] Each structured light pattern has the same size, with its width being w pixels and height being h pixels. If the sinusoidal grating pattern is divided into t sinusoidal periods by width, where t is generally a power of 2, then when vertical stripes are used, there are T = w / t pixels in each period, and when horizontal stripes are used, there are T = h / t pixels in each period.
[0060] Step 1.1: Construct an m*n-step phase-shifted sinusoidal grating coding pattern, with a total of m*n patterns, and divide them into m groups of n-step phase-shifted sinusoidal grating coding patterns with equal spacing. Specifically, there are two equivalent construction methods:
[0061] The first method is to construct an m*n-step phase-shifted sinusoidal grating pattern first, and then divide it into m groups of n-step phase-shifted sinusoidal grating patterns. k is the kth pattern, 1≤k≤m·n, Y k (x) represents the value of the k-th pattern at the x-th pixel position. When using vertical stripes, 1≤x≤w, when using horizontal stripes, 1≤x≤h; let V max is the maximum pixel value in the set pattern, V min is the minimum pixel value in the pattern, Y k The specific construction formula of (x) is conventionally expressed using the cosine function as follows:
[0062]
[0063] Then, according to the order of pattern numbers from 1 to m*n, m patterns are taken each time and sequentially used as one of the patterns in groups 1 to m, and this is done n times in total to complete the grouping.
[0064] The second method is to construct m groups of n-step phase-shifted sinusoidal grating patterns directly. a,b is the pattern of step b in group a, 1≤a≤m, 1≤b≤n, Y a,b (x) represents the value of the pattern of the bth step in the ath group at the xth pixel position. When using vertical stripes, 1≤x≤w, and when using horizontal stripes, 1≤x≤h. Similarly, let V max is the maximum pixel value in the set pattern, V min is the minimum pixel value in the pattern, Y a,b The specific construction formula of (x) is as follows:
[0065]
[0066] The above two methods can be equivalently converted using the following formula. If the kth pattern corresponds to the bth step pattern of the ath group, then:
[0067]
[0068] k=(b-1)m+a (4)
[0069] In formula (3), Indicates the transition from the kth pattern to the bth pattern of the ath group. The symbol "%" indicates the modulo operation, which means the remainder obtained by dividing the number before the symbol by the number after the symbol. Indicates the rounding operation, and its value is the smallest integer not less than the number within the symbol; in formula (4), Indicates the transition from the b-th step pattern in the a-th group to the k-th pattern.
[0070] In addition, in order to ensure the distinction between adjacent pixels in the pattern and thus ensure the phase decoding accuracy, V max Should take a sufficiently large value, V min It should be a sufficiently small value. For example, when the pattern pixel value is expressed using 1-byte (8-bit) grayscale, V max The value should be no less than 200, and it is recommended to take the maximum value of 255. min The value should not exceed 50. It is recommended to directly take the minimum value 0.
[0071] Step 1.2: Construct a corresponding Gray code grating encoding pattern to encode and decode t periods.
[0072] Gray code is a special binary code in which the values of any two adjacent codes differ by only one bit, and the values of the first code and the last code (or the minimum number and the maximum number) differ by only one bit.
[0073] Constructing a Gray code pattern is to use several binary patterns of the same size and in order to form a Gray code pattern. Each pattern represents the corresponding code position in the Gray code in order, and the combination of the values of each pattern at the same pixel position constitutes the Gray code of the pixel position. Generally speaking, if you need to encode 1~t, you need at least binary code bits ( Indicates rounding up operation); when t is a power of 2,
[0074] When the sinusoidal grating pattern is assumed to contain t sinusoidal periods, the number of Gray code bits required by the different phase decoding algorithms used is recorded as L, and the corresponding number of L Gray code patterns is constructed (specifically, some phase decoding algorithms only need to use Gray code pattern of bits, i.e. Other phase decoding algorithms also require an additional bit of coding to assist, namely For the sake of distinction, we will refer to Gray codes that increase the number of bits by one as raised-order Gray codes, and Gray codes that do not increase the number of bits as equal-order Gray codes. The general construction method of Gray code patterns is:
[0075] Step 1.2.1. Generate and record the required number of bits, i.e., the Gray code of L bits and its corresponding code sequence. There are 2 L code words, the code sequence is 1 to 2 L , and set the corresponding relationship between pattern numbers 1 to L and Gray code bits 1 to L (specifically, the pattern numbers 1 to L can be made to correspond one-to-one with the Gray code from the lowest bit 1 to the highest bit L, or the pattern numbers 1 to L can be made to correspond one-to-one with the Gray code from the highest bit L to the lowest bit 1), and set the pixel values V0 and V1 corresponding to 0 and 1 of the binary pattern respectively.
[0076] Generally speaking, V0 can be 0 or the minimum value V of the sinusoidal grating pattern. min The same value, V1 can be 255 or the maximum value V of the sinusoidal grating pattern max Same value.
[0077] Step 1.2.2: Expand the generated Gray code bit by bit in order as the basis for filling the pixel values in the pattern. If the code bit value is 0, fill the corresponding position in the pattern with pixel value 0; if the code bit value is 1, fill the corresponding position in the pattern with pixel value V. max If you need to construct If the equal-order Gray code pattern of the bit is constructed, each code bit occupies R = T consecutive pixels in turn; If the raised-order Gray code pattern is a 1-bit pattern, each code bit occupies R=T / 2 consecutive pixels in sequence, where T is the number of pixels occupied by each sine cycle.
[0078] Among them, there are two specific methods for expanding the Gray code bit by bit in sequence: row sorting method and column sorting method, which are essentially equivalent: the row sorting method expands the Gray code into a 2 L A matrix with L rows and columns, the pth row (1≤p≤2 L ) represents the p-th code sequence of the Gray code, and the q-th column (1≤q≤L) represents the q-th bit or the L-q+1-th bit of the Gray code according to the previously set correspondence between the pattern number and the Gray code bit in the order or reverse order, that is, the corresponding q-th frame or the L-q+1-th frame of the Gray code pattern.
[0079] Expand the Gray code into an L-row 2 L Column matrix, the pth column (1≤p≤2 L ) represents the p-th code sequence of the Gray code, and the q-th row (1≤q≤L) represents the q-th bit or the L-q+1-th bit of the Gray code according to the previously set correspondence between the pattern number and the Gray code bit in the order or reverse order, that is, the corresponding q-th frame or the L-q+1-th frame of the Gray code pattern.
[0080] Among them, there are two equivalent ways to fill the pattern pixel value:
[0081] In the first method, each pattern is generated serially. For each pattern, a basic pattern in the grating arrangement direction is first generated, and then the basic pattern is copied in the grating direction. That is, if vertical stripes are used, the first row of the pattern is generated and then copied to the remaining rows of the pattern. If horizontal stripes are used, the first column of the pattern is generated and then copied to the remaining columns of the pattern. More specifically, the basic pattern of the qth image is to sequentially replace the elements of the column or row corresponding to the qth or L-q+1th bit of the Gray code in the Gray code expansion matrix with the corresponding pixel values of each pattern (that is, the V corresponding to 0 or 1, respectively). min or V max ) are sequentially filled into the R consecutive pixel positions in the first row or the first column of the pattern.
[0082] In the second method, each pattern is generated in parallel, and the corresponding filling value of each bit of each code word is filled into all pixels of the continuous R columns or rows in the grating arrangement direction at the same position in each pattern of the corresponding code bit according to the Gray code sequence; more specifically, each element of the row or column corresponding to the p-th Gray code sequence in the Gray code expansion matrix is sequentially filled with the corresponding pattern pixel value (that is, V corresponding to 0 or 1 respectively). min or V max ), and fill in the R columns or rows from (p-1)×R+1 to p×R in the grating arrangement direction of the corresponding code bit pattern in sequence.
[0083] Step 2: Project structured light onto the object and obtain the corresponding structured light projection image: Project m groups of n-step phase-shifted sinusoidal structured light patterns and Gray code structured light patterns onto the object respectively, use a camera to capture the scene after each projection, and obtain the corresponding structured light projection image.
[0084] Step 3: Perform phase decoding calculations m times per group: Perform one phase decoding calculation on each group of structured light projection images, and use Gray code to assist the phase decoding of the phase-shifted sinusoidal grating image to obtain an absolute phase estimate containing phase information and period information.
[0085] Step 3.1: The sinusoidal structured light projection image obtained in step 2 can be expressed as a function of a specific position, as shown in the following formula, where I k (x, y), 1≤k≤m·n represents the image corresponding to the kth phase-shifted sinusoidal grating pattern:
[0086]
[0087] Or more conveniently, it can be expressed in group form as shown below, where I i,j (x, y), 1≤i≤m, 1≤j≤n represents the image corresponding to the phase-shifted sinusoidal grating pattern of group a and step b:
[0088]
[0089] In formula (5) and formula (6), (x, y) represents the pixel at the xth column and yth row in the image, A(x, y) represents the background light intensity at the pixel position (x, y), and B(x, y) represents the sinusoidal modulation amplitude at the pixel position. is the truncated phase at this location, and δ is the initial grating phase of the image.
[0090] To facilitate group calculation, this embodiment uses a formula expressed in group form. Solve the truncated phase of group a at (x, y) The following formula can be used:
[0091]
[0092] In formula (7), the superscript i of e is the imaginary symbol, arg() is the function for calculating the complex argument, and the range of arg() is usually taken as the interval (-π,π].
[0093] Step 3.2: Using the Gray code structured light projection information at a pixel location, the sinusoidal cycle number at that location can be obtained. The specific method is to read the pixel value of each Gray code position projection image at (x, y), binarize it to a code value of 0 or 1 using any adaptive threshold algorithm, and then splice it into a complete Gray code by code position to obtain the corresponding code sequence. If an equal-order Gray code is used, the resulting code sequence is the cycle number s(x, y); if a raised-order Gray code is used, the resulting code sequence is divided by 2 and rounded to the integer, which is the cycle number s(x, y).
[0094] Step 3.3: The phase information at (x, y) Combined with the period number s(x,y), the absolute phase information Φ(x,y) at that location is obtained; in order to correspond to the period of the sinusoidal grating, it is advisable to take all phase values as positive numbers. The formula for absolute phase is as follows:
[0095]
[0096] Special case handling: If the field of view covered by the structured light projection is smaller than the field of view of the image, then the image range not covered by the structured light projection can be regarded as out-of-bounds and excluded from the entire measurement calculation. One specific method is to set the absolute phase of these areas to 0 in this step to achieve this.
[0097] Sinusoidal grating structured light uses phase, period, and amplitude to assign unique position codes to points on the surface of objects in the measured scene. The sinusoidal structured light pattern has a continuous periodic phase, but when it is projected into the scene, the unevenness of the object's surface may cause some light to be blocked, resulting in discontinuous phases and even period jumps in the sinusoidal structured light projection pattern. In this case, we take advantage of the fact that any two adjacent codes of the Gray code differ by only one binary digit. The Gray code structured light assigns a unique code to each sinusoidal period, thus solving the period jump problem. Through phase decoding calculations, an absolute phase estimate containing both phase and period information can be obtained.
[0098] Step 4: Optimize phase estimation using the probabilistic consistent averaging method: Perform probabilistic consistent averaging on the m groups of phase data, and suppress the phase error caused by the nonlinear response of the measurement system components and random dark current through probabilistic error compensation to obtain the optimized phase decoding result.
[0099] Generally speaking, in reality, the surface of the measured object does not have ideal flat or curved surfaces. The surface reflection of the measured object is inconsistent, the background light intensity fluctuates, airflow causes jitter in the light propagation path, the nonlinearity and random noise of the electronic components in the imaging system interfere, and the distortion and gamma nonlinearity of the projection optical components cause the pixel values at specific locations in the captured image to fluctuate within a certain range. This in turn introduces errors in the phase decoding calculation, affecting the accuracy of the measurement results. Without loss of generality, the random and nonlinear errors at a specific point can be modeled using a Gaussian distribution. Therefore, random factors are taken into account during the measurement process. A probabilistic uniform averaging method, combined with the periodic characteristics of sinusoidal structured light, effectively reduces errors and obtains optimized phase decoding results.
[0100] Theoretically, when a periodic signal is distorted for various reasons, many harmonics will appear. Therefore, the sinusoidal grating image captured by the camera can be expressed as a harmonic series expansion or Fourier expansion. The impact of harmonics will significantly decrease as the harmonic order increases. Therefore, generally speaking, high-order harmonic errors can be ignored. Each time a sinusoidal fringe pattern is projected and combined with a Gray code pattern, a phase estimate of the projected image of the object under test can be obtained; when a sinusoidal fringe pattern with the same phase shift steps but a different initial phase is projected again, a new phase estimate can be obtained; assuming the error is Gaussian distributed, when there are enough estimates, its average value will approach the expected value, which can eliminate low-order harmonic errors and obtain accurate phase estimation results, thus achieving high-precision phase decoding.
[0101] In actual operation, the number of measurements and estimates allowed is limited. In order to eliminate the influence of occasional large deviations, when calculating the average of each estimate, the numbers with large deviations should be eliminated to ensure a smaller error between the average and the expected value. This can be achieved by calculating the probability consistent mean. The method for calculating the probability consistent mean is as follows:
[0102] Computational task: Given a set of m real numbers, find their uniform probability mean μ p , meeting the pre-set error or other calculation termination conditions.
[0103] The calculation process of the probability uniform average method includes:
[0104] Step 4.1. Set error conditions and other calculation termination conditions; wherein, error conditions generally include but are not limited to: a combination of one or more of the threshold value τ for allowing data points to deviate from the mean, the accuracy of mean estimation ε, etc.; other calculation termination conditions generally include but are not limited to: a combination of one or more of the maximum number of loop calculations l, the accuracy of mean estimation ε, the minimum number of samples D participating in the mean calculation, etc.; the specific setting values of these conditions are determined according to the application requirements and the value of m.
[0105] Step 4.2, loop calculation and comparison, that is: calculate the average of each number in the valid number set, and compare it with the error condition and the calculation termination condition, eliminate the data that exceeds the average deviation threshold, and loop calculation until the error condition or the calculation termination condition is met; the so-called valid number set refers to the set of data samples participating in the average calculation, where the valid number set in the first calculation contains all the given m data samples. Each calculation will eliminate all data judged as outliers, that is, outliers, to form a new valid number set for the next calculation.
[0106] Step 4.3: Output the average value obtained from the last calculation, which is the probability uniform average μ of the m real numbers. p.
[0107] The following uses two different error conditions and calculation termination condition settings as examples to illustrate the probability uniform averaging method:
[0108] Given a set of m = 15 measurement data, specifically data = {3.81, 3.67, 3.76, 3.48, 3.75, 3.84, 3.95, 3.73, 3.69, 3.83, 3.76, 3.85, 3.79, 3.56, 3.83}, find the probability average μ of these 15 numbers. p The mean of a number of numbers is denoted as μ, and the corresponding standard deviation is denoted as σ; and each data in the data is named or referred to in the order in which it appears in the data.
[0109] The first setting is: when the error condition is set as follows: the threshold for the degree to which the data point deviates from the mean is 1 times the standard deviation, that is, τ = σ, which is an adaptive threshold; other calculation termination conditions are set as follows: standard deviation < 0.05 or the maximum number of loop calculations l = 8.
[0110] The calculation process is as follows:
[0111] First calculation:
[0112] Valid number set = data = {3.81, 3.67, 3.76, 3.48, 3.75, 3.84, 3.95, 3.73, 3.69, 3.83, 3.76, 3.85, 3.79, 3.56, 3.83}, which contains all 15 numbers;
[0113] Calculate the mean and standard deviation of these 15 numbers and we get μ = 3.7533, σ = 0.1182;
[0114] The standard deviation value this time is greater than 0.05, and the maximum number of loop calculations has not been reached, so recalculation is required.
[0115] By comparison, it can be seen that among these 15 numbers, the 7th number is larger than the current μ+τ=μ+σ, and the 4th number and the 14th number are smaller than the current μ-τ=μ-σ, so these 3 numbers are eliminated from the valid number set.
[0116] Second calculation:
[0117] Valid number set = {3.81, 3.67, 3.76, 3.75, 3.84, 3.73, 3.69, 3.83, 3.76, 3.85, 3.79, 3.83}, which contains 12 numbers;
[0118] Calculate the mean and standard deviation of these 12 numbers and we get μ = 3.7758, σ = 0.0593;
[0119] The standard deviation value this time is greater than 0.05, and the maximum number of loop calculations has not been reached, so recalculation is required.
[0120] By comparison, we can see that according to the position of these 12 numbers in the original 15 numbers, the 6th and 12th numbers are larger than the current μ+σ, and the 2nd and 9th numbers are smaller than the current μ-σ, so these 4 numbers are eliminated from the valid number set again.
[0121] Third calculation:
[0122] Valid number set = {3.81, 3.76, 3.75, 3.73, 3.83, 3.76, 3.79, 3.83}, which contains 8 numbers;
[0123] Calculate the mean and standard deviation of these 8 numbers and we get μ = 3.7825, σ = 0.0381;
[0124] The standard deviation value this time is less than 0.05, which has met one of the calculation termination conditions. Therefore, although the maximum number of loop calculations has not been reached, there is no need to calculate again and no longer need to eliminate data.
[0125] At this point, the probability uniform mean μ under the set conditions is obtained p =3.7825.
[0126] Figure 6 The changes in the effective number set and the comparison of various values during the calculation process of this embodiment are given.
[0127] The second setting: When the error condition is set as follows: the threshold value for the degree to which data points are allowed to deviate from the mean is τ = 0.1, which is a fixed threshold; the other calculation termination conditions are set as follows: the mean estimation accuracy ε = 0.01 or the number of valid numbers involved in the calculation no longer changes.
[0128] The calculation process is as follows:
[0129] Initialize and set the previous average value to a sufficiently large value. In this example, it can be set to 50.
[0130] First calculation:
[0131] Valid number set = data = {3.81, 3.67, 3.76, 3.48, 3.75, 3.84, 3.95, 3.73, 3.69, 3.83, 3.76, 3.85, 3.79, 3.56, 3.83}, which contains all 15 numbers;
[0132] Calculate the mean of these 15 numbers. In this case, we do not need to calculate the standard deviation. We get μ = 3.7533.
[0133] By comparison, it can be seen that among these 15 numbers, the 7th number is greater than the current μ+τ=μ+0.1, and the 4th number and the 14th number are smaller than the current μ-τ=μ-0.1, so these 3 numbers are eliminated from the valid number set.
[0134] The difference between this average value and the previous average value is 46.2467, which is greater than ε=0.01, and the number of elements in the new valid number set is reduced to 12, so it needs to be calculated again.
[0135] Second calculation:
[0136] Valid number set = {3.81, 3.67, 3.76, 3.75, 3.84, 3.73, 3.69, 3.83, 3.76, 3.85, 3.79, 3.83}, which contains 12 numbers;
[0137] Calculate the average of these 12 numbers and we get μ = 3.7758;
[0138] By comparison, we can see that among these 12 numbers, no number is larger than the current μ+0.1 according to their position in the original 15 numbers, and only the second number is smaller than the current μ-0.1, so this number is removed from the valid number set again.
[0139] The difference between this average value and the previous average value is 0.0225, which is greater than ε=0.01, and the number of elements in the new valid number set is reduced to 11, so it needs to be calculated again.
[0140] Third calculation:
[0141] Valid number set = {3.81, 3.76, 3.75, 3.84, 3.73, 3.69, 3.83, 3.76, 3.85, 3.79, 3.83}, which contains 11 numbers;
[0142] Calculate the average of these 11 numbers and we get μ = 3.7855;
[0143] By comparison, it can be seen that among these 11 numbers, no number is larger than the current μ+0.1, and no number is smaller than the current μ-0.1, judging from their positions in the original 15 numbers. Therefore, no number is eliminated from the valid number set.
[0144] The difference between this average value and the previous average value is 0.0097, which is less than ε=0.01, and the number of significant digits has not changed. Any calculation termination condition has been met, so there is no need to calculate again.
[0145] At this point, the probability uniform mean μ under the set conditions is obtained p =3.7855.
[0146] Figure 7 The changes in the effective number set and the comparison of various values during the calculation process of this embodiment are given.
[0147] In the first three steps, all sinusoidal grating patterns are generated simultaneously, their projection images are acquired, and then calculations are performed on a group-by-group basis. This approach requires more storage space. However, the method of the present invention can be implemented with less storage space by generating one group of sinusoidal grating patterns and acquiring its projection images for calculations, repeating this process m times. In this way, the storage space for a group of sinusoidal grating patterns and images can be reused without affecting the calculations in step 4.
[0148] The present invention uses a Gray code-assisted sinusoidal grating encoding method, which can give the measured object more precise unique coding feature information with fewer structured light patterns, reduce the resource consumption of decoding calculations, and reduce the error in the phase unwrapping process. The results of multiple measurements are averaged by the probability consistency averaging method, and the phase error caused by the nonlinear response of the various components of the measurement system and random dark current is suppressed by probabilistic error compensation, effectively eliminating the influence of the nonlinear and random errors of the system and significantly improving the measurement accuracy. Ignoring and eliminating accidental errors helps to obtain more accurate phase estimates. The method described in the present invention is simple to operate, applicable to various high-precision three-dimensional measurement occasions, and has good practicality and promotion value.
[0149] Example 2
[0150] See also Figure 8 This embodiment provides a high-precision phase decoding system for a structured light 3D measurement system, including:
[0151] The structured light pattern construction unit is used to construct m groups of structured light patterns: construct m groups of n-step phase-shifted sinusoidal grating coding patterns and corresponding Gray code grating coding patterns.
[0152] The method for constructing m groups of n-step phase-shifted sinusoidal grating coding patterns includes: first constructing m*n-step phase-shifted sinusoidal grating patterns, then dividing them into m groups of n-step phase-shifted sinusoidal grating patterns, or directly constructing m groups of n-step phase-shifted sinusoidal grating patterns by group.
[0153] Among them, when an m*n-step phase-shifted sinusoidal grating pattern is first constructed and then divided into m groups of n-step phase-shifted sinusoidal grating patterns, the value Y of the k-th pattern at the x-th pixel position is k The expression of (x) is:
[0154]
[0155] When constructing m groups of n-step phase-shifted sinusoidal grating patterns directly, the value Y of the pattern of the b-th step in the a-th group at the x-th pixel position is a,b The expression of (x) is:
[0156]
[0157] Among them, V max is the maximum pixel value in the set pattern, V min is the minimum pixel value in the pattern, and T is the number of pixels occupied by each sine cycle.
[0158] The kth pattern Y k (x) and pattern Y of step b of group a a,b The conversion method between (x) is:
[0159]
[0160] k=(b-1)m+a
[0161] Among them, % represents the modular operation, which refers to the remainder obtained by dividing the number before the symbol by the number after the symbol. Indicates a round-up operation, and its value is the smallest integer not less than the number within the symbol.
[0162] The process of constructing the corresponding Gray code grating encoding pattern includes:
[0163] Generate and record the required number of bits, i.e., the Gray code of L bits and its corresponding code sequence, a total of 2 L code words, the code sequence is 1 to 2 L , and set the corresponding relationship between pattern numbers 1 to L and Gray code bits 1 to L;
[0164] The generated Gray code is expanded bit by bit in sequence as the basis for filling the pixel values in the pattern. If the code bit value is 0, the corresponding position in the pattern is filled with pixel value 0, and if the code bit value is 1, the corresponding position in the pattern is filled with pixel value V. max , V max The maximum pixel value in the set pattern.
[0165] Among them, the method of expanding the Gray code bit by bit in sequence adopts the row sorting method or the column sorting method, and the pattern pixel value filling adopts method one or method two, among which method one is: each pattern is generated serially in sequence, each pattern first generates a basic pattern in its grating arrangement direction, and then the basic pattern is copied in the grating direction; method two is: each pattern is generated in parallel, and the filling value corresponding to each bit of each code word is filled into the image position corresponding to each code bit according to the Gray code sequence.
[0166] a structured light projection image acquisition unit, configured to project m groups of n-step phase-shifted sinusoidal structured light patterns and a Gray code structured light pattern onto the object under test, capture the scene after each projection, and obtain the corresponding structured light projection image;
[0167] The phase decoding calculation unit is used to perform a phase decoding calculation on each set of structured light projection images to obtain the absolute phase. The specific processing process includes:
[0168] Represent the sinusoidal structured light projection image as a function of a specific position, and solve the truncated phase of each set of sinusoidal structured light projection images at the pixel position (x, y);
[0169] Using the Gray code structured light projection information at the pixel position, the sine cycle number of the pixel position (x, y) is obtained;
[0170] Combine the truncated phase of the pixel position (x, y) with the sine cycle number to obtain the absolute phase of the pixel position (x, y).
[0171] The absolute phase Φ of the pixel position (x,y) a The formula for (x,y) is:
[0172]
[0173] in, is the truncated phase of the ath group at the pixel position (x,y), s(x,y) is the sine cycle number of the pixel position (x,y), and (x,y) represents the pixel at the xth column and yth row in the image.
[0174] The optimization unit is used to perform probability uniform averaging on the m groups of absolute phases to obtain an optimized phase decoding result.
[0175] The process of probabilistically averaging m groups of absolute phases includes:
[0176] Set error conditions and calculation termination conditions. The error conditions include one or both of the threshold value τ for the degree to which data points are allowed to deviate from the mean and the mean estimation accuracy ε. The calculation termination conditions include one or more of the maximum number of loop calculations l, the mean estimation accuracy ε, and the minimum number of samples D involved in the mean calculation.
[0177] Calculate the average of each number in the valid number set and compare it with the error condition and the calculation termination condition. Eliminate the data that does not meet the error condition. Repeat the calculation until the calculation termination condition is met. The average obtained from the last calculation is used as the optimized phase decoding result.
[0178] Example 3
[0179] This embodiment introduces the high-precision phase decoding method of the structured light 3D measurement system of Example 1 by way of specific examples:
[0180] In this embodiment, the pattern size is set to be w=768 pixels in width and h=576 pixels in height, vertical stripes are used, m=2, n=3, and t=2. 4 = 16 sinusoidal cycles and ascending Gray code, constructing 2 groups of 3 steps with a total of 6 sinusoidal grating patterns and L = 4 + 1 = 5-bit Gray code grating patterns. Each sinusoidal cycle contains T = 768 / 16 = 48 pixels, and each Gray code encoding bit occupies R = T / 2 = 24 pixels. Then set the minimum pixel value V of the sinusoidal grating pattern min = 0 and the maximum pixel value V max =200, V0=0 and V1=255 of the Gray code grating pattern, and Gray code pattern number 1 corresponds to the Gray code highest code bit L=5, and Gray code pattern number L=5 corresponds to the Gray code lowest code bit 1. The first set of encoding equations for the sinusoidal grating is obtained as follows:
[0181]
[0182] The second set of coded equations is as follows:
[0183]
[0184] The column-wise expansion matrix of the 5-bit Gray code is as follows:
[0185]
[0186] The values of the two sets of sinusoidal grating patterns in this embodiment are shown in Figure 2. Figure 2 shows an example (partial) of constructing the column pixel values of a vertical stripe phase-shifted sinusoidal grating pattern: two sets of three-step phase-shifted sinusoidal gratings with a vertical stripe width of 768 pixels are constructed, that is, a six-step phase-shifted sinusoidal grating. Each pattern contains 16 sinusoidal cycles, each cycle occupies 48 pixels, and the minimum pixel value of the pattern is 0 and the maximum pixel value is 200. The X-axis represents the column index of the pattern, and only the first 200 column values of the pattern are shown in the figure. The Y-axis represents the pixel values of the pattern. Figure 2(a) shows the values of the first set of three-step phase-shifted sinusoidal gratings, and Figure 2(b) shows the values of the second set of three-step phase-shifted sinusoidal gratings.
[0187] The values of the 5-bit Gray code grating pattern of this embodiment are shown in Figure 4 . Figure 4 To construct a 5-bit Gray code pattern of vertical stripes, the pattern width is 768 pixels, each code bit occupies 24 pixels, the minimum pixel value of the pattern is 0, and the maximum pixel value is 255; the horizontal axis represents the column index of the pattern, and the vertical axis represents the pixel value of the pattern.
[0188] There are 11 structured light coding patterns in total, including 6 (i.e., 2 groups of 3-step phase shift) sinusoidal grating patterns and 5 (each corresponding to one of the 5 code positions) Gray code grating patterns;
[0189] These 11 structured light coded patterns are projected onto the object under test; each time a pattern is projected, it is photographed using a camera to obtain the corresponding structured light projection image.
[0190] The object to be measured in this embodiment is a wall. In this embodiment, two sets of sinusoidal grating coded projection images are obtained by camera shooting, a total of 6 images, see Figure 4 In this embodiment, there are 5 5-bit Gray code grating coded projection images captured by the camera, see Figure 5 .
[0191] In this embodiment, there are two sets of three-step phase-shifted sinusoidal grating projection images, and two phase decoding calculations are required. The first set of sinusoidal structured light projection images is expressed as the following function:
[0192]
[0193] The formula for solving the truncated phase of group 1 is as follows:
[0194]
[0195] In this embodiment, the object to be measured is a wall, so a relatively simple adaptive binarization algorithm (such as the local Otsu algorithm) can be used for the five Gray code projection images to obtain the corresponding Gray code bit images with pixel values of 0 and 1, which are respectively denoted as g l (x, y), l = 1, 2, ..., 5; then, the Gray code sequence at (x, y) can be obtained using the following formula:
[0196] s(x,y)=(g1(x,y)·2 4 +g2(x,y)·2 3 +g3(x,y)·2 2 +g4(x,y)·2 1 +g5(x,y)·2 0 ) / / 2
[0197] =(g1(x,y)·16+g2(x,y)·8+g3(x,y)·4+g4(x,y)·2+g5(x,y)) / / 2, where the symbol “ / / ” represents integer division. The absolute phase of the first group of images is:
[0198]
[0199] Similarly, the second set of sinusoidal structured light projection images is expressed as the following function:
[0200]
[0201] The formula for solving the truncated phase of group 2 is as follows:
[0202]
[0203] All groups use the same Gray code projection image. Therefore, the Gray code sequence of the second group of sinusoidal grating images at (x, y) is exactly the same as that of the first group, so the absolute phase of the second group of images can be obtained as:
[0204]
[0205] In this embodiment, two sets of three-step phase-shifted sinusoidal grating projections are used, so two measurements are performed to obtain two sets of phase estimation data. In the special case of m=2, the probability average of two numbers is the average of the two numbers.
[0206] More specifically, in this embodiment, the initial phase of the second group of phase-shifted sinusoidal gratings is shifted by π / 3 compared to the initial phase of the first group, that is, δ2=δ1+π / 3. The phase estimation errors of the two measurements are respectively
[0207]
[0208] The effect of averaging the two measured phase estimates is equivalent to averaging the two estimation errors mentioned above, which results in reducing the low-order harmonic phase shift error, thereby obtaining a more accurate phase estimate, that is, obtaining a high-precision phase decoding result.
[0209] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A high-precision phase decoding method for a structured light 3D measurement system, characterized by: Methods include: S1. Construct m groups of structured light patterns: construct m groups of n-step phase-shifted sinusoidal grating coding patterns and corresponding Gray code grating coding patterns; S2, projecting m groups of n-step phase-shifted sinusoidal structured light patterns and Gray code structured light patterns onto the object to be measured, capturing the scene after each projection, and obtaining corresponding structured light projection images; S3, performing a phase decoding calculation on each set of structured light projection images to obtain an absolute phase; S4. Perform probability uniform averaging on the m groups of absolute phases to obtain an optimized phase decoding result.
2. The high-precision phase decoding method for a structured light 3D measurement system according to claim 1, characterized in that: The method for constructing m groups of n-step phase-shifted sinusoidal grating coding patterns includes: first constructing m*n-step phase-shifted sinusoidal grating patterns, and then dividing them into m groups of n-step phase-shifted sinusoidal grating patterns, or directly constructing m groups of n-step phase-shifted sinusoidal grating patterns by group.
3. The high-precision phase decoding method for a structured light 3D measurement system according to claim 2, characterized in that: When constructing an m*n-step phase-shifted sinusoidal grating pattern first and then dividing it into m groups of n-step phase-shifted sinusoidal grating patterns, the value Y of the k-th pattern at the x-th pixel position is k The expression of (x) is: When constructing m groups of n-step phase-shifted sinusoidal grating patterns directly, the value Y of the pattern of the b-th step in the a-th group at the x-th pixel position is a,b The expression of (x) is: Among them, V max is the maximum pixel value in the set pattern, V min is the minimum pixel value in the pattern, and T is the number of pixels occupied by each sine cycle.
4. The high-precision phase decoding method for a structured light 3D measurement system according to claim 3, characterized in that: The kth pattern Y k (x) and pattern Y of step b of group a a,b The conversion method between (x) is: Among them, % represents the modular operation, which refers to the remainder obtained by dividing the number before the symbol by the number after the symbol. Indicates a round-up operation, and its value is the smallest integer not less than the number within the symbol.
5. The high-precision phase decoding method for a structured light 3D measurement system according to claim 1, characterized in that: The process of constructing the corresponding Gray code grating encoding pattern includes: Generate and record the required number of bits, i.e., the Gray code of L bits and its corresponding code sequence, a total of 2 L code words, the code sequence is 1 to 2 L , and set the corresponding relationship between pattern numbers 1 to L and Gray code bits 1 to L; The generated Gray code is expanded bit by bit in sequence as the basis for filling the pixel values in the pattern. If the code bit value is 0, the pixel value V0 is filled in the corresponding position in the pattern. V0 is taken as 0 or the minimum pixel value V in the set pattern. min , the code value is 1, fill the corresponding position in the pattern with pixel value V1, V1 is taken as 255 or V max , V max The maximum pixel value in the set pattern.
6. The high-precision phase decoding method for a structured light 3D measurement system according to claim 5, characterized in that: The method for sequentially expanding the Gray code bit by bit adopts a row sorting method or a column sorting method, and the pattern pixel value filling adopts method one or method two, wherein method one is: each pattern is generated serially in sequence, each pattern first generates a basic pattern in its grating arrangement direction, and then the basic pattern is copied in the grating direction; method two is: each pattern is generated in parallel, and the filling value corresponding to each bit of each code word is filled into the image position corresponding to each code bit according to the Gray code sequence.
7. The high-precision phase decoding method for a structured light 3D measurement system according to claim 1, characterized in that: Step S3 includes: Represent the sinusoidal structured light projection image as a function of a specific position, and solve the truncated phase of each set of sinusoidal structured light projection images at the pixel position (x, y); Using the Gray code structured light projection information at the pixel position, the sine cycle number of the pixel position (x, y) is obtained; Combine the truncated phase of the pixel position (x, y) with the sine cycle number to obtain the absolute phase of the pixel position (x, y).
8. The high-precision phase decoding method for a structured light 3D measurement system according to claim 7, characterized in that: The absolute phase Φ of the pixel position (x,y) a The formula for (x,y) is: in, is the truncated phase of the ath group at the pixel position (x,y), s(x,y) is the sine cycle number of the pixel position (x,y), and (x,y) represents the pixel at the xth column and yth row in the image.
9. The high-precision phase decoding method for a structured light 3D measurement system according to claim 1, characterized in that: The process of probabilistically averaging m groups of absolute phases includes: Set error conditions and calculation termination conditions. The error conditions include one or both of the threshold value τ of the degree to which data points are allowed to deviate from the mean and the mean estimation accuracy ε. The calculation termination conditions include one or more of the maximum number of loop calculations l, the mean estimation accuracy ε, and the minimum number of samples D involved in the mean calculation. Calculate the average of each number in the valid number set and compare it with the error condition and calculation termination condition. Eliminate data that exceeds the threshold of the deviation from the average. Repeat the calculation until the error condition or calculation termination condition is met. The average obtained by the last calculation is used as the optimized phase decoding result.
10. High-precision phase decoding system for structured light 3D measurement system, characterized by: The system includes: A structured light pattern construction unit, configured to construct m groups of structured light patterns: constructing m groups of n-step phase-shifted sinusoidal grating coding patterns and corresponding Gray code grating coding patterns; a structured light projection image acquisition unit, configured to project m groups of n-step phase-shifted sinusoidal structured light patterns and a Gray code structured light pattern onto the object under test, capture the scene after each projection, and obtain the corresponding structured light projection image; A phase decoding calculation unit is used to perform a phase decoding calculation on each set of structured light projection images to obtain an absolute phase; The optimization unit is used to perform probability uniform averaging on the m groups of absolute phases to obtain an optimized phase decoding result.
Citation Information
Patent Citations
Image point tracing-based object raster image phase shift method phase measurement error correction method
CN110230994A