Disclosure of Invention
The invention provides a long-distance high-speed surface measurement method based on structured light, which aims to solve the problems in the background technology.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows: a remote high-speed surface measurement method based on structured light specifically comprises the following steps:
step S1: calibrating a high-speed camera and a DLP projector, and constructing a close-range DLP projection measurement system;
step S2: measuring an object by using a calibrated close-range DLP projection measurement system, and acquiring accurate initial surface absolute phase and initial height information of the measured object;
step S3: calibrating X-Y direction and Z direction positions of a close-range DLP projection measurement system by using a planar target and a guide rail;
Step S4: using a high-speed camera and a mechanical projector to build a remote mechanical projection measurement system, and fitting a height-phase mapping relation by combining the initial height information acquired in the step S2 to assist in completing the joint calibration of the remote mechanical projection measurement system;
step S5: the phase shift type structured light generated by the close-range DLP projection measurement system in the step S1 is utilized, the DLP generates multi-frequency phases, and absolute phase information is obtained; acquiring an initial phase of the mechanical projection grating by utilizing a system joint calibration formula;
step S6: and capturing the dynamic process of the object by using a calibrated remote mechanical projection measurement system, and obtaining the deformation of the measured object by using an FTP technology and a height-phase mapping.
Preferably, DLP projector pixel coordinates x p, high-speed camera pixel coordinates (x c,yc), high-speed camera internal reference matrix A c, high-speed camera external reference matrix [ R c,tc [, perspective transformation matrix P c, world coordinates (x w,yw,zw) are defined.
Preferably, in the step S1, the high-speed camera and the DLP projector are calibrated, and a close-range DLP projection measurement system is built, which specifically includes: fixing the positions of a high-speed camera and a DLP projector, placing a plane target in the field of view of the high-speed camera, striking the DLP projector on the plane target, acquiring target images of different poses by the high-speed camera, and establishing a linear relation between a pixel coordinate x p of the corresponding DLP projector and a pixel coordinate (x c,yc) of the high-speed camera: Adopting a small-hole imaging model, and obtaining the relationship between world coordinates (x w,yw,zw), high-speed camera pixel coordinates (x c,yc) and DLP projector pixel coordinates x p based on a high-speed camera internal reference matrix A c, a high-speed camera external reference matrix [ R c,tc ] and a perspective transformation matrix P c:
preferably, the step S2 specifically includes: an initial position is selected, a DLP projector is adopted to project a phase shift grating, surface absolute phase information phi 0 (u, v) of the initial position is obtained, and then initial height information h 0 (u, v) is obtained by utilizing the relation between calibrated world coordinates and pixel coordinates.
Preferably, the step S3 is specifically that a checkerboard is adopted for calibration in the horizontal X-Y direction, and a guide rail is adopted for calibration in the vertical Z axis; moving along the Z-axis direction using a series of planes of known displacement; fitting the two positions to a formula according to different positions;
The formula represents the height-phase mapping relation of the close-range DLP projection measurement system; wherein: a 1、b1 is a constant; h (u, v) is height information; ΔΦ 1 (u, v) is the absolute phase of a projection measurement system using close range DLP.
Preferably, in the step S4, a mechanical projector and a high-speed camera are used, a series of identical planar targets are placed at the same position in the step S3, the Z-axis direction is identical to that in the step S3, and FTP is used to obtain the absolute phase of the plane in each position in the step; a series of planes of known displacement are utilized; moving along the Z-axis direction; using different positions, the formula is fitted:
The formula represents the height-phase mapping relation of the remote mechanical projection measurement system; wherein: a 2、b2 is a constant; h (u, v) is height information; ΔΦ 2 (u, v) is the absolute phase using a remote mechanical projection measurement system.
Preferably, in the step S5, the formula of system calibration is:
Wherein: Is the absolute phase of DLP projector,/> The absolute phase of the object is the mechanical projection grating; is height information; the first equation represents the close range DLP projection measurement system height-phase mapping to assist in the fitting of the system joint calibration formula described above.
Preferably, in the step S5, the mechanical projector is combined with the FTP technology to obtain the wrapped phase, and then the initial phase is used as a reference to obtain the accurate absolute phase; and finally, obtaining the deformation quantity of the measured object through height-phase mapping.
The beneficial effects of adopting above technical scheme are:
1. According to the long-distance high-speed surface measurement method based on the structured light, provided by the invention, continuous measurement can be realized while the measurement accuracy is ensured by adopting a double projector and high-speed camera system structure. This combined structure and the ability to measure continuously ensures the accuracy and stability of the measurement results.
2. The invention provides a structured light-based long-distance high-speed surface measurement method, which adopts a far and near system combined calibration and phase accurate solving technology to ensure the measurement feasibility in a high-noise environment. By calibrating system parameters and using accurate phase calculation techniques, the effects of systematic errors and noise can be eliminated, thereby obtaining reliable measurement results.
3. The long-distance high-speed surface measurement method based on the structured light provided by the invention adopts the structured light technology, and can realize non-contact, rapid and efficient surface measurement compared with the traditional measurement method. The structured light projection and phase solving technology can capture a large amount of data in a short time, and can process and analyze the data in real time, so that the measurement efficiency is improved.
Detailed Description
The following detailed description of the embodiments of the invention, given by way of example only, is presented in the accompanying drawings to aid in a more complete, accurate and thorough understanding of the concepts and aspects of the invention, and to aid in its practice, by those skilled in the art.
As shown in fig. 1 to 3, the present invention is a structured light-based remote high-speed surface measurement method, a high-speed camera, and a photographing rate of 1000000 frames/second; a DLP projector; and a mechanical projector component designed by combining a scene is combined, and a laser is applied to a light source so as to realize the requirement of high-speed long-distance measurement. The method specifically comprises the following steps:
step S1: fixing the positions of a high-speed camera and a DLP projector, placing a plane target in the field of view of the high-speed camera, wherein the DLP projector is arranged on the plane target, and the high-speed camera is used for collecting target images;
Converting the pixel coordinates of the image to physical size coordinates, creating a linear relationship corresponding to projector pixel coordinates x p and high-speed camera pixel coordinates (x c,yc):
Using a small-hole imaging model, based on a high-speed camera internal reference matrix a c, a high-speed camera external reference matrix [ R c,tc ], and a perspective transformation matrix P c, the relationship between world coordinates (x w,yw,zw) and high-speed camera pixel coordinates (x c,yc) is described as follows:
The relationship between world coordinates (x w,yw) and DLP projector pixel coordinates (x p,yp) is also as follows:
The relationship between world coordinates (x w,yw,zw), DLP projector pixel coordinates (x p,yp), and high-speed camera pixel coordinates (x c,yc) can be found concurrently as follows:
target images of different poses are acquired at different positions with a high-speed camera and a DLP projector, so that the relationship between world coordinates (x w,yw,zw) and DLP projector pixel coordinates (x p,yp) is acquired.
Step S2: an initial position is selected, a DLP projector is adopted to project a phase shift grating, surface absolute phase information phi 0 (u, v) of the initial position is obtained, and initial height information h 0 (u, v) is obtained through the calibrated parameters.
Step S3: and placing a series of planar targets, and calibrating the X-Y direction and the Z direction. The horizontal X-Y direction is calibrated by using a checkerboard, and the vertical Z axis is calibrated by using a guide rail. Moving along the Z-axis direction using a series of planes of known displacement; fitting a formula according to different positions;
The formula represents the height-phase mapping relation of the close-range DLP projection measurement system; wherein: a 1、b1 is a constant; h (u, v) is height information; ΔΦ 1 (u, v) is the absolute phase of a projection measurement system using close range DLP.
Step S4: using a mechanical projector and a high-speed camera, placing a series of identical planar targets at the same position in the step S3, wherein the Z-axis direction is identical to that in the step S3, and using FTP to obtain the planar absolute phases in the positions in the step; a series of planes of known displacement are utilized; moving along the Z-axis direction; using different positions, the formula is fitted:
The formula represents the height-phase mapping relation of the remote mechanical projection measurement system; wherein: a 2、b2 is a constant; h (u, v) is height information; ΔΦ 2 (u, v) is the absolute phase using a remote mechanical projection measurement system.
Step S5: and (3) generating multi-frequency phases by using the phase shift structured light generated by the close-range DLP projection measurement system in the step (S1) to acquire absolute phase information. Acquiring an initial phase of the mechanical projection grating by utilizing a system joint calibration formula;
the formula of the system joint calibration is as follows:
Wherein: Is the absolute phase of DLP projector,/> The absolute phase of the object is the mechanical projection grating; is height information; the first equation represents the close range DLP projection measurement system height-phase mapping to assist in the fitting of the system joint calibration formula described above.
Step S6: and capturing the dynamic process of the object by using a calibrated remote projection measurement system, acquiring a wrapping phase by combining a mechanical projector with an FTP (Fourier transform) technology, and then acquiring an accurate absolute phase by taking the initial phase as a reference. And finally, obtaining the deformation quantity of the measured object through height-phase mapping. The method comprises the following steps:
step S61: one or more binary fringes, or other fringes, are projected by a mechanical projector and converted into sine waves by an out-of-focus blur technique. The binary stripe images under different defocus conditions are shown in fig. 3;
Step S62: further, a plane is intercepted for simulation, and a nearly ideal sinusoidal grating is obtained under a proper defocus degree;
Step S63: since in actual operation, the mechanical projector cannot ensure that the defocus degree of the whole measurement area is the same, binary stripes of some areas are not in a proper defocus state, and the influence of inconsistent defocus degree is reduced through graphic operation;
Step S64: algorithms for processing a fringe image to obtain the wrapping phase include least squares, mass steering, branch-and-shoot methods, and Fourier Transform (FTP). In order to achieve rapid dynamic measurement, the FTP technique is used in the present invention. The fixed frequency binary grating fringe image projected by the projection system in step S61 is projected onto the measured object, and the deformation fringe image modulated by the geometric surface of the measured object is shot by using a high-speed camera, and the imaging deformation fringe can be expressed as:
wherein: x and y are pixel coordinates of corresponding rows and columns of points in the image respectively; i' (x, y) is the background light intensity; i "(x, y) is the modulation intensity; f 0 is the frequency of the projected fringe; Is the phase modulation due to the object height h (x, y).
To obtain the phase height and eliminate the systematic error, the system needs the phase distribution at h 0 (x, y) =0 to obtain the relative phase difference:
to obtain the phase difference of the photographed modulation fringe pattern Will/>The method is rewritten into an exponential form and two-dimensional Fourier transform is performed to obtain:
F(u,v)=A(u,v)+Q(u-f0,v)+Q*(u+f0,v);
Wherein: the fundamental frequency component Q (u-f 0, v) is the frequency spectrum component containing the object height change information, the Q or Q * information is filtered out by adopting a proper band-pass filter window to carry out inverse Fourier transform, the cotangent value of the imaginary part and the real part is taken to obtain the truncated phase phi (x, y), and the continuous phase is obtained by a space phase expansion algorithm
The relationship between the truncated phase and the phase principal value is:
wherein: n (x, y) is an integer; the unwrapping process is the process of determining n (x, y).
The measurement in this step is focused on dynamic changes, since the frame rate of the camera and the projection frame rate are high enough, the phase change between the two frames is usually small and not larger than pi. Phase unwrapping can thus be performed using time constraint characteristics. Assuming that the phase map Φ uws (x, y, S) at time S is selected as the reference phase map, the time K phase after S can be expressed as:
Wherein: Δφ i (x, y) represents the phase difference between times i and i-1; delta phi i (x, y) can be used to reflect the dynamic change process.
While the invention has been described above by way of example with reference to the accompanying drawings, it is to be understood that the invention is not limited to the particular embodiments described, but is capable of numerous insubstantial modifications of the inventive concept and solution; or the invention is not improved, and the conception and the technical scheme are directly applied to other occasions and are all within the protection scope of the invention.