Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a desktop type three-dimensional scanning device, which adopts a laser MEMS galvanometer projection device to improve the depth of field of projection; capturing deformation fringe patterns in different view field ranges by adopting a plurality of groups of cameras, and improving the measurement range; and calibrating the position relation among the angle models by using a precision rotating table to splice the angle models into a complete model. The invention can cover three-dimensional scanning from a small volume to a large volume, and the smaller the measured object is, the higher the measurement precision is; the method can realize one-click scanning and obtain a better 360-degree complete model.
The invention aims to provide a three-dimensional scanning device for a desktop type large-view-field table.
The technical scheme is as follows:
the system consists of 4 to 10 cameras, 1 laser MEMS galvanometer projection device and a precise rotating platform; the laser MEMS galvanometer projection device is arranged in the middle and used for projecting structured light, the cameras are symmetrically arranged on two sides of the laser MEMS galvanometer projection device in pairs, and the distances among the symmetrically arranged cameras are L1, L2, L3, L4 and L5, wherein L1< L2< L3< L4< L5; the turret is placed within one or more fields of view of the camera. The turret is placed within one or more fields of view of the camera.
The laser MEMS galvanometer scanning projection device is used as a projection light source for three-dimensional scanning, the laser MEMS galvanometer scanning projection system is different from the traditional DLP, LCD and other projection systems, and is not provided with a projection lens. Because the light source is laser, the projection depth range is greatly improved.
The multiple groups of cameras are respectively used for shooting structured light in different fields of view to match the depth of field of the projection device, and the measuring range of the scanner is enlarged. The cost of the camera is much lower than that of the projection device, so that the cost of the equipment is not greatly increased, but the measurement range and the performance are greatly improved. Meanwhile, the basic conditions of binocular stereo vision are met, the visual fields of each group of cameras are overlapped as much as possible, and the included angle is generally 10-60 degrees, and preferably 15-45 degrees.
When the device is used for three-dimensional scanning, an object is placed on a rotating table and rotates for N times, wherein the rotating table rotates for α degrees each time, N is 360/α times, N is an integer, each time, a group of grating patterns or linear patterns are projected on the surface of the object by a laser MEMS galvanometer, the patterns on the surface of the object are shot by the camera, and the patterns are transmitted to a computer for three-dimensional point cloud calculation;
calibrating the position relation between the center of the precision rotating platform and the camera, and carrying out rigid transformation on the three-dimensional model reconstructed at each angle according to the calibration result to obtain a roughly spliced complete model; and performing optimized splicing by using ICP (inductively coupled plasma) to obtain a 360-degree three-dimensional digital model.
Advantageous effects
The invention uses the laser MEMS galvanometer projection device as a projection light source for three-dimensional structured light measurement, thereby greatly improving the projection depth of field; adopting a plurality of groups of camera designs to match the projection field of view; compared with the traditional three-dimensional scanner, the scanning range is increased by 3-5; the measurement accuracy of different sizes is different, and the accuracy of small objects is better; the precise rotary table is adopted for matching, so that the matching robustness is high, the effect is good, and the use difficulty of a user is reduced; the portable design of the turntable reduces the volume and weight of the product.
The specific implementation mode is as follows:
the calculation of the measurement range of the scanner is mainly determined by the projection device, the measurement range is matched by adopting a plurality of groups of cameras, and the configuration parameters of the scanner system are calculated as follows:
firstly, determining depth of field calculation of a laser MEMAS galvanometer projection system:
as shown in fig. 1, a gaussian laser beam emitted from a laser 11 passes through a collimating lens 12, and then enters an MEMS scanning galvanometer 13 and is reflected to the surface of an object. The focal plane of the Gaussian beam is L0At, the depth of field is Δ L. Calculating the spot size and the maximum working distance L of the light beam after passing through the lens according to the ABCD matrix2Size of spot omega2Minimum working distance L1The size of the light spot is omega1Finally, L is determined by the following constraint of 1-11And L2。
The depth of field of the laser MEMS galvanometer projection device can be determined according to the requirement of a measurement range. Second, designing the number of cameras to match the depth of field of the projection
The typical optical imaging system has a depth of field calculation formula of
In the formula: Δ L-Camera depth of field; Δ L1、ΔL2-the front and back depth of field of the imaging system; delta-the allowable circle diameter of dispersion, typically 2 times the size of the image element; f is the F number of the lens; l is the object distance. For example, F is 20mm, F is 2.0, and L is 500 mm; the pixel size is 7.5 μm, so δ is 0.015 mm. The depth of field DeltaL is calculated by a formula 3-2C1=75mm。
The system is compatible with measuring objects with different sizes, and has higher measuring precision for A group of small objects, the optical axes of each group of cameras are intersected at the center of the measuring view field, and the included angle is generally between 10 and 60 degrees, preferably between 15 and 45 degrees as shown in the following figure.
Mode of operation and data processing
The scanning mode of the desktop three-dimensional scanner designed by the invention is as follows, if the system comprises three groups of cameras:
1. designing a system:
selecting a measuring camera group such as group A, group B and group C according to the size of the measured object; each group of cameras corresponds to different measuring ranges, namely different sizes of measured objects.
a) Determining the measuring range, namely the depth range, of the laser MEMS galvanometer projection device according to the formula;
b) calculating the depth of field, namely the depth range, of the selected camera;
c) according to the method in the above inventive content, a suitable camera group is selected.
2. Rotary table calibration
As shown in the following figure, we use the rotation coordinate system as the world coordinate system and set a point Pw(xw,yw,zw) Is an arbitrary point on the object to be measured, point Pθ(xwθ,ywθ,zwθ) The coordinates corresponding to point P when the turntable is rotated counterclockwise about the axis by an angle θ, then they satisfy the relationship:
p=Rzpθ
wherein p isw(xw,yw,zw,1)TAnd pθ(xwθ,ywθ,zwθ,1)TIs Pw(xw,yw,zw) And Pθ(xwθ,ywθ,zwθ) Homogeneous coordinate in the turntable coordinate system, RzIs a corresponding rotation matrix when the rotating platform rotates around the axis by an angle theta,
model point coordinate P obtained by reconstruction of actual personc(xc,yc,zc) Is in the camera coordinate system and corresponds to the point P in the world coordinate systemw(xw,yw,zw) Satisfies the following conditions: pc=RPw+T。
The coordinate transformation between the camera coordinates and the world coordinates obtained from the above formula can be represented by R (α, γ) and T (T ═ R (α, γ)x,ty,tz)Tα, gamma is the Euler angle of rotation around the x, y and z axes respectively, when coordinate transformation is performed successively with the x, y and z rotation,
let Pc(xc,yc,zc) And Pw(xw,yw,zw) Corresponding to a homogeneous coordinate of pc(xc,yc,zc1) and pw(xw,yw,zw1), then pc=Mpw。
Wherein,since there is no requirement for the x-and y-axis directions by point cloud stitching with the rotating table coordinate system, γ can be set to 0, and the transformation matrix M can be simplified as:
thus, for the known point P in the camera coordinate system that we have reconstructedc(xc,yc,zc) The turntable rotates anticlockwise around the axis by an angle theta corresponding to a point Pcθ(xcθ,ycθ,zcθ) They satisfy:
pc=MRzM-1pcθ \*MERGEFORMAT(3-7)
wherein p isc(xc,yc,zc1) and pcθ(xcθ,ycθ,zcθ1) is Pc(xc,yc,zc) And Pcθ(xcθ,ycθ,zcθ) Corresponding homogeneous form.
Correctly placing the rotating table, and marking the chessboard grids at the center of the rotating table where the board is placed so that the object is in the centers of two images of a group of cameras; calculating the coordinate P of the corner point on the calibration plate under the camera coordinate systemc(xc,yc,zc) Two calibration plate pictures are taken every 10 ° rotation between ± 60 ° and their world coordinates are calculated.
Thus, we obtained a series of pc(xc,yc,zc1) and pcθ(xcθ,ycθ,zcθ1), wherein
M is obtained from the above equation.
3. The object to be measured is placed on the rotating table, and is scanned once, that is, after the rotating table rotates α degrees each time, the rotating table is stationary for a period of time, the scanner completes model scanning of one angle, and performs N times of rotation measurement, where N is 360/α times (N is an integer), for example, α is 45 °, and N is 8.
4. According to the calibrated rotating table center result, carrying out rigid transformation on each angle, namely using to obtain a roughly spliced complete model;
the reconstructed known point P in the camera coordinate systemc(xc,yc,zc) The angle α at which the turntable rotates anticlockwise about the axis corresponds to point Pcα(xcα,ycα,zcα) They satisfy:
pc=MRzM-1pcθ
wherein p isc(xc,yc,zc1) and Pcα(xcα,ycα,zcα1) is Pc(xc,yc,zc) And Pcα(xcα,ycα,zcα) Corresponding homogeneous form. The matrix M is obtained from step 2 turntable calibration,
Rzis the corresponding rotation matrix when the turntable rotates around the axis by an angle α,α is the angle of rotation set manually in step 3.
Therefore, we use Pose ═ MR for the corresponding modelszM-1And the result matrix is subjected to coordinate transformation to finish rough splicing of the point cloud model data.
5. Carrying out accurate splicing by using ICP (iterative Closed Point);
although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.