CN103075973A - Non-contact online inspection method for automobile body gap size - Google Patents

Non-contact online inspection method for automobile body gap size Download PDF

Info

Publication number
CN103075973A
CN103075973A CN2012105905858A CN201210590585A CN103075973A CN 103075973 A CN103075973 A CN 103075973A CN 2012105905858 A CN2012105905858 A CN 2012105905858A CN 201210590585 A CN201210590585 A CN 201210590585A CN 103075973 A CN103075973 A CN 103075973A
Authority
CN
China
Prior art keywords
phi
delineation
plane
curve
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012105905858A
Other languages
Chinese (zh)
Inventor
崔岸
陈洪柱
陈晓博
徐文强
冯冲
赵颖
徐利娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin University
Original Assignee
Jilin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jilin University filed Critical Jilin University
Priority to CN2012105905858A priority Critical patent/CN103075973A/en
Publication of CN103075973A publication Critical patent/CN103075973A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a non-contact online inspection method for automobile body gap size, aiming at overcoming the problems that the size of equipment is large, the equipment is inconvenient to carry, influences are apt to cause by external factors due to contact-type measurement, and online measurement and large-size covering part gap measurement cannot be realized in the prior art. The non-contact online inspection method comprises the following steps of: 1. camera calibration; 2. image acquisition: placing a gap part of an automobile body covering part in the view field of a camera to take images; 3. stereoscopic matching; and 4. three-dimensional reconstruction, which comprises the steps of: 1) according to a calibration result of a binocular stereoscopic visual system, determining three-dimensional space coordinates of gap edge points of the covering part according to stereoscopic matching points; 2) reconstructing an automobile body gap three-dimensional curve according to the determined three-dimensional space coordinate points; 3) spatially rotating the reconstructed three-dimensional curve according to included angles and directions between the curve and an x-axis, y-axis and a z-axis; and 4) respectively projecting gap curves in planes after rotation to determine the width value and the plane difference value of the gap.

Description

Bodywork gap size untouched online inspection method
Technical field
The present invention relates to the detection method in a kind of body of a motor car slit, more particularly, the present invention relates to a kind of bodywork gap size untouched online inspection method.
Background technology
Automobile is in the process of assembling, because it is common problem that the covering scale error causes more greatly having larger slit between the covering, not only affecting the size in slit between the sealing property of car load but also the covering and vibration noise and the usability of car load is closely related, if the slit between the adjacent covering is excessive, cooperation place excesssive gap such as bumper and hood, to reduce assembly precision, in the use procedure of vehicle, produce very large vibration noise; Door gap is excessive, can cause that car door sinks or fits badly, and will affect the usability of car load, thereby affects riding comfort and car load serviceable life.The gap size of bodywork surface also affects moulding and the outward appearance of car load, and people are more and more higher for the appearance requirement of automobile now, so strictly control the size in slit, be necessary condition handsome in appearance, thereby the measurement in body outer skin slit is of great significance with the control tool.The method that tradition is used for the bodywork surface gap detection mainly contains mechanical contact and measures, uses three coordinate machine, robot measurement, transit survey system, three-dimensional laser measuring instrument and measure based on electric capacity and hyperacoustic method, but these equipment volume are huger, Portable belt and be contact type measurement not, be subject to easily the impact of extraneous factor, can not satisfy the needs of on-line measurement and large-scale covering slot measurement.Development along with image processing, computer technology and industrial camera manufacture level, computer vision technique has also obtained fast development, the detection system that not only can realize the measurement of object shape, position and size in three dimensions but also compare contact just progressively becomes important means and the future developing trend of industrial products online dimension detection having larger superiority aspect intelligent, flexibility and the detection speed.
Summary of the invention
Technical matters to be solved by this invention be overcome prior art exist equipment volume huger, not Portable belt and for contact type measurement, easily be subject to extraneous factor impact, can not satisfy the problem of on-line measurement and large-scale covering slot measurement, a kind of bodywork gap size untouched online inspection method is provided.
For solving the problems of the technologies described above, the present invention adopts following technical scheme to realize: the step of described bodywork gap size untouched online inspection method is as follows:
1. the calibration phase of video camera:
(1) setting movably is covered with chequered with black and white tessellated plane target, gridiron pattern is of a size of 30mm * 30mm, with the public angle point of black box and white square as feature point for calibration, the quantity of feature point for calibration is 100, the centre of perspectivity of No. 1 video camera and No. 2 video cameras to set up world coordinate system as true origin;
(2) No. 1 video camera and No. 2 video cameras are installed and are set up Binocular Stereo Vision System, in the public view field scope of No. 1 video camera and No. 2 video cameras, place movably plane target, keeping under the static prerequisite of No. 1 video camera and No. 2 camera positions the plane of motion target and by No. 1 video camera and No. 2 video cameras the plane target is being carried out the shooting target image 15 times.
(3) utilize the calibration tool case realization of MATLAB software the target image that is read in by calibrating procedure to be revised and carried out the demarcation of angle point extraction and No. 1 video camera and No. 2 video cameras, then the result who demarcates is preserved;
2. image acquisition phase:
(1) position, body outer skin slit to be measured is placed in the public view field of Binocular Stereo Vision System and takes, obtain the image pair that two width of cloth comprise the covering slit;
(2) the logical "or" computing between the utilization image splits covering gap area to be measured from background image;
(3) utilize first mean filter that image is carried out rough handling, remove the white noise of Gaussian distribution in the image; The recycling medium filtering further carries out noise processed;
(4) after the medium filtering, utilization is adjusted the method for image gray levels and is carried out the image border enhancing, and outstanding slit profile weakens or removal impulsive noise and high frequency noise simultaneously.
3. Stereo matching stage:
(1) utilize the edge contour extraction of carrying out the bodywork gap line without initialized active contour model, it is right to obtain respectively the point that the coordinate by slit edge pixel point consists of on left image, right image;
(2) utilize outer polar curve geometrical constraint method to carry out the Stereo matching of slit edge pixel point;
(3) utilize the constraint of disparity continuity and Ordinal Consistency to reject the error match point, improve the accuracy of matching result.
4. three-dimensional reconstruction stage:
(1) according to the calibration result of the Binocular Stereo Vision System that has established, obtained the three dimensional space coordinate of covering slit marginal point by the Stereo matching point;
(2) carry out the reconstruction of bodywork gap three-dimensional curve according to the three dimensional space coordinate point of obtaining;
(3) the three-dimensional reconstruction curve is carried out Space Rotating by the angle and direction of the angle of curve and x, y, z axle;
(4) after slot line is rotated, respectively it is carried out projection in the plane, obtain width numerical value and the face difference value in slit.
Utilization described in the technical scheme refers to without the edge contour extraction that initialized active contour model carries out the bodywork gap line: define the internal energy function based on active contour model:
E int = P ( Φ ) = ∫ ∫ Ω 1 2 ( | ▿ Φ - 1 | ) 2 dxdy
Wherein: Ω ∈ R 2, the internal energy function is whether metric levels set function Φ is near distance function, for the initialization that needn't re-start level set function is prepared;
Equally, our the external energy function that defines the Snake model is:
E ext=E g,λ,v(Φ)=λA g(Φ)+vB g(Φ)
In the formula: λ, v are constant, and λ>0, and A g(Φ) and B gDefinition (Φ) is as follows,
A g ( Φ ) = ∫ ∫ Ω gδ ( Φ ) | ▿ Φ | dxdy B g ( Φ ) = ∫ ∫ Ω gH ( - Φ ) dxdy
Wherein: δ is the Dirac function, and H is the Heaviside function, A g(Φ) be the length of calculated curve, B gThen be for the evolving speed of accelerating curve (Φ);
Therefore, the energy function of whole Snake model is written as:
E(Φ)=μP(Φ)+E g,λ,v(Φ)
Initialized to the zero level set function time, if detect target in the inside of initial curve, getting v is positive number, makes initial curve to internal contraction, to reach the edge that detects target, on the contrary, if detect target in the outside of initial curve, getting v is negative, makes initial curve expand outwardly motion until detect the edge of target, in the evolution process of initial curve, external energy function E G, λ, vEffect (Φ) is exactly constantly to drive initial curve to move to the marginal position that detects target, and the effect of internal energy function P (Φ) is that initial curve is suppressed, prevent that excessive distortion from appearring in curve, and the characteristic of the symbolic distance function of maintenance level set function Φ, make detected edge contour more accurately level and smooth;
When the energy function of whole Snake model had minimum value, initial curve converged to the edge of profile, and this measuring method takes gradient descent method to find the solution the local minimum of following formula,
∂ E ∂ Φ = - μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] - λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
Wherein: Δ is Laplace operator, and div is divergence operator,
Figure BDA00002694499800033
Be Hamiltonian operator, the condition that following formula is obtained minimum value is exactly
Yet the zero level collection C (x, y) of curvilinear equation=(x, y) Φ (x, y, t)=0} is reaching the condition that must satisfy following formula in stable:
∂ Φ ∂ t = 0 = - ∂ E ∂ Φ
Therefore, we can obtain following formula:
∂ E ∂ t = μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] + λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
In following formula, have
ΔΦ ( x , y ) = ∂ 2 Φ ∂ 2 x + ∂ 2 Φ ∂ 2 y
div ( ▿ Φ | ▿ Φ | ) = Φ x 2 Φ yy - 2 Φ x Φ y Φ xy + Φ y 2 Φ xx ( Φ x 2 + Φ y 2 ) 3 2
We represent step-length with τ, and are right
Figure BDA00002694499800043
Use the forward difference formula, can obtain:
Φ i , j k + 1 - Φ i , j k τ = L ( Φ i , j k )
Wherein:
L ( Φ ) = μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] + λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
First following formula is carried out discretize here, and suppose that the step-length in x direction and y direction is the same, be h, then
Figure BDA00002694499800046
With
Figure BDA00002694499800047
Can be expressed as:
( Φ xx ) i , j k = Φ i + 1 , j k - 2 Φ i , j k + Φ i - 1 , j k h 2
( Φ yy ) i , j k = Φ i , j + 1 k - 2 Φ i , j k + Φ i , j - 1 k h 2
Therefore, ΔΦ ( x , y ) = ∂ 2 Φ ∂ 2 x + ∂ 2 Φ ∂ 2 y Discrete type be to be expressed as;
( ΔΦ ) i , j k = Φ i + 1 , j k + Φ i , j + 1 k - 4 Φ i , j k + Φ i - 1 , j k + Φ i , j - 1 k h 2
And right And
Figure BDA000026944998000413
Use central-difference formula, namely have:
( Φ x ) i , j k = Φ i + 1 , j k - Φ i - 1 , j k 2 h
( Φ y ) i , j k = Φ i , j + 1 k - Φ i , j - 1 k 2 h
Right
Figure BDA000026944998000416
Carry out discretize:
( Φ xy ) i , j k = Φ i + 1 , j + 1 k - Φ i - 1 , j + 1 k - Φ i + 1 , j - 1 k + Φ i - 1 , j - 1 k h 2
And Dirac function δ (x) has following definition:
δ ϵ ( x ) = 0 | x | > ϵ 1 2 ϵ [ 1 + cos ( πx ϵ ) ] | x | ≤ ϵ
With Dirac function δ (x) and
Figure BDA00002694499800052
And
Figure BDA00002694499800053
Discrete form be brought into tangent vector
Figure BDA00002694499800054
Expression formula in, can obtain
Figure BDA00002694499800055
Discrete type; Therefore, obtain
Figure BDA00002694499800056
Discrete expression; Obtain the iterative as follows of level set function:
Φ i , j k + 1 = τL ( Φ i , j k ) + Φ i , j k
In this detection method, get respectively λ=5.0, μ=0.04, each iteration level set function Φ is afterwards calculated in v=3.0 and τ=5.0 then n, and the curve of renewal profile, last, whether inspection reaches convergence, if not convergence, then each iteration level set function Φ is afterwards calculated in continuation n, and the curve of renewal profile, until convergence if reach convergence, is then exported the extraction result of last edge contour.
The Stereo matching that the outer polar curve geometrical constraint method of utilization described in the technical scheme is carried out slit edge pixel point refers to: left plane of delineation I 1, right plane of delineation I 2By being obtained image from No. 1 video camera and No. 2 video cameras, 1 M in the hypothesis space then puts M at left plane of delineation I 1, right plane of delineation I 2On subpoint be respectively m 1With m 2, and m 1With m 2Mutually corresponding, O 1, O 2Be respectively the photocentre of two video cameras, then put m 1, m 2, O 1, O 2, M is positioned on the same planar S l 1Be planar S and left plane of delineation I 1Intersection, the some m 1Be positioned at intersection l 1On, l 2Be planar S and right plane of delineation I 2Intersection, the some m 2Be positioned at intersection l 2On, then claim l 1Be left plane of delineation I 1Corresponding to right plane of delineation I 2Upper m 2The outer polar curve of point in like manner, claims l 2Be right plane of delineation I 2Corresponding to left plane of delineation I 1Upper m 1The outer polar curve of point, the title planar S is polar plane;
And in stereoscopic vision, the constraint of outer polar curve is defined as, and in correspondence with each other 2 are positioned on the same polar curve in two width of cloth images, namely at left plane of delineation I 1In 1 m 1Corresponding to right plane of delineation I 2On 1 m 2, then these two points must be positioned at the outer polar curve l of same 2On, in like manner, at right plane of delineation I 2On 1 m 2Corresponding to left plane of delineation I 1In 1 m 1, then 2 are positioned at the outer polar curve l of same 1On;
Outer polar curve retrains and can represent with a simple algebraic formula, that is:
m'Fm=0
Wherein, m=[u, v, 1] TWith m'=[u ', v', 1] TBe respectively left plane of delineation I 1, right plane of delineation I 2On corresponding point, F is basis matrix, and
F=A′ -T[t] xRA -1
Wherein, A', A are respectively the inner parameters of two video cameras, and A', A be 3 * 3 matrix, and R is rotation matrix, and t is translation vector, [t] xThe antisymmetric matrix of t, if hypothesis t is three-dimensional vector, i.e. t=(t x, t y, t z) T, the antisymmetric matrix of t [t] then xFor
[ t ] x = 0 - t z t y t z 0 - t x - t y t x 0
Then [t] x=-([t] x) T, [t] xBe an irreversible matrix, and be full rank not.
Utilization can drop to the one-dimensional space with the match search space by two-dimensional space with the method for upper outside polar curve constraint when carrying out body outer skin slit marginal point Stereo matching, the calculated amount in the time of can greatly reducing coupling improves the speed of mating.
Utilize continuity and Ordinal Consistency constraint rejecting error match point described in the technical scheme refer to: after the outer polar curve geometric match of process, and left plane of delineation I 1On 1 m 1At right plane of delineation I 2Upper may be corresponding two or more point, in order to obtain unique match point, we need to be to each coupling after the coupling to carrying out disparity continuity constraint and Ordinal Consistency constraint, so-called continuity constraint, if namely have be M, N on the surface of same object at 2, and 2 close proximity are if M, the N subpoint on two width of cloth images is respectively m 1, m 2With n 1, n 2, m then 1With n 1Location comparison approach, in like manner, m 2, n 2The position also very approaching, and that the surface of any object is is continuous, makes the degree of depth of M, N similar, therefore, as long as we have set up m 1With m 2Between mutual corresponding relation, just can determine according to depth difference the position of N spot projection; And Ordinal Consistency constraint, namely polar curve on the piece image is mutually corresponding with a polar curve on the other piece image, and then the putting in order of corresponding point on these two polar curves is constant.
Three-dimensional reconstruction described in the technical scheme refers to: obtain the method for object dimensional geological information according to two width of cloth or two secondary above images, an object in the hypothesis space obtains left plane of delineation I by No. 1 video camera, No. 2 video cameras 1, right plane of delineation I 2, the coordinate of 1 P in the space is [XYZ] on the object T, at left plane of delineation I 1, right plane of delineation I 2On subpoint be respectively p lAnd p r, their homogeneous coordinates are respectively [u 1v 11] T, [u 2v 21] T, p then l, p rWith P following corresponding relation is arranged:
Z c 1 u 1 v 1 1 = m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 X Y Z 1
Z c 2 u 2 v 2 1 = m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 X Y Z 1
Wherein,
m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 = M L = A l * R l T l 0 T 1
m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 = M R = A r * R r T r 0 T 1
M L, M RBe respectively the projection matrix of No. 1 video camera, No. 2 video cameras, A l, A rBe respectively the inner parameter of No. 1 video camera and No. 2 video cameras, R l T l 0 T 1 , R r T r 0 T 1 Be respectively the external parameter matrix of No. 1 video camera and No. 2 video cameras, wherein R l, R rBe respectively the rotation matrix of No. 1 video camera and No. 2 video cameras, T l, T rBe respectively the translation vector of No. 1 video camera and No. 2 video cameras, inner parameter and the external parameter of video camera obtain by camera calibration, when we obtain projection matrix M according to the inside and outside parameter of video camera L, M RAfterwards, can be with following formula cancellation Z C1Perhaps Z C2, obtain about X, Y, four systems of linear equations of Z:
( u 1 m 31 1 - m 11 1 ) X + ( u 1 m 32 1 - m 12 1 ) Y + ( u 1 m 33 1 - m 13 1 ) Z = m 14 1 - u 1 m 34 1 ( v 1 m 31 1 - m 21 1 ) X + ( v 1 m 32 1 - m 22 1 ) Y + ( v 1 m 33 1 - m 23 1 ) Z = m 24 1 - v 1 m 34 1 ( u 2 m 31 2 - m 11 2 ) X + ( u 2 m 32 2 - m 12 2 ) Y + ( u 2 m 33 2 - m 13 2 ) Z = m 14 2 - u 2 m 34 2 ( v 2 m 31 2 - m 21 2 ) X + ( v 2 m 32 2 - m 22 2 ) Y + ( v 2 m 33 2 - m 23 2 ) Z = m 24 2 - v 2 m 34 2
Wherein: (u 1, v 1, 1), (u 2, v 2, 1) and be respectively a p l, p rAt left plane of delineation I 1With right plane of delineation I 2In homogeneous coordinates, (X, Y, Z, 1) is the homogeneous coordinates under the required world coordinate system,
Figure BDA00002694499800075
Be projection matrix M LThe capable j column element of i, in like manner,
Figure BDA00002694499800076
Be projection matrix M RThe capable j column element of i, separate above-mentioned system of equations, its least square solution is required volume coordinate, then the volume coordinate point is fitted to space curve, has namely realized the three-dimensional reconstruction of bodywork gap.
Compared with prior art the invention has the beneficial effects as follows:
1. bodywork gap size untouched online inspection method of the present invention can once accurately be measured the interrelated geometrical parameters in body outer skin slit, utilizes software to carry out the demarcation of video camera, so that processing ease, succinct.
2. bodywork gap size untouched online inspection method of the present invention can be rejected unnecessary image background, be conducive to reduce calculated amount and process the needed time with the saving image, more can satisfy the requirement of real-time of online detection, in the noncontact on-line measurement in industrial products slit, have very high using value.
3. the matching algorithm of bodywork gap size untouched online inspection method employing of the present invention has very strong specific aim, not only can reduce matching error but also can save the plenty of time, improves image processing speed, saves Measuring Time.
4. the three-dimensional rebuilding method that adopts of bodywork gap size untouched online inspection method of the present invention is succinctly understandable, and the method for utilizing Space Rotating in the aftertreatment is not only so that measurement result is more directly perceived but also guaranteed higher accuracy requirement.
Description of drawings
The present invention is further illustrated below in conjunction with accompanying drawing:
Fig. 1-a is the detection principle schematic of bodywork gap size untouched online inspection method of the present invention;
Fig. 1-b is the figure enlarged diagram at A place among Fig. 1-a;
Fig. 1-c is the FB(flow block) of bodywork gap size untouched online inspection method of the present invention;
Fig. 2 is the synoptic diagram of the plane target that camera calibration adopts in the bodywork gap size untouched online inspection method of the present invention;
Fig. 3 is camera calibration synoptic diagram in the bodywork gap size untouched online inspection method of the present invention;
Fig. 4 is No. 1 camera calibration synoptic diagram in the bodywork gap size untouched online inspection method of the present invention;
Fig. 5 is No. 2 camera calibration synoptic diagram in the bodywork gap size untouched online inspection method of the present invention;
Fig. 6 is the left measurement image that the Binocular Stereo Vision System in the bodywork gap size untouched online inspection method of the present invention is taken;
Fig. 7 is the right measurement image that the Binocular Stereo Vision System in the bodywork gap size untouched online inspection method of the present invention is taken;
Fig. 8 splits gap area to be measured for the logical "or" computing of adopting between the image in the bodywork gap noncontact On-line Measuring Method of the present invention from background the left measurement image through amplifying;
Fig. 9 splits gap area to be measured for the logical "or" computing of adopting between the image in the bodywork gap noncontact On-line Measuring Method of the present invention from background the right measurement image through amplifying;
Figure 10 adopts in the bodywork gap size untouched online inspection method of the present invention without initialized active contour model the edge contour that left image carries out slot line is extracted gained image synoptic diagram;
Figure 11 adopts in the bodywork gap size untouched online inspection method of the present invention without initialized active contour model the edge contour that right image carries out slot line is extracted gained image synoptic diagram;
Figure 12 is polar curve geometrical constraint principal diagram intention represented in the bodywork gap size untouched online inspection method of the present invention;
Figure 13 is represented three-dimensional reconstruction principle schematic in the bodywork gap size untouched online inspection method of the present invention;
Figure 14 is represented slot line three-dimensional reconstruction synoptic diagram in the bodywork gap size untouched online inspection method of the present invention;
Figure 15 is the rotation synoptic diagram of space line represented in the bodywork gap size untouched online inspection method of the present invention;
Figure 16 is that slot line represented in the bodywork gap size untouched online inspection method of the present invention is at X-Z plane projection synoptic diagram;
Figure 17 is that slot line represented in the bodywork gap size untouched online inspection method of the present invention is in the perspective view on Y-Z plane.
Among the figure: No. 1.1 video cameras, No. 2.2 video cameras, No. 3.1 car coverings, No. 4.2 car coverings.
Embodiment
Below in conjunction with accompanying drawing the present invention is explained in detail:
Bodywork gap size untouched online inspection method provided by the invention has overcome the deficiency of existing measuring equipment and measuring method, so that the bodywork gap measuring process automaticity that to be gap width and slit face poor is high, not only can have reached the accuracy requirement of industrial products but also can realize that noncontact is online and detect in real time.
Bodywork gap size untouched online inspection method comprises calibration phase, image acquisition phase, Stereo matching stage and the three-dimensional reconstruction stage of video camera.
1. the calibration phase of video camera:
1) consults Fig. 2, set movably plane target, be covered with chequered with black and white gridiron pattern on the target face of plane, gridiron pattern is of a size of 30mm * 30mm, with the public angle point of black box and white square as feature point for calibration, the quantity of feature point for calibration is 100, the centre of perspectivity of No. 1 video camera and No. 2 video cameras to set up world coordinate system as true origin;
2) consult Fig. 3, No. 1 video camera and No. 2 video cameras are installed are set up Binocular Stereo Vision System, the plane target of holding movable in the public view field scope of No. 1 video camera and No. 2 video cameras, keeping under the static prerequisite of No. 1 video camera and No. 2 camera positions the plane of motion target and by No. 1 video camera and No. 2 video cameras the plane target being carried out 15 shootings, be respectively the synoptic diagram of No. 1 video camera, No. 2 camera calibrations such as Fig. 4, Fig. 5;
3) utilize the calibration tool case realization of MATLAB software by calibrating procedure the target image that reads in to be revised and carried out the demarcation of angle point extraction and No. 1 video camera and No. 2 video cameras, then the result who demarcates is preserved.
2. image acquisition phase:
1) consults Fig. 6 and Fig. 7, position, body outer skin slit to be measured is placed in the public view field of Binocular Stereo Vision System and takes, obtain the image pair that two width of cloth comprise the covering slit;
2) consult Fig. 8 and Fig. 9, use the logical "or" computing between image, covering gap area to be measured is split from background image;
3) utilize first mean filter that image is carried out rough handling, remove the white noise of Gaussian distribution in the image; The recycling medium filtering further carries out noise processed;
4) after the medium filtering, utilization is adjusted the method for image gray levels and is carried out the image border enhancing, so that outstanding slit profile, simultaneously weakening or removal impulsive noise, high frequency noise etc.
3. Stereo matching stage:
1) utilize the edge contour extraction of carrying out slot line between the body outer skin without initialized active contour model, it is right to obtain respectively the point that the coordinate by slit edge pixel point consists of on left image, right image;
Definition is based on the internal energy function of active contour model, and this energy function is a penalty term, namely
E int = P ( Φ ) = ∫ ∫ Ω 1 2 ( | ▿ Φ - 1 | ) 2 dxdy
Wherein: Ω ∈ R 2, this internal energy function is whether metric levels set function Φ is near distance function, for the initialization that needn't re-start level set function is prepared.
Equally, our the external energy function that defines the Snake model is:
E ext=E g,λ,v(Φ)=λA g(Φ)+vB g(Φ)
In the formula: λ, v are constant, and λ>0, and A g(Φ) and B gDefinition (Φ) is as follows,
A g ( Φ ) = ∫ ∫ Ω gδ ( Φ ) | ▿ Φ | dxdy B g ( Φ ) = ∫ ∫ Ω gH ( - Φ ) dxdy
Wherein: δ is the Dirac function, and H is the Heaviside function, A g(Φ) be the length of calculated curve, B gThen be for the evolving speed of accelerating curve (Φ).
Therefore, the external energy function of whole Snake model is written as:
E(Φ)=μP(Φ)+E g,λ,v(Φ)
Initialized to the zero level set function time, if detect target in the inside of initial curve, getting v is positive number, makes initial curve to internal contraction, to reach the edge that detects target, on the contrary, if the target that detects is in the outside of initial curve, getting v is negative, can make curve expand outwardly motion until detect the limit of target, in the evolution process of curve, external energy function E G, λ, vEffect (Φ) is exactly constantly to drive initial curvilinear motion to the marginal position that detects target, and the effect of internal energy function P (Φ) is that initial curve is suppressed, prevent that excessive distortion from appearring in curve, and the characteristic of the symbolic distance function of maintenance level set function Φ, make detected edge contour more accurately level and smooth.
When the energy function of whole Snake model had minimum value, curve convergence was to the edge of profile, and this measuring method takes gradient descent method to find the solution the local minimum of following formula,
∂ E ∂ Φ = - μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] - λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
Wherein: Δ is Laplace operator, and div is divergence operator,
Figure BDA00002694499800104
Be Hamiltonian operator, the condition that following formula is obtained minimum value is exactly
Figure BDA00002694499800105
Yet the zero level collection C (x, y) of curvilinear equation=(x, y) Φ (x, y, t)=0} is reaching the condition that must satisfy following formula in stable:
∂ Φ ∂ t = 0 = - ∂ E ∂ Φ
Therefore, we can obtain following formula:
∂ E ∂ t = μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] + λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
In following formula, have
ΔΦ ( x , y ) = ∂ 2 Φ ∂ 2 x + ∂ 2 Φ ∂ 2 y
div ( ▿ Φ | ▿ Φ | ) = Φ x 2 Φ yy - 2 Φ x Φ y Φ xy + Φ y 2 Φ xx ( Φ x 2 + Φ y 2 ) 3 2
We represent step-length with τ, and are right
Figure BDA00002694499800115
Use the forward difference formula, can obtain:
Φ i , j k + 1 - Φ i , j k τ = L ( Φ i , j k )
Wherein:
L ( Φ ) = μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] + λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
First following formula is carried out discretize here, and suppose that the step-length in x direction and y direction is the same, be h, then With
Figure BDA00002694499800119
Can be expressed as:
( Φ xx ) i , j k = Φ i + 1 , j k - 2 Φ i , j k + Φ i - 1 , j k h 2
( Φ yy ) i , j k = Φ i , j + 1 k - 2 Φ i , j k + Φ i , j - 1 k h 2
Therefore, ΔΦ ( x , y ) = ∂ 2 Φ ∂ 2 x + ∂ 2 Φ ∂ 2 y Discrete type be to be expressed as;
( ΔΦ ) i , j k = Φ i + 1 , j k + Φ i , j + 1 k - 4 Φ i , j k + Φ i - 1 , j k + Φ i , j - 1 k h 2
And right
Figure BDA000026944998001114
And
Figure BDA000026944998001115
Use central-difference formula, namely have:
( Φ x ) i , j k = Φ i + 1 , j k - Φ i - 1 , j k 2 h
( Φ y ) i , j k = Φ i , j + 1 k - Φ i , j - 1 k 2 h
Right
Figure BDA00002694499800123
Carry out discretize:
( Φ xy ) i , j k = Φ i + 1 , j + 1 k - Φ i - 1 , j + 1 k - Φ i + 1 , j - 1 k + Φ i - 1 , j - 1 k h 2
And, Dirac function δ x) and following definition arranged:
δ ϵ ( x ) = 0 | x | > ϵ 1 2 ϵ [ 1 + cos ( πx ϵ ) ] | x | ≤ ϵ
With Dirac function δ x) and And
Figure BDA00002694499800127
Discrete form be brought into tangent vector
Figure BDA00002694499800128
Expression formula in, can obtain
Figure BDA00002694499800129
Discrete type.Therefore, we can obtain
Figure BDA000026944998001210
Discrete expression.Therefore we obtain the iterative as follows of level set function:
Φ i , j k + 1 = τL ( Φ i , j k ) + Φ i , j k
In this detection method, get respectively λ=5.0, μ=0.04, each iteration level set function Φ is afterwards calculated in v=3.0 and τ=5.0 then n, and the curve of renewal profile, last, whether inspection reaches convergence, if not convergence, then each iteration level set function Φ is afterwards calculated in continuation n, and the curve of renewal profile, until convergence, if reach convergence, then exporting the extraction result of last edge contour, consult Figure 10 and Figure 11, is to adopt the synoptic diagram that respectively left and right image is carried out the edge contour extraction gained of bodywork gap line without initialized active contour model among the figure.
2) utilize outer polar curve geometrical constraint method to carry out the Stereo matching of slit edge pixel point;
Consult Figure 12, left plane of delineation I 1, right plane of delineation I 2By being obtained image from No. 1 video camera and No. 2 video cameras, 1 M in the hypothesis space then puts M at left plane of delineation I 1, right plane of delineation I 2On subpoint be respectively m 1With m 2, and m 1With m 2Mutually corresponding, O 1, O 2Be respectively the photocentre of two video cameras, then put m 1, m 2, O 1, O 2, M is positioned on the same planar S l 1Be planar S and left plane of delineation I 1Intersection, the some m 1Be positioned at intersection l 1On, l 2Be planar S and right plane of delineation I 2Intersection, the some m 2Be positioned at intersection l 2On, then claim l 1Be left plane of delineation I 1Corresponding to right plane of delineation I 2Upper m 2The outer polar curve of point in like manner, claims l 2Be right plane of delineation I 2Corresponding to left plane of delineation I 1Upper m 1The outer polar curve of point, the title planar S is polar plane.
And in stereoscopic vision, the constraint of outer polar curve is defined as, and in correspondence with each other 2 are positioned on the same polar curve in two width of cloth images, namely at left plane of delineation I 1In 1 m 1Corresponding to right plane of delineation I 2On 1 m 2, then these two points must be positioned at the outer polar curve l of same 2On, in like manner, at right plane of delineation I 2On 1 m 2Corresponding to left plane of delineation I 1In 1 m 1, then 2 are positioned at the outer polar curve l of same 1On.
Outer polar curve retrains and can represent with a simple algebraic formula, that is:
m'Fm=0
Wherein, m=[u, v, 1] TWith m'=[u ' v', 1] TBe respectively left plane of delineation I 1, right plane of delineation I 2On corresponding point, F is basis matrix, and
F=A′ -T[t] xRA -1
Wherein, A', A are respectively the inner parameters of two video cameras, and A', A be 3 * 3 matrix, and R is rotation matrix, and t is translation vector, [t] xThe antisymmetric matrix of t, if hypothesis t is three-dimensional vector, i.e. t=(t x, t y, t z) T, the antisymmetric matrix of t [t] then xFor
[ t ] x = 0 - t z t y t z 0 - t x - t y t x 0
Then [t] x=-([t] x) T, [t] xBe an irreversible matrix, and be full rank not.
Utilization can drop to the one-dimensional space with the match search space by two-dimensional space with the method for upper outside polar curve constraint when carrying out body outer skin slit marginal point Stereo matching, the calculated amount in the time of can greatly reducing coupling improves the speed of mating.
3) utilize at last the constraint of disparity continuity and Ordinal Consistency to reject the error match point, improve the accuracy of matching result;
After the outer polar curve geometric match of process, left plane of delineation I 1On 1 m 1At right plane of delineation I 2Upper may be corresponding two or more point, in order to obtain unique match point, we need to be to each coupling after the coupling to carrying out disparity continuity constraint and Ordinal Consistency constraint, so-called continuity constraint, if namely have be M, N on the surface of same object at 2, and 2 close proximity are if M, the N subpoint on two width of cloth images is respectively m 1, m 2With n 1, n 2, m then 1With n 1Location comparison approach, in like manner, m 2, n 2The position also very approaching, and that the surface of any object is is continuous, makes the degree of depth of M, N similar, therefore, as long as we have set up m 1With m 2Between mutual corresponding relation, just can determine according to depth difference the position of N spot projection; And Ordinal Consistency constraint, namely polar curve on the piece image is mutually corresponding with a polar curve on the other piece image, and then the putting in order of corresponding point on these two polar curves is constant.
Utilize the above method of rejecting the error match point can after Stereo matching, effectively realize the one to one relation of match point, avoided the corresponding point of a point coordinate on the right side (left side) the image slot edge that video camera is taken on the image slot edge, a left side (right side) that video camera takes that the existence of two or more situations is arranged, and then laid the first stone for the accuracy of three-dimensional reconstruction.
4. three-dimensional reconstruction stage:
Consult Figure 13, O among the figure 1,, O 2Be the photocentre of No. 1 video camera, No. 2 video cameras, obtain the method for object dimensional geological information according to two width of cloth or two secondary above images, an object in the hypothesis space can obtain left plane of delineation I by No. 1 video camera, No. 2 video cameras 1, right plane of delineation I 2, the coordinate of 1 P in the space is [XYZ] on the object T, at left plane of delineation I 1, right plane of delineation I 2On subpoint be respectively p lAnd p r, their homogeneous coordinates are respectively [u 1v 11] T, [u 2v 21] T, p then l, p rWith P following corresponding relation is arranged:
Z c 1 u 1 v 1 1 = m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 X Y Z 1
Z c 2 u 2 v 2 1 = m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 X Y Z 1
Wherein,
m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 = M L = A l * R l T l 0 T 1
m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 = M R = A r * R r T r 0 T 1
M L, M RBe respectively the projection matrix of No. 1 video camera, No. 2 video cameras, A l, A rBe respectively the inner parameter of No. 1 video camera, No. 2 video cameras, R l T l 0 T 1 , R r T r 0 T 1 Be respectively the external parameter matrix of No. 1 video camera and No. 2 video cameras, wherein R l, R rBe respectively the rotation matrix of No. 1 video camera, No. 2 video cameras, T l, T rBe respectively the translation vector of No. 1 video camera and No. 2 video cameras, inner parameter and the external parameter of video camera obtain by camera calibration, when we obtain projection matrix M according to the inside and outside parameter of video camera L, M RAfterwards, can be with following formula cancellation Z C1Perhaps Z C2, can obtain about X, Y, four systems of linear equations of Z:
( u 1 m 31 1 - m 11 1 ) X + ( u 1 m 32 1 - m 12 1 ) Y + ( u 1 m 33 1 - m 13 1 ) Z = m 14 1 - u 1 m 34 1 ( v 1 m 31 1 - m 21 1 ) X + ( v 1 m 32 1 - m 22 1 ) Y + ( v 1 m 33 1 - m 23 1 ) Z = m 24 1 - v 1 m 34 1 ( u 2 m 31 2 - m 11 2 ) X + ( u 2 m 32 2 - m 12 2 ) Y + ( u 2 m 33 2 - m 13 2 ) Z = m 14 2 - u 2 m 34 2 ( v 2 m 31 2 - m 21 2 ) X + ( v 2 m 32 2 - m 22 2 ) Y + ( v 2 m 33 2 - m 23 2 ) Z = m 24 2 - v 2 m 34 2
Wherein: (u 1, v 1, 1), (u 2, v 2, 1) and be respectively a p l, p rAt left plane of delineation I 1With right plane of delineation I 2In homogeneous coordinates, (X, Y, Z, 1) is the homogeneous coordinates under the required world coordinate system,
Figure BDA00002694499800151
Be projection matrix MLThe capable j column element of i, in like manner, Be projection matrix M RThe capable j column element of i, separate above-mentioned system of equations, its least square solution is required volume coordinate, has namely realized the three-dimensional reconstruction in covering slit.
1) according to the calibration result of the Binocular Stereo Vision System that has established, obtained the three dimensional space coordinate of covering slit marginal point by the Stereo matching point;
2) consulting Figure 14, carry out the reconstruction of bodywork gap three-dimensional curve according to the three dimensional space coordinate point of obtaining, is bodywork gap line three-dimensional reconstruction synoptic diagram among the figure;
3) the three-dimensional reconstruction curve is carried out Space Rotating by the angle angle and direction of certain curve and x, y, z axle, its Space Rotating principle schematic as shown in figure 15;
4) consult Figure 16 and Figure 17, after being rotated, slot line respectively it is carried out projection in the plane, shown in Figure 16 be slot line represented in the bodywork gap size untouched online inspection method at the X-Z plane figure, and obtain the width numerical value in slit according to this figure; Among Figure 17 be slot line represented in the bodywork gap size untouched online inspection method at the Y-Z plane figure, and obtain face difference value according to this figure.
Embodiment
One. camera calibration
1. move first Mat lab software, and the path at calibration tool case place is added in the Matlab path environment, start and demarcate principal function calib-gui.m.
2. No. 1 video camera and No. 2 video cameras are installed in position, and adjust No. 1 video camera and No. 2 video cameras and make it to keep motionless, angle and orientation between continuous changing the plane target and the imaging plane, when keeping the plane target motionless, image with No. 1 video camera and No. 2 video camera camera plane targets, whenever carry out the conversion in angle and orientation and take a sub-picture, take altogether 15 sub-pictures, image can be stored among the computer by matching used image pick-up card.
3. move the Calibration calibrating procedure, the result of No. 1 video camera and No. 2 camera calibrations will be obtained, and can carry out error analysis to calibration result by operation Analyze error program, if the calibration result precision that obtains is undesirable, can come image is revised by operation A dd/Suppress images and Undistort image program, and can move the Save program result who demarcates is preserved, the calibration result of No. 1 video camera saves as Calib_Results-left.mat, and the calibration result of No. 2 video cameras saves as Calib_Results-right.mat.After having deposited calibration result, operation stereo_gui.mat can carry out demarcation and the error analysis of Binocular Stereo Vision System, through to the demarcation of Binocular Stereo Vision System, can obtain the relative position between the inside and outside parameter of No. 1 video camera and No. 2 video cameras and No. 1 video camera and No. 2 video cameras.
Two. image acquisition phase
1. car door slotted section to be measured is placed in the visual space of Binocular Stereo Vision System, carry out respectively photographic images by No. 1 video camera and No. 2 video cameras, obtain pending car door slit image.
2. consult Fig. 6 to Fig. 9, be respectively the enlarged diagram of our resulting image after captured original image and the mask, pending car door slit image is carried out mask process and the computing of image logical "or", extract our interested image-region, thereby the operand when reducing edge extracting improves the speed of computing.At last the image after the mask is stored according to the location of pixels after the mask.
3. adopt the method for medium filtering that the image after the mask is carried out noise reduction process.After medium filtering, for outstanding car door slit profile, obtain the higher edge extracting result of ratio of precision, weaken simultaneously or remove our unwanted information, select the method for the gray level of adjusting image to carry out the image border enhancing.
4. we are to strengthening the image of processing based on the edge contour extraction of carrying out the car door slot line without initialized active contour model through noise reduction and edge, the contour edge that active contour model extracts has better continuity and closure, can obtain more edge contour information.
Three. Stereo matching
1. after the car door slot line being carried out edge extracting and obtaining the coordinate of point of edge contour, at first the gained coordinate points is carried out characteristic matching, then by polar curve geometrical constraint method the match search space being dropped to the one-dimensional space by two-dimensional space mates, calculated amount in the time of can greatly reducing coupling, improve the speed of coupling, save match time.
2. after the outer polar curve geometric match of process, because the error of coupling can cause the plural match point of point in the image of a left side (right side) in can corresponding right (left side) image, in order to obtain unique match point, we need to be to each coupling after the coupling to carrying out disparity continuity constraint and Ordinal Consistency constraint, to reject Mismatching point, obtain more accurate matching result.
Four. three-dimensional reconstruction
1. consult Figure 14, by through the car door slit marginal point behind the Stereo matching, can instead obtain the coordinate of car door slit marginal point in world coordinate system in conjunction with the camera calibration result, then in Matlab software, point is carried out three-dimensional curve and rebuild.
2. consult such as Figure 15, by the 3 d space coordinate of putting on the slot line, obtain the direction vector l (a of slot line, b, c), the angle that utilizes the space analysis geometric knowledge to try to achieve l and X-axis, Y-axis, Z axis is respectively α, β, γ, for parallel with Z axis the l rotation, can make l first around X-axis rotation alpha angle, rotate the β angle around Y-axis again.
3. consult Figure 16, after slot line turns, at first two slot line are carried out projection in the X-Z plane, calculate the width numerical value in slit according to the result in the X-Z plane projection; Consult Figure 17, then two slot line of car door are carried out projection on the Y-Z plane, according to the face difference value of calculating the slit in the projection result on Y-Z plane.
4. because the scope in the slit of detecting is 40mm * 40mm, so we utilize vernier caliper to carry out 10 times measurement in the length range of 40mm, the mean value of the width of gained is Width=5.4031mm, the poor mean value of face is Flush=1.2860mm, testing measured gap width mean value is Width '=5.3426mm, the poor mean value of the face that records is Flush '=1.2148mm, shown in then this experimental error is analyzed as follows:
1) gap width:
Absolute error is: Δ Width=Width-Width '=0.0605mm
Relative error is: | Δ Width|/Width ' * 100%=1.12%
2) the slit face is poor:
Absolute error is: Δ Flush=Flush '-Flush=0.0712mm
Relative error is: | Δ Flush|/Flush ' * 100%=5.54%
By above data as can be known, the poor error of the width of this experiment gained and face has satisfied the requirement of the precision that production line detects all within 0.1mm to a certain extent, has very important significance in the body of a motor car gap detection of reality.

Claims (5)

1. a bodywork gap size untouched online inspection method is characterized in that, the step of described bodywork gap size untouched online inspection method is as follows:
1) calibration phase of video camera:
(1) setting movably is covered with chequered with black and white tessellated plane target, gridiron pattern is of a size of 30mm * 30mm, with the public angle point of black box and white square as feature point for calibration, the quantity of feature point for calibration is 100, the centre of perspectivity of No. 1 video camera and No. 2 video cameras to set up world coordinate system as true origin;
(2) No. 1 video camera and No. 2 video cameras are installed and are set up Binocular Stereo Vision System, in the public view field scope of No. 1 video camera and No. 2 video cameras, place movably plane target, angle and orientation between continuous changing the plane target and the imaging plane, when keeping the plane target motionless, image with No. 1 video camera and No. 2 video camera camera plane targets, whenever carry out the conversion in angle and orientation and take a sub-picture, take altogether 15 secondary target images;
(3) utilize the calibration tool case realization of MATLAB software the target image that is read in by calibrating procedure to be revised and carried out the demarcation of angle point extraction and No. 1 video camera and No. 2 video cameras, then the result who demarcates is preserved;
2) image acquisition phase:
(1) position, body outer skin slit to be measured is placed in the public view field of Binocular Stereo Vision System and takes, obtain the image pair that two width of cloth comprise the covering slit;
(2) the logical "or" computing between the utilization image splits covering gap area to be measured from background image;
(3) utilize first mean filter that image is carried out rough handling, remove the white noise of Gaussian distribution in the image; The recycling medium filtering further carries out noise processed;
(4) after the medium filtering, utilization is adjusted the method for image gray levels and is carried out the image border enhancing, and outstanding slit profile weakens or removal impulsive noise and high frequency noise simultaneously;
3) the Stereo matching stage:
(1) utilize the edge contour extraction of carrying out the bodywork gap line without initialized active contour model, it is right to obtain respectively the point that the coordinate by slit edge pixel point consists of on left image, right image;
(2) utilize outer polar curve geometrical constraint method to carry out the Stereo matching of slit edge pixel point;
(3) utilize the constraint of disparity continuity and Ordinal Consistency to reject the error match point, improve the accuracy of matching result;
4) the three-dimensional reconstruction stage:
(1) according to the calibration result of the Binocular Stereo Vision System that has established, obtained the three dimensional space coordinate of covering slit marginal point by the Stereo matching point;
(2) carry out the reconstruction of bodywork gap three-dimensional curve according to the three dimensional space coordinate point of obtaining;
(3) the three-dimensional reconstruction curve is carried out Space Rotating by the angle and direction of the angle of curve and x, y, z axle;
(4) after slot line is rotated, respectively it is carried out projection in the plane, obtain width numerical value and the face difference value in slit.
2. according to bodywork gap size untouched online inspection method claimed in claim 1, it is characterized in that described utilization refers to without the edge contour extraction that initialized active contour model carries out the bodywork gap line:
Definition is based on the internal energy function of active contour model:
E int = P ( Φ ) = ∫ ∫ Ω 1 2 ( | ▿ Φ - 1 | ) 2 dxdy
Wherein: Ω ∈ R 2, the internal energy function is whether metric levels set function Φ is near distance function, for the initialization that needn't re-start level set function is prepared;
Equally, our the external energy function that defines the Snake model is:
E ext=E g,λ,v(Φ)=λA g(Φ)+vB g(Φ)
In the formula: λ, v are constant, and λ>0, and A g(Φ) and B gDefinition (Φ) is as follows,
A g ( Φ ) = ∫ ∫ Ω gδ ( Φ ) | ▿ Φ | dxdy B g ( Φ ) = ∫ ∫ Ω gH ( - Φ ) dxdy
Wherein: δ is the Dirac function, and H is the Heaviside function, A g(Φ) be the length of calculated curve, B gThen be for the evolving speed of accelerating curve (Φ);
Therefore, the energy function of whole Snake model is written as:
E(Φ)=μP(Φ)+E g,λ,v(Φ)
Initialized to the zero level set function time, if detect target in the inside of initial curve, getting v is positive number, makes initial curve to internal contraction, to reach the edge that detects target, on the contrary, if detect target in the outside of initial curve, getting v is negative, makes initial curve expand outwardly motion until detect the edge of target, in the evolution process of initial curve, external energy function E G, λ, vEffect (Φ) is exactly constantly to drive initial curve to move to the marginal position that detects target, and the effect of internal energy function P (Φ) is that initial curve is suppressed, prevent that excessive distortion from appearring in curve, and the characteristic of the symbolic distance function of maintenance level set function Φ, make detected edge contour more accurately level and smooth;
When the energy function of whole Snake model had minimum value, initial curve converged to the edge of profile, and this measuring method takes gradient descent method to find the solution the local minimum of following formula,
∂ E ∂ Φ = - μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] - λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
Wherein: Δ is Laplace operator, and div is divergence operator,
Figure FDA00002694499700024
Be Hamiltonian operator, the condition that following formula is obtained minimum value is exactly
Figure FDA00002694499700031
Yet the zero level collection C (x, y) of curvilinear equation=and (x, y) | Φ (x, y, t)=0} is reaching the condition that must satisfy following formula in stable:
∂ Φ ∂ t = 0 = - ∂ E ∂ Φ
Therefore, we can obtain following formula:
∂ E ∂ t = μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] + λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
In following formula, have
ΔΦ ( x , y ) = ∂ 2 Φ ∂ 2 x + ∂ 2 Φ ∂ 2 y
div ( ▿ Φ | ▿ Φ | ) = Φ x 2 Φ yy - 2 Φ x Φ y Φ xy + Φ y 2 Φ xx ( Φ x 2 + Φ y 2 ) 3 2
We represent step-length with τ, and are right
Figure FDA00002694499700036
Use the forward difference formula, can obtain:
Φ i , j k + 1 - Φ i , j k τ = L ( Φ i , j k )
Wherein:
L ( Φ ) = μ [ ΔΦ - div ( ▿ Φ | ▿ Φ | ) ] + λδ ( Φ ) div ( g ▿ Φ | ▿ Φ | ) + vgδ ( Φ )
First following formula is carried out discretize here, and suppose that the step-length in x direction and y direction is the same, be h, then
Figure FDA00002694499700039
With
Figure FDA000026944997000310
Can be expressed as:
( Φ xx ) i , j k = Φ i + 1 , j k - 2 Φ i , j k + Φ i - 1 , j k h 2
( Φ yy ) i , j k = Φ i , j + 1 k - 2 Φ i , j k + Φ i , j - 1 k h 2
Therefore, ΔΦ ( x , y ) = ∂ 2 Φ ∂ 2 x + ∂ 2 Φ ∂ 2 y Discrete type be to be expressed as;
( ΔΦ ) i , j k = Φ i + 1 , j k + Φ i , j + 1 k - 4 Φ i , j k + Φ i - 1 , j k + Φ i , j - 1 k h 2
And right
Figure FDA00002694499700041
And
Figure FDA00002694499700042
Use central-difference formula, namely have:
( Φ x ) i , j k = Φ i + 1 , j k - Φ i - 1 , j k 2 h
( Φ y ) i , j k = Φ i , j + 1 k - Φ i , j - 1 k 2 h
Right
Figure FDA00002694499700045
Carry out discretize:
( Φ xy ) i , j k = Φ i + 1 , j + 1 k - Φ i - 1 , j + 1 k - Φ i + 1 , j - 1 k + Φ i - 1 , j - 1 k h 2
And Dirac function δ (x) has following definition:
δ ϵ ( x ) = 0 | x | > ϵ 1 2 ϵ [ 1 + cos ( πx ϵ ) ] | x | ≤ ϵ
With Dirac function δ (x) and
Figure FDA00002694499700048
And
Figure FDA00002694499700049
Discrete form be brought into tangent vector Expression formula in, can obtain
Figure FDA000026944997000411
Discrete type; Therefore, obtain Discrete expression; Obtain the iterative as follows of level set function:
Φ i , j k + 1 = τL ( Φ i , j k ) + Φ i , j k
In this detection method, get respectively λ=5.0, μ=0.04, each iteration level set function Φ is afterwards calculated in v=3.0 and τ=5.0 then n, and the curve of renewal profile, last, whether inspection reaches convergence, if not convergence, then each iteration level set function Φ is afterwards calculated in continuation n, and the curve of renewal profile, until convergence if reach convergence, is then exported the extraction result of last edge contour.
3. according to bodywork gap size untouched online inspection method claimed in claim 1, it is characterized in that the Stereo matching that the outer polar curve geometrical constraint method of described utilization is carried out slit edge pixel point refers to:
Left plane of delineation I 1, right plane of delineation I 2By being obtained image from No. 1 video camera and No. 2 video cameras, 1 M in the hypothesis space then puts M at left plane of delineation I 1, right plane of delineation I 2On subpoint be respectively m 1With m 2, and m 1With m 2Mutually corresponding, O 1, O 2Be respectively the photocentre of two video cameras, then put m 1, m 2, O 1, O 2, M is positioned on the same planar S l 1Be planar S and left plane of delineation I 1Intersection, the some m 1Be positioned at intersection l 1On, l 2Be planar S and right plane of delineation I 2Intersection, the some m 2Be positioned at intersection l 2On, then claim l 1Be left plane of delineation I 1Corresponding to right plane of delineation I 2Upper m 2The outer polar curve of point in like manner, claims l 2Be right plane of delineation I 2Corresponding to left plane of delineation I 1Upper m 1The outer polar curve of point, the title planar S is polar plane;
And in stereoscopic vision, the constraint of outer polar curve is defined as, and in correspondence with each other 2 are positioned on the same polar curve in two width of cloth images, namely at left plane of delineation I 1In 1 m 1Corresponding to right plane of delineation I 2On 1 m 2, then these two points must be positioned at the outer polar curve l of same 2On, in like manner, at right plane of delineation I 2On 1 m 2Corresponding to left plane of delineation I 1In 1 m 1, then 2 are positioned at the outer polar curve l of same 1On;
Outer polar curve retrains and can represent with a simple algebraic formula, that is:
m'Fm=0
Wherein, m=[u, v, 1] TWith m'=[u ' v ', 1] TBe respectively left plane of delineation I 1The right plane of delineation I of X 2On corresponding point, F is basis matrix, and
F=A′ -T[t] xRA -1
Wherein, A', A are respectively the inner parameters of two video cameras, and A ', A be 3 * 3 matrix, and R is rotation matrix, and t is translation vector, [t] xThe antisymmetric matrix of t, if hypothesis t is three-dimensional vector, i.e. t=(t x, t y, t z) T, the antisymmetric matrix of t [t] then xFor
[ t ] x = 0 - t z t y t z 0 - t x - t y t x 0
Then [t] x=-([t] x) T, [t] xBe an irreversible matrix, and be full rank not;
Utilization can drop to the one-dimensional space with the match search space by two-dimensional space with the method for upper outside polar curve constraint when carrying out body outer skin slit marginal point Stereo matching, the calculated amount in the time of can greatly reducing coupling improves the speed of mating.
4. according to bodywork gap size untouched online inspection method claimed in claim 1, it is characterized in that described continuity and the Ordinal Consistency constraint rejecting error match point of utilizing refers to:
After the outer polar curve geometric match of process, left plane of delineation I 1On 1 m 1At right plane of delineation I 2Upper may be corresponding two or more point, in order to obtain unique match point, we need to be to each coupling after the coupling to carrying out disparity continuity constraint and Ordinal Consistency constraint, so-called continuity constraint, if namely have be M, N on the surface of same object at 2, and 2 close proximity are if M, the N subpoint on two width of cloth images is respectively m 1, m 2With n 1, n 2, m then 1With n 1Location comparison approach, in like manner, m 2, n 2The position also very approaching, and that the surface of any object is is continuous, makes the degree of depth of M, N similar, therefore, as long as we have set up m 1With m 2Between mutual corresponding relation, just can determine according to depth difference the position of N spot projection; And Ordinal Consistency constraint, namely polar curve on the piece image is mutually corresponding with a polar curve on the other piece image, and then the putting in order of corresponding point on these two polar curves is constant.
5. according to bodywork gap size untouched online inspection method claimed in claim 1, it is characterized in that, described three-dimensional reconstruction refers to: the method that obtains the object dimensional geological information according to two width of cloth or two secondary above images, an object in the hypothesis space obtains left plane of delineation I by No. 1 video camera, No. 2 video cameras 1, right plane of delineation I 2, the coordinate of 1 P in the space is [XYZ] on the object T, at left plane of delineation I 1, right plane of delineation I 2On subpoint be respectively p lAnd p r, their homogeneous coordinates are respectively [u 1v 11] T, [u 2v 21] T, p then l, p rWith P following corresponding relation is arranged:
Z c 1 u 1 v 1 1 = m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 X Y Z 1
Z c 2 u 2 v 2 1 = m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 X Y Z 1
Wherein,
m 11 1 m 12 1 m 13 1 m 14 1 m 21 1 m 22 1 m 23 1 m 24 1 m 31 1 m 32 1 m 33 1 m 34 1 = M L = A l * R l T l 0 T 1
m 11 2 m 12 2 m 13 2 m 14 2 m 21 2 m 22 2 m 23 2 m 24 2 m 31 2 m 32 2 m 33 2 m 34 2 = M R = A r * R r T r 0 T 1
M L, M RBe respectively the projection matrix of No. 1 video camera, No. 2 video cameras, A l, A rBe respectively the inner parameter of No. 1 video camera and No. 2 video cameras, R l T l 0 T 1 , R r T r 0 T 1 Be respectively the external parameter matrix of No. 1 video camera and No. 2 video cameras, wherein R l, R rBe respectively the rotation matrix of No. 1 video camera and No. 2 video cameras, T l, T rBe respectively the translation vector of No. 1 video camera and No. 2 video cameras, inner parameter and the external parameter of video camera obtain by camera calibration, when we obtain projection matrix M according to the inside and outside parameter of video camera L, M RAfterwards, can be with following formula cancellation Z C1Perhaps Z C2, obtain about X, Y, four systems of linear equations of Z:
( u 1 m 31 1 - m 11 1 ) X + ( u 1 m 32 1 - m 12 1 ) Y + ( u 1 m 33 1 - m 13 1 ) Z = m 14 1 - u 1 m 34 1 ( v 1 m 31 1 - m 21 1 ) X + ( v 1 m 32 1 - m 22 1 ) Y + ( v 1 m 33 1 - m 23 1 ) Z = m 24 1 - v 1 m 34 1 ( u 2 m 31 2 - m 11 2 ) X + ( u 2 m 32 2 - m 12 2 ) Y + ( u 2 m 33 2 - m 13 2 ) Z = m 14 2 - u 2 m 34 2 ( v 2 m 31 2 - m 21 2 ) X + ( v 2 m 32 2 - m 22 2 ) Y + ( v 2 m 33 2 - m 23 2 ) Z = m 24 2 - v 2 m 34 2
Wherein: (u 1, v 1, 1), (u 2, v 2, 1) and be respectively a p l, p rAt left plane of delineation I 1With right plane of delineation I 2In homogeneous coordinates, (X, Y, Z, 1) is the homogeneous coordinates under the required world coordinate system,
Figure FDA00002694499700068
Be projection matrix M LThe capable j column element of i, in like manner, Be projection matrix M RThe capable j column element of i, separate above-mentioned system of equations, its least square solution is required volume coordinate, then the volume coordinate point is fitted to space curve, has namely realized the three-dimensional reconstruction of bodywork gap.
CN2012105905858A 2012-12-31 2012-12-31 Non-contact online inspection method for automobile body gap size Pending CN103075973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105905858A CN103075973A (en) 2012-12-31 2012-12-31 Non-contact online inspection method for automobile body gap size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105905858A CN103075973A (en) 2012-12-31 2012-12-31 Non-contact online inspection method for automobile body gap size

Publications (1)

Publication Number Publication Date
CN103075973A true CN103075973A (en) 2013-05-01

Family

ID=48152587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105905858A Pending CN103075973A (en) 2012-12-31 2012-12-31 Non-contact online inspection method for automobile body gap size

Country Status (1)

Country Link
CN (1) CN103075973A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103759648A (en) * 2014-01-28 2014-04-30 华南理工大学 Complex fillet weld joint position detecting method based on laser binocular vision
CN103994726A (en) * 2014-04-30 2014-08-20 南京航空航天大学 Method for detecting fitting clearance between sheet metal part and mould
CN104574362A (en) * 2014-12-01 2015-04-29 汕头大学 Passive visual system-based molten pool edge extraction method
CN104680585A (en) * 2013-11-29 2015-06-03 深圳先进技术研究院 Three-dimensional reconstruction system and method for material stack
CN105444691A (en) * 2014-09-18 2016-03-30 发那科株式会社 Contour line measurement apparatus and robot system
CN106168988A (en) * 2015-05-22 2016-11-30 罗伯特·博世有限公司 Rule is sheltered and for the method and apparatus sheltering the image information of video camera for producing
WO2017032335A1 (en) * 2015-08-26 2017-03-02 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
CN106708084A (en) * 2016-11-24 2017-05-24 中国科学院自动化研究所 Method for automatically detecting and avoiding obstacles for unmanned aerial vehicle under complicated environments
CN107076551A (en) * 2014-09-19 2017-08-18 海克斯康测量技术有限公司 Multi-mode portable coordinate measuring machine
CN107862684A (en) * 2017-11-03 2018-03-30 西安元智系统技术有限责任公司 A kind of monitoring fractures system and method with Infravision
CN107907064A (en) * 2017-11-03 2018-04-13 西安元智系统技术有限责任公司 A kind of monitoring fractures system and method
CN108509908A (en) * 2018-03-31 2018-09-07 天津大学 A kind of pupil diameter method for real-time measurement based on binocular stereo vision
CN109311151A (en) * 2017-05-22 2019-02-05 深圳配天智能技术研究院有限公司 A kind of scaling method of robot, system and scaling board
CN110260801A (en) * 2019-05-13 2019-09-20 平安科技(深圳)有限公司 Method and apparatus for measuring volume of material
CN111486788A (en) * 2020-04-15 2020-08-04 上海工程技术大学 Gap measuring system and measuring method
CN111707198A (en) * 2020-06-29 2020-09-25 中车青岛四方车辆研究所有限公司 3D vision-based key parameter measurement method for rail vehicle coupler and draft gear
CN112158693A (en) * 2020-09-15 2021-01-01 福建省特种设备检验研究院泉州分院 Detection method for elevator guide rail parameters
CN112735342A (en) * 2020-12-30 2021-04-30 深圳Tcl新技术有限公司 Backlight light type processing method and device and computer readable storage medium
CN113570654A (en) * 2021-06-16 2021-10-29 上海工程技术大学 Automobile surface gap size detection method based on minimum external rectangle and application thereof
CN115187552A (en) * 2022-07-14 2022-10-14 南京思飞捷软件科技有限公司 Vehicle body door seam detection method based on edge detection
CN117252993A (en) * 2023-11-16 2023-12-19 中铁大桥局集团有限公司 Verification method and device for feature point extraction algorithm, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261115A (en) * 2008-04-24 2008-09-10 吉林大学 Spatial circular geometric parameter binocular stereo vision measurement method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261115A (en) * 2008-04-24 2008-09-10 吉林大学 Spatial circular geometric parameter binocular stereo vision measurement method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
崔岸 等: "基于自适应神经网络的双摄像机标定", 《计算机工程与应用》, vol. 45, no. 21, 31 December 2009 (2009-12-31) *
陈晓博: "《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑I138-2439》", 15 October 2012, article "车身缝隙尺寸非接触检测的关键技术研究", pages: 17-22,28-46 *

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680585A (en) * 2013-11-29 2015-06-03 深圳先进技术研究院 Three-dimensional reconstruction system and method for material stack
CN103759648A (en) * 2014-01-28 2014-04-30 华南理工大学 Complex fillet weld joint position detecting method based on laser binocular vision
CN103994726A (en) * 2014-04-30 2014-08-20 南京航空航天大学 Method for detecting fitting clearance between sheet metal part and mould
CN103994726B (en) * 2014-04-30 2016-11-16 南京航空航天大学 Fit between a kind of sheet metal component and mould the detection method in gap
US9672630B2 (en) 2014-09-18 2017-06-06 Fanuc Corporation Contour line measurement apparatus and robot system
CN105444691A (en) * 2014-09-18 2016-03-30 发那科株式会社 Contour line measurement apparatus and robot system
CN105444691B (en) * 2014-09-18 2017-05-24 发那科株式会社 Contour line measurement apparatus and robot system
CN107076551A (en) * 2014-09-19 2017-08-18 海克斯康测量技术有限公司 Multi-mode portable coordinate measuring machine
CN104574362A (en) * 2014-12-01 2015-04-29 汕头大学 Passive visual system-based molten pool edge extraction method
CN106168988A (en) * 2015-05-22 2016-11-30 罗伯特·博世有限公司 Rule is sheltered and for the method and apparatus sheltering the image information of video camera for producing
US11514680B2 (en) 2015-08-26 2022-11-29 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
WO2017032335A1 (en) * 2015-08-26 2017-03-02 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
US10681257B2 (en) 2015-08-26 2020-06-09 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
CN106708084B (en) * 2016-11-24 2019-08-02 中国科学院自动化研究所 The automatic detection of obstacles of unmanned plane and barrier-avoiding method under complex environment
CN106708084A (en) * 2016-11-24 2017-05-24 中国科学院自动化研究所 Method for automatically detecting and avoiding obstacles for unmanned aerial vehicle under complicated environments
CN109311151A (en) * 2017-05-22 2019-02-05 深圳配天智能技术研究院有限公司 A kind of scaling method of robot, system and scaling board
CN109311151B (en) * 2017-05-22 2021-07-09 深圳配天智能技术研究院有限公司 Calibration method and system of robot and calibration plate
CN107907064A (en) * 2017-11-03 2018-04-13 西安元智系统技术有限责任公司 A kind of monitoring fractures system and method
CN107862684A (en) * 2017-11-03 2018-03-30 西安元智系统技术有限责任公司 A kind of monitoring fractures system and method with Infravision
CN108509908A (en) * 2018-03-31 2018-09-07 天津大学 A kind of pupil diameter method for real-time measurement based on binocular stereo vision
CN108509908B (en) * 2018-03-31 2022-05-17 天津大学 Pupil diameter real-time measurement method based on binocular stereo vision
CN110260801A (en) * 2019-05-13 2019-09-20 平安科技(深圳)有限公司 Method and apparatus for measuring volume of material
WO2021208231A1 (en) * 2020-04-15 2021-10-21 上海工程技术大学 Gap measuring system and measuring method
CN111486788A (en) * 2020-04-15 2020-08-04 上海工程技术大学 Gap measuring system and measuring method
CN111707198A (en) * 2020-06-29 2020-09-25 中车青岛四方车辆研究所有限公司 3D vision-based key parameter measurement method for rail vehicle coupler and draft gear
CN111707198B (en) * 2020-06-29 2021-08-03 中车青岛四方车辆研究所有限公司 3D vision-based key parameter measurement method for rail vehicle coupler and draft gear
CN112158693A (en) * 2020-09-15 2021-01-01 福建省特种设备检验研究院泉州分院 Detection method for elevator guide rail parameters
CN112735342A (en) * 2020-12-30 2021-04-30 深圳Tcl新技术有限公司 Backlight light type processing method and device and computer readable storage medium
CN112735342B (en) * 2020-12-30 2022-05-03 深圳Tcl新技术有限公司 Backlight light type processing method and device and computer readable storage medium
CN113570654A (en) * 2021-06-16 2021-10-29 上海工程技术大学 Automobile surface gap size detection method based on minimum external rectangle and application thereof
CN115187552A (en) * 2022-07-14 2022-10-14 南京思飞捷软件科技有限公司 Vehicle body door seam detection method based on edge detection
CN117252993A (en) * 2023-11-16 2023-12-19 中铁大桥局集团有限公司 Verification method and device for feature point extraction algorithm, electronic equipment and storage medium
CN117252993B (en) * 2023-11-16 2024-03-26 中铁大桥局集团有限公司 Verification method and device for feature point extraction algorithm, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103075973A (en) Non-contact online inspection method for automobile body gap size
Jovančević et al. 3D point cloud analysis for detection and characterization of defects on airplane exterior surface
Fan et al. Road surface 3D reconstruction based on dense subpixel disparity map estimation
Fan et al. Road damage detection based on unsupervised disparity map segmentation
Basha et al. Multi-view scene flow estimation: A view centered variational approach
WO2015061387A1 (en) Enhanced stereo imaging-based metrology
CN111640158B (en) End-to-end camera and laser radar external parameter calibration method based on corresponding mask
CN112051853B (en) Intelligent obstacle avoidance system and method based on machine vision
CN103988226A (en) Method for estimating camera motion and for determining three-dimensional model of real environment
Lee et al. Skewed stereo time-of-flight camera for translucent object imaging
Torabi et al. A new methodology in fast and accurate matching of the 2D and 3D point clouds extracted by laser scanner systems
Ran et al. Point cloud registration method based on SIFT and geometry feature
Ge et al. Online 3-D modeling of complex workpieces for the robotic spray painting with low-cost RGB-D cameras
Dubreuil et al. Mesh-Based Shape Measurements with Stereocorrelation: Principle and First Results
Yamaura et al. Shape reconstruction from a normal map in terms of uniform bi-quadratic B-spline surfaces
Xu et al. Reconstruction method adopting laser plane generated from RANSAC and three dimensional reference
Page et al. Laser‐based imaging for reverse engineering
Ratajczak et al. Vehicle dimensions estimation scheme using AAM on stereoscopic video
Botha et al. Rough terrain profiling using digital image correlation
Fang et al. A vision-based method for narrow weld trajectory recognition of arc welding robots
Guo et al. A V-shaped weld seam measuring system for large workpieces based on image recognition
Li et al. Research on three-dimensional reconstruction technology of line laser scanning scene based on Otsu method
Jia et al. Recursive drivable road detection with shadows based on two-camera systems
Cao et al. Enhanced edge detection for 3d crack segmentation and depth measurement with laser data
CN109377562B (en) Viewpoint planning method for automatic three-dimensional measurement

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130501