Summary of the invention
The purpose of this invention is to provide a kind of method of utilizing the separate unit non-measuring digital camera to carry out the sheet metal component three-dimensional measuring, it can overcome above-mentioned the deficiencies in the prior art, satisfies the requirement of industry manufacturing to measuring accuracy and speed.
Technical scheme provided by the invention is that a kind of method of utilizing the separate unit non-measuring digital camera to carry out the sheet metal component three-dimensional measuring may further comprise the steps:
One, obtains the image of industrial sheet metal component.Automatically obtain 10 above images of industrial sheet metal component according to following image capturing method, and import image into computing machine:
A plane is set on the load-bearing rotary table, with the known unique point of some coordinates of mark on this plane (as intersection point, the grid points of crosshair) as the plane control field of points, industrial sheet metal component to be measured is placed on the plane of plane control field of points, be fixed in industrial sheet metal component to be measured top through the non-measuring digital camera of demarcating, the chief ray of digital camera is aimed at industrial sheet metal component, in the load-bearing rotary table process that machine control is rotated as calculated, digital camera is by the image of uniformly-spaced taking industrial sheet metal component to be measured, and every width of cloth image all imports computing machine in real time into.
Two, utilize edge extracting and image matching technology from image, to extract the straight line of sheet metal component image, and the image straight-line segment that all extract is preserved automatically.
Three, utilize the straight-line segment that extracts in all images as the input data, judge same space line section corresponding image straight-line segment number, be saved to rare two corresponding image straight-line segments, the high-precision three-dimensional that utilizes photogrammetric principle to carry out sheet metal component is then rebuild.
Four, the result with three-dimensional reconstruction carries out visualization display, and carries out three-dimensional measuring by computing machine.
The high-precision three-dimensional of above-mentioned sheet metal component is rebuild can adopt following method:
Utilize image straight-line segment after treatment, can carry out three-dimensional reconstruction according to the generalized point photogrammetry method; Two end points of each bar space line Duan Douyong of sheet metal component are represented, when the direction of image straight-line segment is spent more than or equal to 45, adopt first following formula; And when the direction of straight-line segment is spent less than 45, second formula below adopting;
When | β | in the time of 〉=45 °
When | β | in the time of<45 °
Wherein (X, Y, Z) the end points coordinate of representation space straight-line segment, (X
S, Y
S, Z
S) position at expression video camera place, (a
ib
ic
i, i=1,2,3) and the expression rotation matrix, f is a focus of camera, (x y) is picpointed coordinate.
Advantage of the present invention is the cheap of non-measurement digital camera, and measurement speed is fast, and precision is higher, can realize the online measurement of industrial sheet metal component, thereby raise the efficiency, and guarantees the quality that part processing is made.If hardware is all by computer control, then whole flow process can automatically be carried out, and is consuming time less than 3 minutes.
Embodiment
Utilizing before non-measuring digital camera carries out industrial sheet metal component three-dimensional measuring, earlier non-measuring digital camera is demarcated; Or directly the demarcation non-measuring digital camera of (process of obtaining camera internal position element and distortion parameter is called demarcation) had been carried out in employing.
The non-measuring digital camera scaling method can be:
1. three-dimensional controlling filed scaling method of the prior art or other scaling methods.
2. based on the scaling method at two-dimentional reference mark:
A) utilize digital camera to be calibrated to obtain the image of 4 above controlling fileds according to following method;
With the plane that is marked with the known unique point of some coordinates (as the intersection point of crosshair among Fig. 2) on it as the plane control field of points, with perpendicular to the straight line of plane control field as the Z axle, the angle of the chief ray of digital camera and Z axle is not more than 30 degree; Intersection point along Z axle and plane control field of points is taken pictures, and for every photo, the position of digital camera and three rotation angle are then different;
B) utilize edge extracting of the prior art and image matching technology from image, to extract the image coordinate at reference mark;
C) utilize the image coordinate of extracting in known reference mark planimetric coordinates and the image, obtain the s internal and external orientation initial value of digital camera by the corresponding relation between 2 d dlt and collinearity equation;
What 2 d dlt was represented is space plane and the interplanar mapping relations of picture
H=(h wherein
1, h
2, h
3, h
4, h
5, h
6, h
7, h
8)
TBe eight transformation parameters of 2 d dlt, X, Y are the planimetric control point volume coordinate, and x, y are corresponding picture coordinate.When photo is counted greater than 4, following formula can be carried out proper transformation, try to achieve the 2 d dlt parameter by separating overdetermined equation AH=0;
Collinearity equation the most frequently used in photogrammetric is:
X wherein
0, y
0, f is the elements of interior orientation (principal point and focal length) of video camera; (X
S, Y
S, Z
S) for taking the photograph station coordinates; (X, Y Z) are the object space coordinate; (x y) is corresponding picpointed coordinate; R={a
i, b
i, c
i, i=1,2,3} be photogrammetric in rotation angle commonly used, ω, the rotation matrix that κ (Y is a main shaft) constitutes; For flat field, coordinate system is based upon the controlling filed center, X then, Y-axis planar, the Z axle is vertical with the plane, this moment, the Z coordinate at all reference mark was zero; Collinearity equation is carried out conversion can obtain the expression-form identical, thereby each all can be by the 2 d dlt parametric representation with 2 d dlt; Character according to rotation matrix
With
Can get:
For two above photos, utilize following formula to find the solution principal point (x
0, y
0) initial value;
Character a according to rotation matrix
1b
1+ a
2b
2+ a
3b
3=0 can derive the solving equation of focal length:
After obtaining the initial value of principal point and focal length, further try to achieve the initial value of elements of exterior orientation; At Y is under the corner system of main shaft,
Sin ω=-b
3,
Thereby the value of three rotation angle can uniquely be determined; Separate following system of linear equations and obtain X
S, Y
S, Z
SInitial value:
D) utilize the image coordinate of extracting in known reference mark planimetric coordinates and the image, and above-mentioned digital camera s internal and external orientation initial value of trying to achieve, expressed according to the following equation tight bundle adjustment principle is carried out the high-precision calibrating of digital camera, thereby tries to achieve the exact value of digital camera s internal and external orientation; The realization non-measuring digital camera is demarcated
Wherein lens distortion difference is:
Δx=(x-x
0)(K
1r
2+K
2r
4)+P
1(r
2+2(x-x
0)
2))+2P
2(x-x
0)·(y-y
0)
Δy=(y-y
0)(K
1r
2+K
2r
4)+P
2(r
2+2(y-y
0)
2))+2P
1(x-x
0)·(y-y
0)。
Utilize the separate unit non-measuring digital camera to carry out the three-dimensional measuring (referring to Fig. 1) of industrial sheet metal component:
1. obtain the image of industrial sheet metal component.The industry sheet metal component generally can be regarded as by many straight-line segments and combines, and its image demonstrates very strong straight-line segment feature.
Referring to Fig. 2, with the rotating disk 2 that is carved with crosshair 5 on it load bearing equipment as sheet metal component 4, the coordinate of the intersection point of crosshair 5 is known, is used as the absolute control of asking fixation sheet elements of exterior orientation.Industrial sheet metal component 4 to be measured is placed on the load-bearing rotary table 2, non-measuring digital camera 1 (elements of interior orientation of camera and distortion parameter are known) through demarcating is fixed in industrial sheet metal component to be measured 4 tops, the chief ray 3 of digital camera is aimed at industrial sheet metal component 4, and by the image of uniformly-spaced taking industrial sheet metal component 4 to be measured; Obtain 10 above images (as 25) of industrial sheet metal component according to above-mentioned image capturing method, and import image into computing machine.
The rotation of part load-bearing rotary table can transfer replacement with the derotation of digital camera, and the image that two kinds of methods are obtained is of equal value.And be maintained fixed at digital camera, tool had great advantage when load-bearing rotary table was rotated under computer control, and the space of hold facility little (requisite space has only half of camera rotation mode) might realize full-automation.
2. utilize image processing meanses such as edge extracting and match and image matching technology from image, to extract the straight line of sheet metal component image, and the image straight-line segment that all extract is preserved automatically.
3. utilize the straight-line segment that extracts in all images as the input data, the high-precision three-dimensional that adopts existing straight line photogrammetric survey method or generalized point photogrammetry method to carry out sheet metal component is rebuild.
The generalized point photogrammetry method is as follows:
Generalized point photogrammetry model and traditional photogrammetric model of point exist basic difference, and it no longer requires the strict corresponding relation between spatial point and picture point, and goes for the Any shape image Reconstruction.For physical points, the generalized point photogrammetry model is identical with traditional photogrammetric model of point (collinearity equation), and each picture point observed reading can two error equations of row.There is not strict corresponding relation in point on straight-line segment, circle, the free curve etc. between spatial point and picture point, each picture point can only be according to error equation of direction row of tangent vector.As shown in Figure 3, the projection of * representation space point on photo, ● be illustrated in nearest picture point on x (or y) direction, its mathematical model be exactly adjustment rear space point project to picture point equal minimum apart from dx (or dy).When the direction of image straight-line segment is spent more than or equal to 45, adopt the error equation of x direction; And when the direction of straight-line segment is spent less than 45, adopt the error equation of y direction.For the point on circle and other free curves, then whether also has only an error equation greater than 45 degree according to the tangent vector (for example β angle among Fig. 4) of each point.The mathematical model of generalized point photogrammetry can be represented with following formula:
When | β | in the time of 〉=45 °
When | β | in the time of<45 °
Wherein (X, Y, Z) representation space point coordinate, (X
S, Y
S, Z
S) position at expression video camera place, (a
ib
ic
i, i=1,2,3) and the expression rotation matrix, f is a focus of camera, (x y) is picpointed coordinate.
4. the result with three-dimensional reconstruction shows with OpenGL or DirectX, carries out semi-automatic or full-automatic measurement.
The program that automatically is meant is calculated automatically according to preassigned measurement content, and semi-automatic then mainly is that man-machine interaction utilizes three-dimensional display interface to measure accordingly.The measurement content can be distance between points as required; Distance between line and the line, angle; Distance between face and the face, angle; And point and line, the distance of face; The distance of line and face, angle; Right alignment between circle and circle etc.