A kind of detection method for the cooperation of large-scale workpiece fitting surface
Technical field
The invention discloses a kind of detection methods for the cooperation of large-scale workpiece fitting surface, belong to the skill that large-scale workpiece assembles
Art field.
Background technology
It is unable to do without machine in life, and machine is then that the mutual cooperation of multiple parts is needed to assemble is coefficient.
Defined performance requirement can be reached by needing not move through any repair in the mutual assembling process of parts, but for big
For type workpiece, installation combines and verify whether cooperation qualification in the process, it is necessary to which artificial participation can just be completed, and exist
Great work intensity, required labour is more, workpiece loss is big and the adverse effects such as time loss is more.
The content of the invention
Based on technical problem in the prior art, coordinate result and error size in order to obtain and reduce and work
Power, the present invention propose a kind of fitting surface fitting method based on large-scale workpiece, are carried out using the image for representing actual large-scale workpiece
The method coordinated two-by-two saves the troublesome operation of staff, directly by the results show of fitting surface in image assembling, simply
It is convenient, clear objective.
The technical solution adopted by the present invention is as follows:
A kind of detection method for the cooperation of large-scale workpiece fitting surface comprises the following steps:
Step 1, gathered respectively using camera two large-scale workpieces fitting surface installation diagram picture, respectively coordinate image I,
Coordinate image II;
Cooperation image I, cooperation image II are passed in computer by step 2, carry out image procossing, i.e., in image I is coordinated
Optional at least four characteristic point, and identify the pixel coordinate value of each point, the first step initial parameter for completing image adaptation is set
It puts;
Step 3 in image II is coordinated selects and coordinates the identical characteristic point selected in image I successively, and according to
Corresponding order records the pixel coordinate value for preserving selected point successively, and the second step initial parameter for completing image adaptation is set
It puts;
Step 4, the initial parameter determined according to step 2 and step 3 obtain the conversion relational expression of two images;
Step 5 coordinates the characteristic point selected in image according to conversion relational expression and two width, acquires the II conversion of cooperation image
When flexible, rotational value, 4 characteristic points of flexible, rotational value and selection is recycled to position this two images, complete to match somebody with somebody
Close the assembling process of image.
Cooperation image I, cooperation image II described in step 1 from different angle, different distance, different focal length it is same
Etc. contents image.
Record the picture for preserving each point in step 2, step 3 respectively successively according to upper left, lower-left, upper right, the order of bottom right
Plain coordinate value.Record the coordinate value of institute's reconnaissance in sequence, simply according to the quadrangle formed each angle direction
For, convenient for preserving and identifying, and the point recorded between two width mating surfaces is corresponded, convenient for coordinating image I
I is corrected, at the same put selection mistake when can be corrected in real time, the order of 4 points can be chosen in any order, only
It is preserved when being and preserving according to the position of corresponding points.
The characteristic point forms a quadrangle.Four points form quadrangle, two width mating surfaces be remedied to same
In one coordinate system, correction while is that all the points in entire image are carried out to reacquire new coordinate value, is become including geometry
It changes, affine transformation etc., each deformation beneficial to mating surface is corrected and obtains correct testing result, if selected four points
If forming straight line, simply to variations such as the rotation and translations on image progress geometric direction, required knot is not achieved
Fruit causes harmful effect to final cooperation result.
The detailed process of step 4 is as follows:Using the transformational relation between two dimensional image coordinate system, the two of mutual cooperation is acquired
The correspondence parametric variable converted between width image obtains final complete conversion relational expression.
The concrete processing procedure of step 5 is as follows:
The conversion relational expression finally acquired according to step 4 brings the pixel coordinate value of each point coordinated in image II into
The conversion relational expression subsolution goes out the pixel coordinate value of each point in the same coordinate system with cooperation image I, is sat with new pixel
Scale value replaces old pixel coordinate value, assigns the position that each in cooperation image II is put again, then according to cooperation image I with
Anchor point in cooperation image II will coordinate image II to overlap with cooperation image I positioning with characteristic point, draw assembling
Cooperation afterwards is as a result, complete the engagement process of large-scale workpiece fitting surface.
Beneficial effects of the present invention are as follows:
The fitting method only needs a high definition camera that can coordinate well large-scale workpiece, after being coordinated
Error size, save time and cost for the installation and the consume of material of follow-up parts.Its feature is that two width coordinate
Image is derived from different angle, different distance, the image of the equivalence of different focal length, using 4 characteristic points to two width figures
Picture is corrected, and changes its rotation angle, scaling, perspective ratio etc., to obtain all equal two images of each factor,
4 characteristic points is recycled to carry out positioning alignment to two images, correctly to obtain the cooperation result of fitting surface.By using 4 points
To coordinating the research of image flame detection, selection determines optimal parametric variable, becomes so as to fulfill to flexible, the rotation of cooperation image II
Change.
Description of the drawings
Fig. 1 coordinates image I and coordinates the characteristic point example of image II selections;
Fig. 2 large-scale workpiece fitting method systems function diagrams;
Fig. 3 large-scale workpiece fitting method system flow charts.
Specific embodiment
The present invention is described in detail below in conjunction with the accompanying drawings:
As shown in Figure 1-Figure 3, a kind of fitting method for large-scale workpiece fitting surface, mainly includes:The selection of characteristic point,
The positioning of image.Wherein, the selection of characteristic point is arbitrary in mating surface, but four characteristic points have to form quadrangle,
Otherwise mating surface II can not be converted according to mating surface I, causes work invalid;The selection of characteristic point is according to cooperation in mating surface I
Upper left, lower-left, upper right, this four order directions of bottom right in face are chosen, while identify each selected characteristic point successively
Pixel coordinate value, record preserves successively in the order described above;The selection of characteristic point is according to selected in mating surface 1 in mating surface II
Characteristic point choose same characteristic point successively, while the pixel coordinate value of each selected characteristic point is identified, according to upper
Stating order, record preserves successively;The selection of 4 pairs of characteristic points is for contacting between mating surface I and mating surface II, to realize image
Cooperation provides data and supports, the correctness that characteristic point is chosen ensure that the requirement of fit precision;Image is positioned for match somebody with somebody
Conjunction face I is fixed with mating surface II, and when image adaptation overlaps two fixing points, is carried out according still further to 4 corresponding characteristic points
Flexible translation transformation, to reach perfect cooperation together, cooperation result is more accurate.The most result exhibition after image adaptation at last
Now in user, user is facilitated to be analyzed and judged, be that the product quality of large-scale workpiece improves reliable suggestion, it is specific to implement
Method is as follows:
1st, the installation diagram picture of the fitting surface of two large-scale workpieces is gathered respectively using high definition camera, respectively cooperation image I,
Coordinate image II.
2nd, the installation diagram picture of the large-scale workpiece of acquisition is passed in computer, carries out image procossing, appointed in image I is coordinated
4 characteristic points are selected, and identify the pixel coordinate value of each point, are recorded successively according to upper left, lower-left, upper right, the order of bottom right
The pixel coordinate value of characteristic point is preserved, the first step initial parameter for completing image adaptation is set.
3rd, select successively in image II is coordinated and coordinate 4 identical characteristic points selected in image I, and according to phase
Corresponding order records the pixel coordinate value for preserving selected point successively, and the second step initial parameter for completing image adaptation is set.
4th, according to the definite initial parameter of step 2 and step 3, using the transformational relation between two dimensional image coordinate system, ask
The correspondence parametric variable converted between the two images that must be cooperated obtains final complete conversion relational expression.Process is as follows:
The image adaptation principle of large-scale workpiece is coordinated according to the characteristic of homography matrix, for homography matrix
Using it is the matrix of a 3*3, i.e.,:
Include 8 unknown parameters ' values, therefore it is all unknown in homography matrix at least to need 4 pairs of characteristic points that can just be obtained
Parameter value, therefore, all pixels coordinate value according to acquired in step 2 and the selected characteristic point of step 3 is as primary data.
It is a prescription formula, i.e., for the relation function that world coordinate system is converted to two dimensional image coordinate system:
It is obtained according to primary data after homography matrix, you can determine what world coordinate system was converted to two dimensional image coordinate system
Transformational relation functional expression;Four characteristic points selected in world coordinate system are represented, with point P1、P2、P3、P4It represents respectively,
In each point include the actual coordinate value of two values i.e. x and y;It represents selected in two dimensional image coordinate system
4 characteristic points, with point P1′、P2′、P3′、P4' represent respectively, wherein each point includes the pixel of two values i.e. x and y
Coordinate value;
5th, the conversion relational expression between different coordinates is finally acquired according to step 4, each point in image II will be coordinated
Pixel coordinate value bring the conversion relational expression subsolution into and go out pixel coordinate with each points of the cooperation image I in the same coordinate system
Value, old pixel coordinate value is replaced with new pixel coordinate value, assigns the position that each in cooperation image II is put again, then
According to cooperation image I with coordinating the anchor point in image II and 4 characteristic points that image II will be coordinated Chong Die with cooperation image I positioning
Together, the cooperation after assembling is drawn as a result, completing the engagement process of large-scale workpiece fitting surface.
Above-mentioned, although the foregoing specific embodiments of the present invention is described with reference to the accompanying drawings, not protects model to the present invention
The limitation enclosed, those skilled in the art should understand that, based on the technical solutions of the present invention, those skilled in the art are not
Need to make the creative labor the various modifications or changes that can be made still within protection scope of the present invention.