Real-time phase nonlinear error correction method and device based on speckle assistance

Through the real-time phase nonlinear error correction method based on speckle assist, an error compensation model is constructed and a lookup table is established using the Gaussian Newton iterative method, which solves the problem of sinusoidal fringe distortion caused by nonlinear response in the phase measurement contour system, and achieves high-precision and high-speed measurement of phase calculation.

CN119573603APending Publication Date: 2025-03-07GUILIN UNIV OF ELECTRONIC TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411737801.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, nonlinear responses in phase measurement contour systems lead to sinusoidal fringe distortion, and gamma nonlinear responses vary in real time, and the correction harmonic coefficients obtained in advance affect the phase correction accuracy of the measurement link.

Method used

The real-time phase nonlinear error correction method based on speckle assist is adopted. By calibrating the camera and projector, the corresponding information of the object's distorted phase and real phase is obtained, the error compensation model is constructed, the least squares method is used to obtain the high-order harmonic coefficients, and a lookup table is established through the Gaussian Newton iterative method to achieve real-time high-precision correction of phase errors.

Benefits of technology

The measurement speed is improved, the number of projected stripes is reduced, the speed of error correction is improved, the high accuracy of phase calculation is achieved, and the calculation amount of point-by-point nonlinear optimization is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119573603A_ABST
    Figure CN119573603A_ABST
Patent Text Reader

Abstract

The invention discloses a real-time phase nonlinear error correction method and device based on speckle assistance, and the method comprises the steps: calculating a higher harmonic coefficient in a phase error compensation model through obtaining the corresponding information of a distortion phase and a real phase of a sampling point in real time in a measurement link; and solving a corresponding lookup table of the periodic phase and the correction phase by using a Gauss-Newton iteration method, and performing high-precision optimization correction on the whole wrapped phase of the object by using the lookup table. By adopting the technical scheme of the invention, the calculation amount of point-by-point nonlinear optimization is greatly reduced, and high-speed and high-precision three-dimensional measurement is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of structured light three-dimensional measurement, and in particular relates to a speckle-assisted real-time phase nonlinear error correction method and device. Background Art

[0002] Fringe projection profilometry (FPP) has the advantages of large field of view, high precision, and high speed, and is widely used in industrial inspection, medical treatment, cultural relics protection, aerospace and other fields. The fringe projection three-dimensional measurement method mainly projects a set of coded fringe patterns onto the surface of an object through a projector, and then uses a camera to capture the fringe pattern modulated by the object, calculates the phase information of the fringe pattern, and then uses the calibration parameters of the camera and projector to restore the three-dimensional shape of the object surface. However, the nonlinear response between the camera and the projector in the system will affect the sinusoidal nature of the collected fringe intensity, produce periodic phase errors, and seriously affect the final reconstruction accuracy. Therefore, in order to ensure the measurement accuracy of the reconstruction result, it is necessary to correct the nonlinear error caused by the gamma effect.

[0003] In order to improve the measurement efficiency, the measurement system generally uses a fringe pattern with fewer phase shift steps to obtain phase information. However, the fewer the phase shift steps, the greater the phase nonlinear error. In order to solve this contradiction, a large number of phase nonlinear error correction methods have been proposed, which are mainly divided into active phase nonlinear error correction methods and passive phase nonlinear error correction methods. The former first uses the acquired system nonlinear system to correct the intensity distribution of the projection pattern to ensure the sinusoidal nature of the acquired fringe pattern. But in fact, the nonlinear response of the phase changes in real time. The nonlinear coefficient obtained in advance will affect the correction accuracy of the phase error when used in the measurement link, and the flexibility is poor. The latter method mainly processes the acquired phase information to correct the phase error. This method is also divided into two categories. One is to obtain a phase diagram opposite to the original phase error curve by projecting an additional fringe pattern, and average it to compensate for the phase error, such as the double N-step phase shift method. Although this method has a certain correction effect, projecting an additional pattern will greatly reduce the measurement speed. The other is to perform a series of transformations on the original fringe pattern to obtain an additional phase diagram and average the error with the original phase diagram, and then correct the phase, such as the Hilbert transform method. The above methods can effectively reduce the nonlinear error of the phase, but they only stop at correcting the fundamental harmonic part of the nonlinear error, and the higher harmonics of the phase nonlinear error are still retained in the residual. In order to improve the accuracy of phase calculation, the correction of higher harmonics is also very necessary. Among them, high-order harmonic correction (HHC) is an effective correction method for higher harmonics in phase measurement profilometry. First, the fundamental harmonics in the phase nonlinear error are corrected using double N-step phase shift, and then artificial fringes are constructed using the corrected phase information, and the Hilbert transform is used to effectively correct the higher harmonics in the phase nonlinear error. However, the whole process is relatively complicated, and the use of double N-step phase shift also increases the number of projection patterns, which affects the measurement efficiency to a certain extent. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a real-time phase nonlinear error correction method and device based on speckle assistance, which solves one of the technical problems existing in the prior art. In view of the situation that the nonlinear response in the phase measurement profilometry (PMP) system causes the sinusoidal fringes to be distorted, and the gamma nonlinear response is transformed in real time, the correction harmonic coefficient obtained in advance will greatly affect the accuracy of phase correction in the measurement link; the present invention can improve the measurement speed, reduce the number of projected fringes, and improve the speed of error correction. At the same time, in order to obtain the high-order harmonic correction coefficient in real time, the phase error is corrected in real time with high precision, thereby improving the accuracy of phase calculation.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] A speckle-assisted real-time phase nonlinear error correction method, comprising:

[0007] S100, calibrated camera and projector

[0008] S200, obtaining a distortion phase of the object according to a deformation fringe pattern and a deformation speckle pattern modulated by a surface profile of the object;

[0009] S300, randomly selecting sampling points in the non-object area for determining the true phase and the distorted phase;

[0010] S400, constructing an error compensation model between the real phase and the distorted phase, and using the corresponding relationship established by the sampling points to obtain the harmonic coefficients of the error compensation model using the least square method;

[0011] S500, obtaining distortion phase sampling points, and using the sampling points as initial values ​​to establish a lookup table between the distortion phase and the correction phase;

[0012] S600, based on the lookup table, using a linear interpolation algorithm to correct the distortion phase of the object;

[0013] S700, based on the corrected distortion phase and in combination with system calibration parameters, restore the three-dimensional shape of the object.

[0014] Preferably, in S200, the distorted phase of the object is obtained by wrapping the phase and the fringe order according to the deformed fringe pattern and the deformed speckle pattern.

[0015] Preferably, the error compensation model between the real phase and the distorted phase is:

[0016] P=B0*p+B1*sin(Np)+B2*sin(2Np)+B3*sin(3Np)+...+B n *sin(nNp);

[0017] Among them, p represents the true phase, P represents the distorted phase, N represents the number of phase shift steps of the fringe pattern, and B is the error compensation model coefficient.

[0018] Preferably, in S500, the distortion phase sampling points are obtained at intervals of 0.01 within the period of the wrapped phase [-π,π], and the sampling points are used as initial values ​​respectively, and the Gauss-Newton iterative algorithm is used to obtain the optimized correction phase, and a lookup table between the distortion phase and the correction phase is established.

[0019] The present invention also provides a speckle-assisted real-time phase nonlinear error correction device, comprising:

[0020] The first processing module is used to calibrate the camera and projector

[0021] A second processing module is used to obtain the distortion phase of the object according to the deformation fringe pattern and the deformation speckle pattern modulated by the surface profile of the object;

[0022] A third processing module, used for randomly selecting sampling points in the non-object area for determining the true phase and the distorted phase;

[0023] The fourth processing module is used to construct an error compensation model between the real phase and the distorted phase, and use the corresponding relationship established by the sampling points to obtain the harmonic coefficients of the error compensation model using the least square method;

[0024] A fifth processing module, used to obtain distortion phase sampling points, and establish a lookup table between distortion phase and correction phase using the sampling points as initial values;

[0025] A sixth processing module, used for correcting the distortion phase of the object by using a linear interpolation algorithm based on a lookup table;

[0026] The seventh processing module is used to restore the three-dimensional shape of the object based on the corrected distortion phase in combination with the system calibration parameters.

[0027] Preferably, the second processing module is used to obtain the distorted phase of the object by wrapping the phase and the fringe order according to the deformed fringe pattern and the deformed speckle pattern.

[0028] Preferably, the error compensation model between the real phase and the distorted phase is:

[0029] P=B0*p+B1*sin(Np)+B2*sin(2Np)+B3*sin(3Np)+...+B n *sin(nNp);

[0030] Among them, p represents the true phase, P represents the distorted phase, N represents the number of phase shift steps of the fringe pattern, and B is the error compensation model coefficient.

[0031] Preferably, the fifth processing module is used to obtain distortion phase sampling points at intervals of 0.01 within the period of the wrapped phase [-π,π], and use the sampling points as initial values ​​to obtain the optimized correction phase using the Gauss-Newton iterative algorithm, and establish a lookup table between the distortion phase and the correction phase.

[0032] The present invention only needs to project three fringe patterns and one speckle pattern onto the surface of the object once, and the measurement speed is relatively fast; the present invention does not require a pre-calibration process or additional fringe collection, the algorithm is simple, and the measurement flexibility is relatively high; the present invention obtains the corresponding information of the distorted phase and the true phase of the sampling point in real time in the measurement link to calculate the higher harmonic coefficients in the phase error compensation model, and then uses the Gauss-Newton iteration method to solve the corresponding lookup table of the periodic phase and the correction phase, and then the lookup table can be used to perform high-precision optimization correction on the entire wrapped phase of the object, which greatly reduces the calculation amount of point-by-point nonlinear optimization and realizes high-speed and high-precision three-dimensional measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0034] Figure 1 It is a flow chart of the speckle-assisted real-time phase nonlinear error correction method of the present invention;

[0035] Figure 2 The overall structural diagram of the measuring device used in the present invention;

[0036] Figure 3 It is a schematic diagram of the process of obtaining the model sampling points in the experiment;

[0037] Figure 4 It is a schematic diagram of the phase correction process of the experiment;

[0038] Figure 5 It is a schematic diagram of the point cloud of the experimental results;

[0039] In the figure: 1- camera, 2- projector, 3- object to be measured, 4- dot calibration plate, 5- target object to be measured. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0042] Embodiment 1:

[0043] like Figure 1 , 2 As shown, an embodiment of the present invention provides a speckle-assisted real-time phase nonlinear error correction method, comprising:

[0044] S100, calibrated camera and projector

[0045] Projector 2 is used to project a series of stripes with three frequencies and twelve phase shifts in the horizontal and vertical directions onto the center calibration plate 4. Camera 1 is used to shoot the center calibration plate, and the position of the calibration plate is adjusted to obtain multiple sets of calibration plate stripe patterns with different postures. The monocular camera calibration program of the open source computer vision library OPENCV is called to process multiple sets of calibration plate blank patterns with different postures to calibrate camera 1. The multi-frequency heterodyne method is used to dephase the calibration plate stripe pattern, and the "inverse camera calibration method" is used to calibrate projector 2 to complete the calibration of the monocular structured light 3D reconstruction system.

[0046] In the calibration phase, projector 2 projects multi-step phase-shifted fringes onto a reference surface, captures the fringe pattern of the reference surface, and determines the absolute phase pixel by pixel at the camera end; projector 2 projects the speckle pattern onto the reference surface, and uses camera 1 to capture the speckle pattern of the reference surface, thereby establishing a mapping relationship between the reference speckle image and the absolute phase.

[0047] S200, calculating the wrapping phase and the fringe order according to the deformed fringe pattern and the deformed speckle pattern modulated by the surface profile of the object captured by the camera, and then obtaining the distorted phase of the object;

[0048] S210, in three-dimensional shape measurement, placing the object on a reference surface, projecting and photographing a deformation fringe pattern modulated by the surface contour of the object, and calculating its wrapping phase;

[0049] Specifically, in the three-dimensional shape measurement, the object 5 is a three-dimensional plaster statue. The object is placed on the reference surface to become the measured object 3, and projection shooting is performed. The deformation fringe pattern of the photographed object is a three-step phase shift deformation fringe pattern. The three-step phase shift deformation fringe pattern is used to calculate the wrapping phase. The wrapping phase calculation formula is as follows:

[0050]

[0051] Where (x, y) is the image coordinate of each pixel in the deformed fringe image, I n (x,y) is the pixel intensity at coordinate (x,y), N is the number of phase shift steps, is the wrapping phase,

[0052] Get the wrapped phase PhaL_wrapped of object 5.

[0053] S220, based on the deformation speckle pattern I o and the speckle pattern of the reference surface I r , calculate the fringe order of each pixel of the object, perform phase unwrapping on the wrapped phase, and obtain the distorted phase of the object;

[0054] The method for determining the fringe order of the object pixel point is as follows: based on the polar line constraint of the camera and the projector, the polar line of the object corresponding to the reference surface can be found by corresponding the phase coordinates on the projector surface and the reference surface. Then, the correlation between the local speckle pattern of the object and the reference speckle pattern can be used to determine the same-name points of the measured point in the reference speckle pattern. The same-name points have the same fringe order, and the fringe order of the measured point can be determined according to the mapping relationship between the reference speckle pattern and the absolute phase.

[0055] Select each pixel of the object with coordinates (x_m, y_m) to obtain the local speckle image I of each pixel. L _m, that is, the 13*13 local speckle window centered at the coordinate (x_m, y_m), and then use the system calibration coefficient to find I o Each pixel point corresponds to the epipolar line on the projector surface, and the corresponding limit correspondence on the reference surface can be found to obtain the local speckle pattern I of the point to be matched on the reference speckle pattern. R _k, the local speckle pattern I L _m and the local speckle pattern I to be matched on the reference speckle pattern R _k performs speckle correlation calculation, and the point with the highest correlation is the point with the same name in the reference speckle pattern. Then, the fringe order of each pixel is determined according to the mapping relationship between the reference speckle pattern and the absolute phase.

[0056] The correspondence between the epipolar lines on the projector simulation surface and the epipolar lines on the reference surface is to map the epipolar lines in the projector pixel coordinates to I r The pixels on the projector are measured by the absolute phase in the horizontal and vertical directions, that is, each pixel corresponds to an absolute phase coordinate, which is different from the absolute phase in the horizontal and vertical directions on the reference plane, that is, there is also a phase coordinate (Φ rh ,Φ rv ), and the phase coordinates are matched, where the phase coordinates (Φ rh ,Φ rv ) is closest to the polar line in the projector phase coordinates.

[0057] I o and I r The corresponding points with the same name have the same wrapped phase value, which can be compared by I o Wrap Phase and I r The wrapping phase φ r (x, y), reduce the point on the epipolar line to be matched and calculated to the point with I o The pixels above have the same wrapped phase value. This greatly improves the speed of obtaining points with the same name, that is, the speed of phase unwrapping.

[0058] I r Upper absolute phase Φ rhand the wrapping phase φ r The mathematical expression between is:

[0059] φ r =Φ r mod(2π).

[0060] The correlation calculation between the local speckle pattern of the pixel point and the speckle pattern of the reference surface uses the value of the improved zero mean normalized correlation (VZNCC) to calculate the similarity of the speckle pattern. The VZNCC calculation formula is as follows:

[0061]

[0062] Where n is the relevant window size, and Deformation speckle pattern I o and reference surface speckle pattern I r The intensity of the pixels in the correlation window of the image.

[0063] After determining the same-name points of the reference speckle pattern, the absolute phase of the same-name points can be determined through the mapping relationship between the reference surface speckle pattern and the absolute phase, and the fringe order can be obtained. The fringe order calculation formula is as follows:

[0064]

[0065] Among them, Φ(x,y) is the absolute phase of the same name point in the reference plane, is the wrapping phase of the object.

[0066] Unwrap the wrapped phase of each pixel in the object area to obtain the distortion phase Φ L ,Right now, in, Wrap the phase for the object, such as Figure 3 (d) shown.

[0067] S300, extract the mask of the object area, and randomly select sampling points in the non-object area for determining the true phase and the distorted phase

[0068] S310, determining a non-object region to select random sampling points, extracting a mask of the object region through a difference map of a phase map of the object and a phase map of a reference surface, and further determining a mask of the non-object sampling region.

[0069] Specifically, the mask image of the sampling area is determined based on the reference surface image and the object image, such as Figure 3 As shown in (a) and (b), the reference phase image and the object phase image are obtained, as shown in Figure 3 The difference between (c) and (d) is obtained by subtracting them to obtain the difference map diff_map, as shown in Figure 3As shown in (e), a threshold D is set. If the pixel value in the difference map diff_map is greater than the threshold D, the pixel in the mask map is 1, otherwise it is all 0. Finally, the sampling area mask map Mask is obtained, so that the sampling point can be selected in the mask area, such as Figure 3 S320: Based on the high-precision phase of the reference surface obtained in the calibration step, the correspondence between the distorted phase phai_gamma and the real phase phai_real of the sampling point is obtained.

[0070] Specifically, the sampling points are selected by randomly sampling the pixels in the region based on the region mask map Mask, and selecting m sampling points, such as Figure 3 (f) shown.

[0071] The distortion phase of the sampling point refers to the distortion phase of the object calculated by the three-step phase shift fringe pattern in the measurement link, that is, the distortion phase of the sampling point {P1, P2, ..., P m}.

[0072] The real phase of the sampling point refers to the high-precision absolute phase obtained in the horizontal direction of the reference plane using the three-frequency heterodyne twelve-step phase shift method in the calibration link as its real phase {p1, p2, ..., p m}.

[0073] S400, constructing an error compensation model between the real phase and the distorted phase, and using the corresponding relationship established by the sampling points to obtain the harmonic coefficients of the error compensation model using the least square method;

[0074] Based on the fact that all pixels on the fringe pattern have the same harmonic coefficient characteristics, an error compensation model between the distorted phase and the real phase of the fringe pattern is established. The corresponding relationship between the distorted phase phai_gamma of the sampling point and the real phase phai_real is used to calculate the harmonic coefficient B of the error compensation model in the fringe pattern by the least squares method. n ] T .

[0075] The error compensation model of the distorted phase and the true phase can be expressed as:

[0076] P=B0*p+B1*sin(Np)+B2*sin(2Np)+B3*sin(3Np)+...+B n *sin(nNp);

[0077] Where p represents the true phase, P represents the distorted phase, and N represents the number of phase shift steps of the fringe pattern.

[0078] The error compensation model coefficient calculation formula is as follows:

[0079] B=(J T J) -1 J T P

[0080] Among them, the superscript T represents transposition, J is the matrix related to the real phase calculation, and P is the matrix of the pixel point distortion phase, which can be expressed as:

[0081]

[0082] P=[P1 P2 … P m ] T .

[0083] S500, obtaining distortion phase sampling points at intervals of 0.01 within a period of the wrapped phase [-π,π], and using the sampling points as initial values, respectively, using the Gauss-Newton iterative algorithm to obtain the optimized correction phase, and establishing a lookup table between the distortion phase and the correction phase;

[0084] S510, obtaining distortion phase sampling points at intervals of 0.01 for the wrapped phase [-π,π] within one cycle;

[0085] S520, according to the error compensation model, using the distortion phase as the initial value, using the Gauss-Newton iteration method to solve the correction phase corresponding to each interval of the distortion phase in the periodic phase, thereby establishing a lookup table corresponding to the distortion phase and the correction phase. Figure 4 (a) shown.

[0086] Specifically, an error compensation model for all pixel points of the object is obtained based on the high-order harmonic coefficient B, and the original distorted wrapped phase is used as the initial value of the Gauss-Newton iteration method, and the optimized correction phase is solved by the Gauss-Newton iteration method;

[0087] Specifically, the Gauss-Newton iteration method is an optimization algorithm for solving nonlinear least squares problems. The main purpose is to use the original distorted wrapped phase as the initial value, find the parameters that minimize the sum of square errors in the model through an iterative method, and then obtain the optimized phase.

[0088] S600, based on the lookup table, uses a linear interpolation algorithm to correct the distortion phase of the object

[0089] Based on the corresponding lookup table of periodic distortion phase and optimized phase in S500, the distorted wrapping phase of the entire object is optimized pixel by pixel, and refined linear interpolation is performed to obtain the optimized wrapping phase, and then the fringe order is used to obtain the corrected distortion phase.

[0090] Specifically, the corrected phase error is improved by 86.7% compared to the original distortion phase error. Figure 4(b) and (c) are the phase diagrams before and after correction, respectively. Figure 4 (d) and (e) are the phase error diagrams after correction, which significantly improves the phase accuracy.

[0091] S700, based on the corrected distortion phase and in combination with system calibration parameters, restore the three-dimensional shape of the object.

[0092] Specifically, the 3D coordinates of the object are solved by the calibration parameters of the monocular system from the absolute phase of the corrected object, thereby restoring the 3D shape of the object. The 3D point cloud is as follows: Figure 5 shown.

[0093] Embodiment 2:

[0094] The embodiment of the present invention further provides a speckle-assisted real-time phase nonlinear error correction device, comprising:

[0095] The first processing module is used to calibrate the camera and projector

[0096] A second processing module is used to obtain the distortion phase of the object according to the deformation fringe pattern and the deformation speckle pattern modulated by the surface profile of the object;

[0097] A third processing module, used for randomly selecting sampling points in the non-object area for determining the true phase and the distorted phase;

[0098] The fourth processing module is used to construct an error compensation model between the real phase and the distorted phase, and use the corresponding relationship established by the sampling points to obtain the harmonic coefficients of the error compensation model using the least square method;

[0099] A fifth processing module, used to obtain distortion phase sampling points, and establish a lookup table between distortion phase and correction phase using the sampling points as initial values;

[0100] A sixth processing module, used for correcting the distortion phase of the object by using a linear interpolation algorithm based on a lookup table;

[0101] The seventh processing module is used to restore the three-dimensional shape of the object based on the corrected distortion phase in combination with the system calibration parameters.

[0102] As an implementation of the embodiment of the present invention, the second processing module is used to obtain the distortion phase of the object through wrapping phase and fringe order according to the deformed fringe pattern and the deformed speckle pattern.

[0103] As an implementation method of an embodiment of the present invention, the error compensation model between the real phase and the distorted phase is:

[0104] P=B0*p+B1*sin(Np)+B2*sin(2Np)+B3*sin(3Np)+...+Bn *sin(nNp);

[0105] Among them, p represents the true phase, P represents the distorted phase, N represents the number of phase shift steps of the fringe pattern, and B is the error compensation model coefficient.

[0106] As an implementation method of an embodiment of the present invention, the fifth processing module is used to obtain distortion phase sampling points at intervals of 0.01 within the period of the wrapped phase [-π,π], and use the sampling points as initial values ​​to obtain the optimized correction phase using the Gauss-Newton iterative algorithm, and establish a lookup table between the distortion phase and the correction phase.

[0107] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A speckle-assisted real-time phase nonlinear error correction method, characterized in that: include: S100, calibrate the camera and projector; S200, obtaining a distortion phase of the object according to a deformation fringe pattern and a deformation speckle pattern modulated by a surface profile of the object; S300, randomly selecting sampling points for determining the true phase and the distorted phase in the non-object area; S400, constructing an error compensation model between the real phase and the distorted phase, and using the corresponding relationship established by the sampling points to obtain the harmonic coefficients of the error compensation model using the least square method; S500, obtaining distortion phase sampling points, and using the sampling points as initial values ​​to establish a lookup table between the distortion phase and the correction phase; S600, based on the lookup table, using a linear interpolation algorithm to correct the distortion phase of the object; S700, based on the corrected distortion phase and in combination with system calibration parameters, restore the three-dimensional shape of the object.

2. The speckle-assisted real-time phase nonlinear error correction method according to claim 1, characterized in that: In S200, the distortion phase of the object is obtained by wrapping the phase and the fringe order according to the deformed fringe pattern and the deformed speckle pattern.

3. The speckle-assisted real-time phase nonlinear error correction method according to claim 2, characterized in that: The error compensation model between the true phase and the distorted phase is: <h2 style=";text-align:left;direction:ltr">P = B0*p+B1*sin(Np)+B2*sin(2Np)+B3*sin(3Np)+...+B<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> *sin(nNp); Among them, p represents the true phase, P represents the distorted phase, N represents the number of phase shift steps of the fringe pattern, and B is the error compensation model coefficient.

4. The speckle-assisted real-time phase nonlinear error correction method according to claim 3, characterized in that: In S500, the distortion phase sampling points are obtained at intervals of 0.01 within the period of the wrapped phase [-π,π], and the sampling points are used as initial values ​​to obtain the optimized correction phase using the Gauss-Newton iterative algorithm, and a lookup table between the distortion phase and the correction phase is established.

5. A real-time phase nonlinear error correction device based on speckle assistance, characterized in that: include: The first processing module is used to calibrate the camera and projector A second processing module is used to obtain the distortion phase of the object according to the deformation fringe pattern and the deformation speckle pattern modulated by the surface profile of the object; A third processing module, used for randomly selecting sampling points in the non-object area for determining the true phase and the distorted phase; The fourth processing module is used to construct an error compensation model between the real phase and the distorted phase, and use the corresponding relationship established by the sampling points to obtain the harmonic coefficients of the error compensation model using the least square method; A fifth processing module, used to obtain distortion phase sampling points, and establish a lookup table between distortion phase and correction phase using the sampling points as initial values; A sixth processing module, configured to correct the distortion phase of the object by using a linear interpolation algorithm based on a lookup table; The seventh processing module is used to restore the three-dimensional shape of the object based on the corrected distortion phase in combination with the system calibration parameters.

6. The speckle-assisted real-time phase nonlinear error correction device according to claim 5, characterized in that: The second processing module is used to obtain the distortion phase of the object through the wrapping phase and the fringe order according to the deformed fringe pattern and the deformed speckle pattern.

7. The speckle-assisted real-time phase nonlinear error correction device according to claim 6, characterized in that: The error compensation model between the true phase and the distorted phase is: <h2 style=";text-align:left;direction:ltr">P = B0*p+B1*sin(Np)+B2*sin(2Np)+B3*sin(3Np)+...+B<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> *sin(nNp); Among them, p represents the true phase, P represents the distorted phase, N represents the number of phase shift steps of the fringe pattern, and B is the error compensation model coefficient.

8. The speckle-assisted real-time phase nonlinear error correction device according to claim 7, characterized in that: The fifth processing module is used to obtain the distortion phase sampling points at intervals of 0.01 within the period of the wrapped phase [-π,π], and use the sampling points as initial values ​​to obtain the optimized correction phase using the Gauss-Newton iterative algorithm, and establish a lookup table between the distortion phase and the correction phase.