A kind of fit-up gap detection method and device based on machine vision
Technical field
The present invention relates to a kind of fit-up gap detection method and device, refer in particular to the Machine Vision Detection stage division and the device of high precision fit-up gap.
Background technology
The gap of assembling is meant when workpiece assembles; Gap between workpiece and the workpiece; Normal workpiece is in order to satisfy matching requirements; Workpiece added added suitable tolerance man-hour, but because machining precision and detection, the assembling of workpiece sometimes can not be satisfied the requirement of product appearance and usability.Therefore, we need detect the gap between the workpiece after the assembling, make it not influence product appearance and usability.
Traditional gap detection mainly adopts manual measurement, and survey instrument has: slide calliper rule, slip gauge, feeler gauge, clearance gauge, divider and laser.There is following defective in above-mentioned measuring method: 1, the user measure gimmick and the technology all can certain influence be arranged to testing result; 2, measure the back supvr and can't know the measuring method of data and measure definition that the staff record analysis of data is easy to generate mistake; 3, measuring interface profile can't record; 4, metering system is that contact causes the surface to move or distortion easily, even damages measured surface; 5, measure cleaning and the maintenance that needs periodicity, avoid the metal tools oxidation; 6, measure each workpiece and all can receive its classification, size, shape limits, and can be influential on the irregular surface of measurement; 7, laser measurement also can't be measured atomic little gap (below the 0.1mm) except above 6 defectives.
Machine vision technique adopts the high resolving power picture pick-up device, the fit-up gap image is gathered, and handles and analyzes.Can not influence data repeatability when the gap is measured, and intelligentized identification software can realize data recording and analysis, and can carry out record, the convenient contrast and the analysis of data in the future the picture of the cross section profile measured because of user's measuring technique.Fit-up gap detection technique based on machine vision adopts non-contact measurement, can not impact the measured workpiece surface.It is Polaroid that but existing machine vision detection method adopts; Because the restriction of illumination condition and detected parameters; The classification of examined workpiece, size and shape affects are bigger, can't obtain correct clearance margin during to the measurement irregular surface, can't realize the gap detection of quick nondestructive.
Summary of the invention
The objective of the invention is to overcome above-mentioned deficiency, a kind of accurately quick, high-precision fit-up gap detection method is provided.This method adopts machine vision technique, and secondary imaging is carried out in the fit-up gap, extracts gap edges at two ends information respectively, has eliminated when Polaroid two ends, gap irregular surface to the influence of imaging, obtains clear and clearance margin image accurately.And image handled, draw the clearance measurement value.
Realize the technical measures of above-mentioned purpose:
1, the polishing mode through light-source control system control light-source system, wherein first kind of polishing mode can clearly be obtained the boundary image of an end in gap, and second kind of polishing mode can clearly be obtained the boundary image of the other end in gap.Under the different illumination condition, adopt picture pick-up device to gather two width of cloth fit-up gap images respectively; Images acquired is sent to computing machine through image capture device, and computing machine obtains the marginal information at the two ends in gap respectively from two width of cloth images that collected, through Intelligent Recognition software; Images acquired is handled; Calculate the measured value in gap, the size in gap is judged, provide result of determination.
2, under identical illumination condition; IMAQ condition through Intelligent Recognition software control picture pick-up device; Like shutter speed; Image gain etc., wherein first kind of IMAQ condition can clearly be obtained the boundary image of an end in gap, and second kind of IMAQ condition can clearly be obtained the boundary image of the other end in gap.Under the pictures different acquisition mode, gather two width of cloth fit-up gap images; Images acquired is sent to computing machine through image capture device, and computing machine obtains the marginal information at the two ends in gap respectively from two width of cloth images that collected, through Intelligent Recognition software; Images acquired is handled; Calculate the detected value of fit-up gap, the size in gap is judged, provide result of determination.
Device of the present invention is made up of image acquisition hardware and image recognition software.
Image acquisition hardware is made up of light source, light-source control system, picture pick-up device, image capture device, computing machine.
Light source is the ring-type led light source group of 16 five equilibriums, and light-source control system is controlled by Programmable Logic Controller or input-output card, and light-source control system can be regulated the brightness and the switch of 16 groups of led light sources respectively, realizes multiple combination polishing mode.
The high-precision intelligent identification software can be controlled input-output card and carry out work realization light source control; Simultaneously can send instruction control picture pick-up device image acquisition parameter; Receive the gap pattern that picture pick-up device collects, utilize image processing algorithm that images acquired is handled, obtain clearance margin information; The marginal position coordinate of record gap, comprehensive two width of cloth edge of image positions draw the measured value in gap.Measurement data is write down and analyzes, provide result of determination.
Description of drawings
Fig. 1 is the fit-up gap pick-up unit structural representation that the present invention is based on machine vision.
Fig. 2 is 16 synoptic diagram such as light-source structure such as branch such as grade.
Fig. 3 is an Intelligent Recognition software processes process flow diagram.
Fig. 4 is an images acquired variation diagram in fit-up gap under the different illumination conditions.
Description of reference numerals:
1---objective table,
2---the test material,
3---light source,
4---light-source control system,
5---picture pick-up device,
6---image capturing system,
7---computing machine,
8---light source base,
9---LED lamp group,
10---the light source center through hole,
11---one end border, first width of cloth gap pattern gap,
12---other end border, second width of cloth gap pattern gap.
Embodiment
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are set forth in detail, thereby protection scope of the present invention is made more explicit defining so that advantage of the present invention and characteristic can be easier to it will be appreciated by those skilled in the art that.
The present invention is made up of image acquisition hardware and Intelligent Recognition software, and image acquisition hardware is made up of light source (3), light-source control system (4), picture pick-up device (5), image capturing system (6), computing machine (7); Intelligent Recognition software comprises light source control, IMAQ control, Flame Image Process, data recording and analysis, result of determination output.
As shown in Figure 1: test material (2) places on the objective table (1), and light source (3) is positioned at directly over the test material (2), and picture pick-up device (5) is positioned at light source (3) top, and is concentric with light source (3) center pit.Intelligent Recognition software is controlled light source (3) through control light-source control system (4), realizes different polishing modes.Intelligent Recognition software carries out the image acquisition parameter setting through control image capturing system (6), controls it simultaneously image is gathered, and image is imported in the computing machine (7), and images acquired is carried out image processing and analyzing, draws recognition result.
Fig. 2 is an above-mentioned said light source (3), and light source (3) center has light source center through hole (10), and light source base (8) is divided into 16 parts, and 16 groups of LED lamp groups (9) are installed on the light source base (8), and LED lamp group (9) is installed horizontal by 60 ° of angles.Light-source control system (4) can be controlled respectively (9) brightness of 16 groups of LED lamp groups and switch, realizes the polishing mode of various combination.
Above-mentioned said Intelligent Recognition software processes flow process is as shown in Figure 3:
1, Intelligent Recognition software is through light-source control system (4) control light source (3) polishing mode; Wherein first kind of polishing mode can clearly be obtained the boundary image of an end in gap, and second kind of polishing mode can clearly be obtained the boundary image of the other end in gap.Under the different illumination condition, adopt picture pick-up device (5) to gather two width of cloth fit-up gap images respectively; Images acquired is sent to computing machine (7) through image capturing system (6), and computing machine (7) obtains the marginal information at the two ends in gap respectively from two width of cloth images that collected, through Intelligent Recognition software; Images acquired is handled; Calculate the measured value in gap, the size in gap is judged, provide result of determination.
2, under identical illumination condition; Intelligent Recognition software is through the IMAQ condition of control picture pick-up device (5); Like shutter speed; Image gain etc., wherein first kind of IMAQ condition can clearly be obtained the boundary image of an end in gap, and second kind of IMAQ condition can clearly be obtained the boundary image of the other end in gap.Under the pictures different acquisition mode, gather two width of cloth fit-up gap images; Images acquired is sent to computing machine (7) through image capturing system (6), and computing machine (7) obtains the marginal information at the two ends in gap respectively from two width of cloth images that collected, through Intelligent Recognition software; Images acquired is handled; Calculate the detected value of fit-up gap, the size in gap is judged, provide result of determination.
Two width of cloth fit-up gap images of Fig. 4 for gathering under the different illumination condition; From image, can find out; Assembling workpiece A profile presents irregular variation; Assembling workpiece B is rule, can't under same illumination condition, get the border of the two simultaneously, and present embodiment is being obtained one end border (11), first width of cloth gap pattern gap, under second kind of polishing mode, obtained second other end border, width of cloth gap pattern gap (12) under first kind of polishing mode.In second width of cloth gap pattern, can see the border of partly assembling workpiece B, but the border is discontinuous, imperfect, this also just secondary imaging carry out the meaning of gap detection.
Above embodiment is more preferably one of embodiment of the present invention, and common variation and the replacement of those skilled in the art in scheme scope of the present invention all should be included in protection scope of the present invention.