A binary defocus three-dimensional measurement method and device with phase error mean subtracted

By using error diffusion algorithm and Gaussian fuzzy to calculate the mean phase error in binary defocus three-dimensional measurement, the problem of large phase error after defocus projection is solved, and the accuracy and accuracy of three-dimensional measurements are improved.

CN115479556BInactive Publication Date: 2025-01-14SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110800600.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-15
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN115479556B_ABST
    Figure CN115479556B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of optical three-dimensional measurement, and in particular to a binary defocused three-dimensional measurement method and device minus the phase error mean. The present invention first uses an error diffusion algorithm to binary encode a sinusoidal fringe image to obtain a coded fringe group; then obtains the phase error mean by calculation; defocuses and projects the coded fringe group to the object to be measured, collects the fringe image returned by the object to be measured, and uses the multi-step phase shift method to obtain the measured phase; subtracts the phase error mean from the measured phase to obtain the actual phase, and obtains the three-dimensional data of the object to be measured through phase map reconstruction. The present invention reduces the root mean square error of the final phase result by subtracting the phase error mean from the original phase result, thereby effectively improving the final measurement accuracy and effectively improving the accuracy of the detection results of the present invention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of optical three-dimensional measurement, and in particular to a binary defocus three-dimensional measurement method and device minus a phase error mean. Background Art

[0002] Three-dimensional measurement based on stripe structured light is a non-contact measurement method with many advantages, such as high precision and high speed. It is widely used in automatic processing, high-speed online detection, aerospace, physical profiling and other fields.

[0003] Generally speaking, commercial digital optical projectors have certain nonlinear problems, which will lead to large errors in the final three-dimensional measurement results. In order to solve this problem, many methods have been proposed in the industry, among which binary defocus technology is a commonly used method to overcome the nonlinearity of the projector. This type of method usually first performs binary encoding on the standard sinusoidal fringe image (that is, using 0 and 1 to represent each pixel value of the image), and then projects a fringe image close to the standard sinusoidal through defocus projection for subsequent fringe structured light measurement. In addition to solving the nonlinear problem of the projector, the binary defocus technology can also make full use of the characteristics of the digital projector to increase the speed of fringe projection, thereby increasing the speed of three-dimensional measurement.

[0004] However, due to the phase error between the fringes after defocus projection and the standard sinusoidal fringes in the binary defocus technology, a large error will occur in the three-dimensional measurement result after phase reconstruction. Therefore, a three-dimensional measurement method of defocus projection is needed that can reduce the phase error between the fringes after defocus projection and the standard sinusoidal fringes, thereby reducing the error of three-dimensional measurement. Summary of the invention

[0005] The purpose of the present invention is to overcome the problem in the prior art that the phase error between the defocused projected stripes and the standard sinusoidal stripes is large, resulting in large errors in three-dimensional measurement results, and to provide a binary defocused three-dimensional measurement method and device with a phase error mean subtracted.

[0006] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:

[0007] A binary defocus three-dimensional measurement method for subtracting a phase error mean value comprises the following steps:

[0008] S1: Use error diffusion algorithm to perform binary encoding on the sinusoidal fringe image to obtain a coded fringe group;

[0009] S2: Gaussian blurring is performed on the coded fringe group, a predicted phase is obtained by using a multi-step phase shift method, the predicted phase is subtracted from an ideal phase, and the average value of the phase errors of all pixels is calculated to obtain a phase error mean; the ideal phase is the phase calculated by using the multi-step phase shift method on the sinusoidal fringe image;

[0010] S3: projecting the coded fringe group out of focus onto the object to be measured, collecting the fringe image returned by the object to be measured, and obtaining the measurement phase using the multi-step phase shift method;

[0011] S4: Subtract the phase error mean from the measured phase to obtain the actual phase, then obtain the unfolded phase through spatial phase unfolding, and finally reconstruct the unfolded phase map to obtain the three-dimensional data of the object to be measured. The present invention reduces the root mean square error of the final phase result by subtracting the phase error mean from the original phase result, thereby effectively improving the final measurement accuracy and effectively improving the accuracy of the detection result of the present invention.

[0012] As a preferred solution of the present invention, step S2 and step S3 can be executed simultaneously or in an exchanged execution order.

[0013] As a preferred solution of the present invention, the formula for calculating the phase using the multi-step phase shift method is:

[0014]

[0015] Where N represents the number of steps of multi-step phase shift, (x, y) is the pixel coordinate, I n (x, y) is the pixel value of (x, y), and φ(x, y) is the phase value of (x, y).

[0016] As a preferred solution of the present invention, the calculation formula of the phase error mean is:

[0017]

[0018] Where M represents the number of pixels, (x, y) is the pixel coordinate, φ bi (x, y) is the predicted phase calculated by the coded stripe group after Gaussian blur, φ ideal (x, y) is the ideal phase calculated from the sinusoidal fringe image, and Mean is the mean phase error.

[0019] As a preferred solution of the present invention, in step S2, Gaussian blur is performed by computer simulation to simulate the defocus effect.

[0020] As a preferred solution of the present invention, the step S3 uses a digital projector to perform defocused projection.

[0021] A three-dimensional measurement device comprises at least one processor, at least one projection device for performing out-of-focus projection, at least one acquisition camera for acquiring a return image of an object to be measured, and a memory connected to the at least one processor in communication; the projection device and the acquisition camera are respectively connected to the processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the methods described above.

[0022] Compared with the prior art, the present invention has the following beneficial effects:

[0023] The present invention reduces the root mean square error of the final phase result by subtracting the phase error mean from the original phase result, thereby effectively improving the final measurement accuracy and effectively improving the accuracy of the detection result of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a schematic flow chart of a binary defocus three-dimensional measurement method for subtracting a phase error mean value according to Embodiment 1 of the present invention;

[0025] Figure 2 A schematic diagram of a coded fringe group generated in step S1 of a binary defocus three-dimensional measurement method minus a phase error mean value according to Embodiment 2 of the present invention;

[0026] Figure 3 The fringe pattern of the simulated defocus projection generated in step S2 of the binary defocus three-dimensional measurement method minus the phase error mean value described in Example 2 of the present invention;

[0027] Figure 4 The fringe pattern actually captured in step S3 of the binary defocus three-dimensional measurement method minus the phase error mean value described in Example 2 of the present invention;

[0028] Figure 5 A comparison diagram of phase results obtained by the implementation method of the present invention and the traditional method under the conditions of small defocus amount and different fringe periods in a binary defocus 3D measurement method with phase error mean subtracted as described in Example 2 of the present invention;

[0029] Figure 6 This is a structural schematic diagram of a three-dimensional measurement device described in Example 3 of the present invention, which utilizes the binary defocus three-dimensional measurement method described in Example 1 minus the phase error mean. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with test examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the content of the present invention belong to the scope of the present invention.

[0031] Among the sinusoidal fringe binary coding methods proposed by many scholars, the "error diffusion algorithm" is a commonly used and excellent sinusoidal fringe binary coding method. Its basic idea is to diffuse the quantization error of the processed elements to the unprocessed elements in a weighted manner, thereby reducing the quantization error of the entire coding surface.

[0032] After careful study, it was found that after a certain sinusoidal fringe pattern was binary-encoded using an error diffusion algorithm with a certain error diffusion kernel, defocused projection was performed at different defocus amounts, and the phase was calculated using an arbitrary multi-step phase shift method, the phase errors finally obtained all had the same mean value.

[0033] The industry generally uses the root mean square error (RMS) as the evaluation index for phase error, and its expression is as follows:

[0034]

[0035] Furthermore, it can be found that the root mean square error can be expressed by the variance of the error and the mean of the error, as follows:

[0036]

[0037] Among them, V is the variance of the error and E is the mean error.

[0038] It can be clearly seen that if the effect of the error mean on the root mean square error (RMS) is subtracted, the final root mean square error value (RMS) can be reduced.

[0039] Therefore, combined with our research findings, we can calculate the corresponding phase error mean through advance computer simulation, and then subtract the phase error mean from the actual measured phase result to reduce the final phase root mean square error value (RMS).

[0040] However, an important condition for the technical solution to be effective is that the change in the defocus amount does not affect the mean value of the phase error finally obtained. Here, the present invention particularly uses mathematical analysis to prove that the change in the defocus amount does not affect the mean value of the phase error finally obtained.

[0041] When the four-step phase shift method is used, the phase error of the fringes and the intensity error of the fringes ΔA n There are the following relationships:

[0042]

[0043] in, is the intensity error of the nth frame, n∈[0,3], is the phase, and B is the modulation degree of the fringes in the fringe image.

[0044] Assume that the Gaussian kernel g represents a certain defocus amount, acting on the projected fringe pattern, then ΔA n and B will change:

[0045]

[0046] B'=t1B

[0047] in, represents the intensity error of the nth frame after defocusing, * represents the convolution operator, and t1 represents that under the action of the Gaussian kernel g, the modulation degree of the standard sine function will change by a fixed coefficient.

[0048] Therefore, the phase error of the changed fringes can be expressed as:

[0049]

[0050] Due to the symmetric properties of the Gaussian kernel, we can have:

[0051]

[0052] Therefore, the mean phase error can be derived as follows:

[0053]

[0054] So obviously there are:

[0055]

[0056] Therefore, the change of defocus amount will not affect the mean of the phase error finally obtained. As shown in Table 1, when the fringe period is 60 pixels, the mean of the phase error obtained by different defocus amounts is basically unchanged (i.e., 0.0228±0.0003, the error is less than 0.0003 and can be ignored).

[0057] Table 1

[0058] Small defocus Medium Defocus Large Defocus Phase error average 0.0227 0.0231 0.0225

[0059] Example 1

[0060] like Figure 1 As shown, a binary defocus three-dimensional measurement method minus the phase error mean value includes the following steps:

[0061] S1: Use error diffusion algorithm to perform binary encoding on the sinusoidal fringe image to obtain a coded fringe group;

[0062] S2: Gaussian blurring is performed on the coded fringe group, a predicted phase is obtained by using a multi-step phase shift method, and the predicted phase is subtracted from an ideal phase to obtain a phase error mean; the ideal phase is a phase calculated by using the multi-step phase shift method on the sinusoidal fringe image;

[0063] S3: projecting the coded fringe group out of focus onto the object to be measured, collecting the fringe image returned by the object to be measured, and obtaining the measurement phase using the multi-step phase shift method;

[0064] S4: subtracting the phase error mean from the measured phase to obtain the actual phase, then obtaining the unfolded phase through spatial phase unfolding, and finally reconstructing the unfolded phase map to obtain the three-dimensional data of the object to be measured.

[0065] Among them, step S2 and step S3 can be executed in an interchangeable order or simultaneously.

[0066] The formula for calculating the phase using the multi-step phase shift method is:

[0067]

[0068] Where N represents the number of steps of multi-step phase shift, (x, y) is the pixel coordinate, I n (x, y) is the pixel value of (x, y), and φ(x, y) is the phase value of (x, y).

[0069] The calculation formula of the phase error mean is:

[0070]

[0071] Where M represents the number of pixels, φ bi (x, y) is the predicted phase calculated by the coded stripe group after Gaussian blur, φ ideal (x, y) is the ideal phase calculated from the sinusoidal fringe image, and Mean is the mean phase error.

[0072] Example 2

[0073] S1: Use the Floyd-Steinberg error diffusion algorithm to perform binary encoding on the sinusoidal fringe image with a resolution of 912*1140 and a period of 60 pixels to obtain a coded fringe group, such as Figure 2 shown.

[0074] S2: Using computer simulation, the binarized fringe pattern generated in step S1 is Gaussian blurred using a Gaussian kernel with a window size of 9*9 and a standard deviation of 3 to simulate the defocused projection, and the predicted phase is calculated using a four-step phase shift method. The phase error mean is calculated by comparing it with the ideal phase, and the phase error mean is 0.0207. Figure 3The fringe pattern of the simulated out-of-focus projection is shown.

[0075] S3: Using a digital projector, project the coded fringe group generated in step S1 to the object to be tested, collect the fringe image returned by the object to be tested, and use the four-step phase shift method to determine the corresponding phase result, and then subtract the phase error mean calculated in step S2 from the phase result to obtain the final more accurate phase result. The RMS error of the phase result is reduced from 0.035 to 0.027. Figure 4 The actual fringe pattern taken is shown.

[0076] S4: subtract the phase error mean from the measured phase to obtain the actual phase, then obtain the unfolded phase through spatial phase unfolding, use the pre-calibrated system parameters, and finally reconstruct the unfolded phase map to obtain the three-dimensional data of the object to be measured.

[0077] The system parameters calibrated in advance are obtained through the calibration process of the monocular structured light system. These parameters include the camera's intrinsic parameter matrix Kc and the projector's intrinsic parameter matrix Kp, as well as the extrinsic matrix between the camera and the projector: the rotation matrix R and the translation matrix T. And the distortion coefficients dc and dp of the camera and projector.

[0078] Figure 5 The comparison of the phase results obtained by the patented method and the traditional method under the conditions of small defocus and different fringe periods (mean subtraction and non-mean subtraction). From the results, it can be seen that the patented method can effectively reduce the root mean square error (RMS) of the phase error compared with the traditional method.

[0079] Example 3

[0080] like Figure 6 As shown, a three-dimensional measurement device includes at least one processor, at least one projection device for performing defocus projection, at least one acquisition camera for acquiring the return image of the object to be measured, and a memory connected to the at least one processor in communication; the projection device and the acquisition camera are respectively connected to the processor in communication; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the binary defocus three-dimensional measurement method for subtracting the mean of the phase error described in the above embodiment. The input and output interface may include a display, a keyboard, a mouse, and a USB interface for inputting and outputting data; the power supply is used to provide power to the three-dimensional measurement device.

[0081] Those skilled in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), disks or optical disks, etc. Various media that can store program codes.

[0082] When the above-mentioned integrated unit of the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A binary defocus three-dimensional measurement method with phase error mean subtraction, characterized in that: The following steps are involved: S1: Use error diffusion algorithm to perform binary encoding on the sinusoidal fringe image to obtain a coded fringe group; S2: Gaussian blurring is performed on the coded fringe group, a predicted phase is obtained by using a multi-step phase shift method, the predicted phase is subtracted from an ideal phase, and the average value of the phase errors of all pixels is calculated to obtain a phase error mean; the ideal phase is the phase calculated by using the multi-step phase shift method on the sinusoidal fringe image; S3: projecting the coded fringe group out of focus onto the object to be measured, collecting the fringe image returned by the object to be measured, and obtaining the measurement phase using the multi-step phase shift method; S4: subtracting the phase error mean from the measured phase to obtain the actual phase, then obtaining the unfolded phase by spatial phase unfolding, and finally reconstructing the unfolded phase image to obtain the three-dimensional data of the object to be measured; Among them, the calculation formula for calculating the phase using the multi-step phase shift method is: Where N represents the number of steps of multi-step phase shift, (x, y) is the pixel coordinate, I n (x, y) is the pixel value of (x, y), φ(x, y) is the phase value of (x, y), and n is the serial number of the sinusoidal fringe image; The calculation formula of the phase error mean is: Where M represents the number of pixels, (x, y) is the pixel coordinate, φ bi (x, y) is the predicted phase calculated by the coded stripe group after Gaussian blur, φ ideal (x, y) is the ideal phase calculated from the sinusoidal fringe image, and Mean is the mean phase error.

2. The binary defocus three-dimensional measurement method according to claim 1, characterized in that: The step S2 and step S3 can be executed simultaneously or in a different order.

3. The binary defocus three-dimensional measurement method according to claim 1, characterized in that: In step S2, Gaussian blur is performed by computer simulation to simulate the defocus effect.

4. The binary defocus three-dimensional measurement method of subtracting the phase error mean according to claim 1, characterized in that: The step S3 uses a digital projector to perform defocused projection.

5. A three-dimensional measuring device, characterized in that: The device comprises at least one processor, at least one projection device for performing out-of-focus projection, at least one acquisition camera for acquiring a return image of an object to be measured, and a memory in communication with the at least one processor; The projection device and the acquisition camera are respectively connected to the processor for communication; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for generating light field with sine structure by means of space-time binary encoding

    CN104567730A

  • Method for measuring low-pass filtering characteristics of binary fringe defocusing projection system

    CN109579738A