A kind of automobile brake sheet dimensional machines vision automatic measurement system based on double camera
Technical field
The present invention relates to a kind of automobile brake sheet dimensional machines vision automatic measurement system based on double camera.
Background technology
Mechanical vision inspection technology is a kind of important means for realizing workpiece dimension automatic measurement.Automobile brake sheet is used as one kind
To the very important auto parts and components of vehicle safety, its dimensional measurement is the important content of automobile brake sheet quality inspection.
Automobile brake sheet dimensional measurement is realized using mechanical vision inspection technology, the product to reducing auto parts and components manufacturing enterprise is unqualified
Product rate, improves Product checking speed and measurement result concordance, improves auto parts and components manufacturing enterprise production automation degree, pushes away
Enter the aspects such as machine substitute human labor works progress significant.
For the dimensional measurement of automobile brake sheet, most domestic automobile brake sheet manufacturing enterprise, particularly some medium-sized and small enterprises are still
Using the method for manual detection.Testing staff carries out the manual measurement of automobile brake sheet using slide gauge, or using drift no-go gage
Carry out qualitative detection.Manual measurement has detection speed slow, the shadow of testing result easily examined person works' experience and working condition
Ring, concordance is poor, it is difficult to meet the demand of automobile brake sheet enterprise large-scale production.
Because mechanical vision inspection technology has noncontact, quickly, it is easy to accomplish the advantages of automatic measurement, therefore industry zero at present
Component geometry dimensional measurement is frequently with the machine vision method for automatic measurement based on one camera.Due to braking automobile chip size it is larger,
Usually more than 100mm, though it is capable of achieving the automatic of braking automobile chip size using the mechanical vision inspection technology based on one camera
Measurement, but because braking automobile chip size is larger, the automatic measurement of braking automobile chip size is carried out based on conventional industrial camera,
Certainty of measurement is relatively low.If using the industrial camera of ten million pixel scale, one side equipment cost is very high, another aspect certainty of measurement
Remain on the certainty of measurement requirement that cannot meet enterprise to automobile brake sheet dimensional measurement.
The content of the invention
It is an object of the invention to provide a kind of automobile brake sheet dimensional machines vision automatic measurement system based on double camera, adopts
The comparison measuring method of double camera realizes the high-precision automatic measuring of the physical dimension of this kind of large-size workpiece of automobile brake sheet.
The technical solution used in the present invention is:
1. a kind of automobile brake sheet dimensional machines vision automatic measurement system based on double camera, an including double camera image acquisition
System and a kind of method for automatic measurement;Wherein double camera image capturing system is by left and right camera (1) (2), left and right optical lens (12)
(4), left and right area source (10) (9), measurement plane (7), positioning reference plane (5) and computer (3) composition;Automatically survey
Amount method is:Left and right camera (1) is used before measurement
(2) " recessed " standard left images are gathered, using image calibration method left images pixel equivalent p is determinedl, pr, and spacing is
l0Left images in comparison measuring basiss xl, xr;It is left with left and right camera (1) (2) collection automobile brake sheet (6) during measurement
Right image, with Boundary extracting algorithm tested marginal position x in left images is determinedl’、xr’;It is (x to obtain braking automobile chip size lr’-xr)pr
+(xl’-xl)pl+l0。
2. the double camera image capturing system structure described in is as follows:
1. positioning reference plane (5) is installed vertically in measurement plane (7), automobile brake sheet (6) is placed in into measurement before measurement flat
On face (7), and automobile brake sheet (6) is close to into positioning reference plane (5), makes the left bayonet socket outer ledge of automobile brake sheet (6)
Left light hole (11) central authorities in measurement plane (7), right bayonet socket outer ledge is located at the right side in measurement plane (7) and leads to
Unthreaded hole (8) central authorities;
2. left and right optical lens (12) (4) and left and right area source (10) (9) are respectively positioned at the both sides up and down of measurement plane (7);
3. left and right optical lens (12) (4) are arranged on left and right camera (1) (2) by interface;
4. left and right area source (10) (9) light-emitting area is arranged on the same plane parallel with measurement plane (7);
5. left and right camera (1) (2) is on the same plane parallel with positioning reference plane (5), and makes left and right optical lens
(12) (4) axis is vertical with measurement plane (7) and left and right area source (10) (9) light-emitting area, and by left and right light hole (11)
(8) center;
6. the automobile brake sheet for collecting (6) left images are input into computer (3) by left and right camera (1) (2) by connecting line,
Left camera (1) and left side light source (10) are for gathering the left bayonet socket outer ledge image of automobile brake sheet (6), i.e. braking automobile
Piece left image, right camera (2) and the right bayonet socket outer ledge image of right side light source (9) collection automobile brake sheet (6), i.e. automobile
Brake block right image;
7. double camera image capturing system is placed in camera bellows (13).
3. " recessed " standard and its left images acquisition method described in is as follows:" recessed " standard is shaped as " recessed " shape, uses
In it is determined that left images pixel equivalent pl, prIt is l with known separationoLeft images in benchmark xl, xr;" recessed " standard
The hyphen side length of side of top side two of device is, it is known that be lnAnd less than the visual field size of left and right camera (1) (2);" recessed " standard
The long vertical edge spacing of the long vertical edge in left side and right side, it is known that be l0And equal to the manufacture reference value of automobile brake sheet measured size;" recessed "
Standard lower side edge is for " recessed " standard positioning;When " recessed " standard left images are gathered, by " recessed " standard most
After lower edge is close to positioning reference plane (5), the perpendicular edge upper part of left side length of " recessed " standard and the short vertical edge edge in left side exist
In left camera (1) visual field, the perpendicular edge upper part of right side length of " recessed " standard and the short vertical edge edge in right side are in right camera (2) visual field
It is interior;Image acquisition is carried out with left camera (1), " recessed " standard left image is obtained;Image acquisition is carried out with right camera (2),
Obtain " recessed " standard right image.
4. the image calibration method described in is comprised the steps of:
1. respectively " recessed " standard left images are fixed with threshold Image Segmentation, " recessed " standard or so binary map is obtained
Picture;
2. the every a line for scanning " recessed " standard or so bianry image successively from left to right from top to bottom is distinguished, by 1 to 0
Catastrophe point as " recessed " standard left hand edge point, using 0 to 1 catastrophe point as " recessed " standard right hand edge point;
3. abscissa spacing average d of all row left and right edges points pair is tried to achieve respectively in " recessed " standard or so bianry imagel、
dr;
4. calculated using formula (1) and obtain left images pixel equivalent pl、pr;
5. the abscissa average of left hand edge point in the left bianry image of " recessed " standard is sought as the comparison measuring basiss x in left imagel;
The abscissa average of right hand edge point in the right bianry image of " recessed " standard is sought as the comparison measuring basiss x in right imager。
5. the Boundary extracting algorithm described in is comprised the steps of:
1. respectively automobile brake sheet left images are fixed with threshold Image Segmentation, automobile brake sheet or so bianry image is obtained;
2. left bayonet socket outer ledge in automobile brake sheet left image is set automatically respectively using a kind of automatic set algorithm of detection zone
The detection zone of right bayonet socket outer ledge in detection zone and automobile brake sheet right image;
3. in automobile brake sheet the second from left value image detection region, from top to bottom, scan from left to right per a line, obtain detection zone
0 to 1 catastrophe point is used as the left bayonet socket outer ledge point of automobile brake sheet in domain, or in the right bianry image detection zone of automobile brake sheet
In domain, from top to bottom, scanning is turned left per a line, the catastrophe point of acquisition 0 to 1 is used as the right bayonet socket outer side edges of automobile brake sheet from the right side
Edge point;
4. automobile brake sheet or so bayonet socket outer ledge point abscissa is respectively compared, the left bayonet socket outer ledge point of automobile brake sheet is obtained
Abscissa maximum and the right bayonet socket outer ledge point abscissa minima of automobile brake sheet;The left bayonet socket outer ledge point of automobile brake sheet
Abscissa maximum and the right bayonet socket outer ledge point abscissa minima of automobile brake sheet are respectively tested marginal position in left images
xl’、xr’。
6. the automatic set algorithm in a kind of hough transform region described in, comprises the steps of:
1. distinguish the every string for scanning automobile brake sheet or so bianry image from top to bottom from left to right, obtain 0 to 1 mutation
Point is used as automobile brake sheet or so bayonet socket base marginal point;
2. vertical coordinate average y of all automobile brake sheet bayonet socket base marginal points is sought0, by y0-h1And y0-h2It is vertical as detection zone
The bound of coordinate, detection zone vertical coordinate central value ycFor y0-(h1+h2)/2;
3. in the left bianry image of automobile brake sheet, from top to bottom, it is y that vertical coordinate is scanned from left to rightc- 10 arrive ycIn+10 regions
Per a line, 0 to 1 catastrophe point is obtained as sampling marginal point, or in the right bianry image of automobile brake sheet, from top to bottom,
From the right side scanning vertical coordinate is turned left for yc- 10 arrive ycPer a line in+10 regions, the catastrophe point of acquisition 0 to 1 is used as sampling marginal point;
4. all 21 samplings marginal point abscissa averages, and the sample edge that t is less than with the absolute value of the abscissa average difference are asked
Edge point abscissa average x0, by x0+ W and x0Bounds of-the w as detection zone abscissa;
5. it is (x to obtain left upper apex image coordinate respectively0- W, y0-h2), bottom right vertex image coordinate is (x0+ W, y0-h1) vapour
The hough transform region of car brake block or so bayonet socket outer ledge.
The invention has the advantages that:
Method of the present invention using measurement is compared based on the machine vision of double camera, is realized using two not high industrial cameras of cost
The high-precision automatic measuring of the physical dimension of this kind of large-size workpiece of automobile brake sheet, such as to measured size for 135mm automobile
Brake block, the measurement error of indication is less than ± 0.02mm.
Description of the drawings
Fig. 1 is double camera image capturing system schematic diagram.
Fig. 2 is method for automatic measurement flow chart.
Fig. 3 is automobile brake sheet measured size schematic diagram.
Fig. 4 is " recessed " standard schematic diagram.
Fig. 5 is image calibration method flow chart.
Fig. 6 is Boundary extracting algorithm flow chart.
Fig. 7 is the automatic set algorithm flow chart of detection zone.
In Fig. 1:1st, left camera, 2, right camera, 3, computer, 4, right optical lenses, 5, positioning reference plane, 6, vapour
Car brake block, 7, measurement plane, 8, right light hole, 9, right side light source, 10, left side light source, 11, left light hole, 12,
Left optical lenses, 13, camera bellows.
Specific embodiment
With reference to the accompanying drawings and examples the invention will be further described.
Fig. 1 illustrates a specific embodiment based on the automobile brake sheet dimensional machines vision automatic measurement system of double camera.It is left
Right camera (1) (2) adopts 5,000,000 pixels, band caching, USB2.0 interfaces, 1/2.5 inch of CMOS black and white digital working
Industry camera, ultimate resolution is 2592x1944 pixels.Left and right optical lenses (12) (4) adopt working distance for 110mm,
Standard C interface, maximum can support the telecentric opticses camera lens of 2/3 inch of camera, and visual field size is 11.4mmx8.6mm.Left and right
Area source (10) (9) is using the LED white area sources of 50mm × 50mm.Computer (3) is lenovo desktop computers,
Internal memory 3G, CPU be Intel Pentium G645, WIN XP operating systems.Using USB connecting lines by left and right camera (1) (2)
It is connected with computer (3) USB interface.Left and right light hole (11) (8) size is 10mm × 10mm square holes.Automobile is stopped
Car piece (6) measured size l is 135 ± 0.05mm.Measurement plane (7) is aluminum plane, and length and width are respectively 220mm × 190
mm.Positioning reference plane (5) is aluminum plane, and length and width are respectively 150mm × 30mm.Camera bellows (13) is iron sheet system, long
Wide high respectively 400mm × 250mm × 550mm.
It is implemented as follows based on the automobile brake sheet dimensional machines vision automatic measurement system of double camera:
1. the automobile brake sheet dimensional machines vision automatic measurement system based on double camera includes a double camera image capturing system
With a kind of method for automatic measurement;Wherein double camera image capturing system is by left and right camera (1) (2), left and right optical lens (12)
(4), left and right area source (10) (9), measurement plane (7), positioning reference plane (5) and computer (3) composition;Automatically survey
Amount method and step such as Fig. 2:" recessed " standard (as shown in Figure 3) left images are gathered with left and right camera (1) (2) before measurement,
Determine left images pixel equivalent p using image calibration methodl, pr, and spacing is l0Left images in comparison measuring basiss xl,
xr;Automobile brake sheet (6) (as shown in Figure 4) left images are gathered with left and right camera (1) (2) during measurement, edge extracting is used
Algorithm determines tested marginal position x in left imagesl’、xr’;It is (x to obtain braking automobile chip size lr’-xr)pr+(xl’-xl)pl+l0。
2. the double camera image capturing system structure described in is as follows:
1. positioning reference plane (5) is installed vertically in measurement plane (7), automobile brake sheet (6) is placed in into measurement before measurement flat
On face (7), and automobile brake sheet (6) is close to into positioning reference plane (5), makes the left bayonet socket outer ledge of automobile brake sheet (6)
Left light hole (11) central authorities in measurement plane (7) (as shown in Figure 4), right bayonet socket outer ledge (as shown in Figure 4)
Right light hole (8) central authorities in measurement plane (7);
2. left and right optical lens (12) (4) and left and right area source (10) (9) are respectively positioned at the both sides up and down of measurement plane (7);
3. left and right optical lens (12) (4) are arranged on left and right camera (1) (2) by interface;
4. left and right area source (10) (9) light-emitting area is arranged on the same plane parallel with measurement plane (7);
5. left and right camera (1) (2) is on the same plane parallel with positioning reference plane (5), and makes left and right optical lens
(12) (4) axis is vertical with measurement plane (7) and left and right area source (10) (9) light-emitting area, and by left and right light hole (11)
(8) center;
6. the automobile brake sheet for collecting (6) left images are input into computer (3) by left and right camera (1) (2) by connecting line,
Left camera (1) and left side light source (10) are for gathering the left bayonet socket outer ledge image of automobile brake sheet (6), i.e. braking automobile
Piece left image, right camera (2) and the right bayonet socket outer ledge image of right side light source (9) collection automobile brake sheet (6), i.e. automobile
Brake block right image;
7. double camera image capturing system is placed in camera bellows (13).
3. " recessed " standard and its left images acquisition method described in is as follows:" recessed " standard is shaped as " recessed " shape, uses
In it is determined that left images pixel equivalent pl, prIt is l with known separation0Left images in benchmark xl, xr;" recessed " standard
The hyphen side length of side of top side two of device is, it is known that be lnFor 6mm and less than the visual field size of left and right camera (1) (2);" recessed "
The long vertical edge spacing of the long vertical edge in left side of standard and right side is, it is known that be l0And equal to the manufacture reference value of automobile brake sheet measured size;
" recessed " standard lower side lateral edge is for " recessed " standard positioning;When " recessed " standard left images are gathered, by " recessed "
After standard lower side lateral edge is close to positioning reference plane (5), the perpendicular edge upper part of left side length of " recessed " standard and left side are short
In left camera (1) visual field, the perpendicular edge upper part of right side length of " recessed " standard and the short vertical edge edge in right side are in right phase for vertical edge edge
In machine (2) visual field;Image acquisition is carried out with left camera (1), " recessed " standard left image is obtained;Entered with right camera (2)
Row image acquisition, obtains " recessed " standard right image.
4. the image calibration method described in is comprised the steps of, as shown in Figure 5:
1. respectively " recessed " standard left images are fixed with threshold Image Segmentation, " recessed " standard or so binary map is obtained
Picture;
2. the every a line for scanning " recessed " standard or so bianry image successively from left to right from top to bottom is distinguished, by 1 to 0
Catastrophe point as " recessed " standard left hand edge point, using 0 to 1 catastrophe point as " recessed " standard right hand edge point;
3. abscissa spacing average d of all row left and right edges points pair is tried to achieve respectively in " recessed " standard or so bianry imagelFor
1119、drFor 1128;
4. calculated using formula (1) and obtain left images pixel equivalent plFor 0.00536mm/ pixels, prFor 0.00532mm/ pixels;
5. the abscissa average of left hand edge point in the left bianry image of " recessed " standard is sought as the comparison measuring basiss x in left imagel;
The abscissa average of right hand edge point in the right bianry image of " recessed " standard is sought as the comparison measuring basiss x in right imager。
5. the Boundary extracting algorithm described in is comprised the steps of, as shown in Figure 6:
1. respectively automobile brake sheet left images are fixed with threshold Image Segmentation, automobile brake sheet or so bianry image is obtained;
2. left bayonet socket outer ledge in automobile brake sheet left image is set automatically respectively using a kind of automatic set algorithm of detection zone
The detection zone of right bayonet socket outer ledge in detection zone and automobile brake sheet right image;
3. in automobile brake sheet the second from left value image detection region, from top to bottom, scan from left to right per a line, obtain detection zone
0 to 1 catastrophe point is used as the left bayonet socket outer ledge point of automobile brake sheet in domain, or in the right bianry image detection zone of automobile brake sheet
In domain, from top to bottom, scanning is turned left per a line, the catastrophe point of acquisition 0 to 1 is used as the right bayonet socket outer side edges of automobile brake sheet from the right side
Edge point;
4. automobile brake sheet or so bayonet socket outer ledge point abscissa is respectively compared, the left bayonet socket outer ledge point of automobile brake sheet is obtained
Abscissa maximum and the right bayonet socket outer ledge point abscissa minima of automobile brake sheet;The left bayonet socket outer ledge point of automobile brake sheet
Abscissa maximum and the right bayonet socket outer ledge point abscissa minima of automobile brake sheet are respectively tested marginal position in left images
xl’、xr’。
6. the automatic set algorithm in a kind of hough transform region described in, comprises the steps of, as shown in Figure 7:
1. distinguish the every string for scanning automobile brake sheet or so bianry image from top to bottom from left to right, obtain 0 to 1 mutation
Point is used as automobile brake sheet or so bayonet socket base marginal point;
2. vertical coordinate average y of all automobile brake sheet bayonet socket base marginal points is sought0, by y0-h1(h1230) and y for0-h2(h2
For 1000) as the bound of detection zone vertical coordinate, detection zone vertical coordinate central value ycFor y0-(h1+h2)/2;
3. in the left bianry image of automobile brake sheet, from top to bottom, it is y that vertical coordinate is scanned from left to rightc- 10 arrive ycIn+10 regions
Per a line, 0 to 1 catastrophe point is obtained as sampling marginal point, or in the right bianry image of automobile brake sheet, from top to bottom,
From the right side scanning vertical coordinate is turned left for yc- 10 arrive ycPer a line in+10 regions, the catastrophe point of acquisition 0 to 1 is used as sampling marginal point;
4. all 21 samplings marginal point abscissa averages are sought, and t is less than with the absolute value of the abscissa average difference (t is 20)
Sampling marginal point abscissa average x0, by x0+ w (w is 20) and x0Bounds of-the w as detection zone abscissa;
5. it is (x to obtain left upper apex image coordinate respectively0- w, y0-h2), bottom right vertex image coordinate is (x0+ w, y0-h1) vapour
The hough transform region of car brake block or so bayonet socket outer ledge.