Embodiment
The automated detection system of smooth surface defect has the optical microphotograph zoom system, pancreatic system successively, light source, scanning workbench and image acquisition and data handling system, the optical microphotograph zoom system, pancreatic system has CCD 1 successively, varifocal micro-amplification system 2, light source has incandescent light source 8 successively, the optical fiber 9 that angles of azimuth is arranged, cola illumination head 5, fiber angle is adjustable 3, scanning workbench has the X of sub-aperture scanning successively, Y worktable driving circuit 14,15, X, the motor 16 of Y scanning direction, 17, X, Y scanning workbench 18, be provided with dark background 7 in scanning workbench, image acquisition and data handling system have watch-dog 11, image capturing system 10, computing machine 12, computer digital mode treatment system 13.
Incandescent light source 8 is for Halogen lamp LED and adopt the cola illumination.Computer digital mode treatment system 13 as accompanying drawing 3 is: image imports, utilizes medium filtering to suppress random impulsive noise; Utilize gray scale linear transformation efficiently effectively to extract the target signature image; Realize image segmentation and binaryzation; Remove redundant information; Adopt the erosion operation of morphology refinement to make the lines refinement be convenient to subsequently line tracking; Set up the defect java standard library; Sort out and estimate and calibration.The optical fiber 9 that angles of azimuth is arranged is: the array of angles of azimuth cold light source is arranged.
The optical measurement principle of the automated detection system of smooth surface defect
The prerequisite that the present invention all should adopt scattered light to detect according to the engineering specification defect is set up suitable heavy caliber and aperture scanning is scattering into the system that picture detects.Be the system layout of pick-up unit as shown in Figure 1, computing machine is described in the lower part to the mode identification method and the process of defect.Detected element 6 is placed on an X that heavy caliber can be divided into some sub-aperture scannings, the Y worktable 18, is dark background 7 in the detected element bottom, and scanning can be controlled by computing machine 12.Adjustable 3 of optical fiber source 9 usefulness are with the specific tested element of angular illumination, incident light is through being positioned at lower surface on the optical system object plane or upper surface reflection back from other end outgoing, and 4 one-tenth α corner reflections of the scattered light that this beauty defects edge brings out are after varifocal micro-amplification system 2 collections and imaging on the CCD 1.Monitoring when image one tunnel supplies to detect through watch-dog 11, computer patterns disposal system 13 is sent the view data that collects into through image capturing system 10 in another road.By optical scattering photoimaging theory as can be known, constitute the reflective image of bright defect scattered light on the dark background thus, because character such as this α angle and the defect marginal ditch angle of the v-groove have substantial connection, so adopt the layout of many optical fiber angles of azimuth, become angle α to incide plane was seized with optical axis, can guarantee so all can obtain the reflection of light of the surface scattering clearly image of defect no matter how the marginal ditch angle of the v-groove of defect changes.Realize the digitizing evaluation of computing machine to the defect Flame Image Process, very crucial a bit is exactly acquisition can be suitable for the defect image that computer patterns is discerned, and accompanying drawing 2 is the digital picture that the defect of cut and pit is contained on surface that the present invention collects with accompanying drawing 1 described device, the gray-scale value contrast of background and defect target obviously is very suitable for the image and the data processing of computing machine.When tested surface is heavy caliber, computing machine 12 controls can be carried out the X of sub-aperture scanning, the driving circuit 14,15 of Y worktable, make X, Y motor 16,17 drive worktable 18 and carry out a plurality of sub-aperture scannings of X, Y direction, thereby can obtain unified defect view data.
Identification of defect image model and feature extraction mathematical model
The present invention has set up mathematical model and the process software of defect image based on the pattern-recognition of mathematical morphology, has set up the evaluation system of a complete digitizing standard.It has mainly finished identification processing and feature extraction to the defect image information; The classification assessment and the calibration of defect.
(1) realizes defect image model identification mathematical model and feature extracting method
The defect image model model of cognition of setting up among the present invention is the key link that digitizing is estimated.As from the defect image of accompanying drawing 2, extracting the information relevant with the defective cut, to utilize digital morphological to learn and carry out image segmentation, feature (as defect shape, size, length, area etc.) is extracted, multiple Flame Image Process work such as line tracking.Utilize the disposal route of mathematical morphology, binary image is carried out optimization process, finish the identification of defect, accompanying drawing 3 is realizes defect image model identification mathematical model and feature extracting method process flow diagram.
Medium filtering
The defect image because the impulsive noise that each link produces in some systems at random in order to remove the noise that some do not belong to defect, is utilized medium filtering or other filtering method, effectively suppresses noise as shown in Figure 2.
The gray scale linear transformation
Defect feature and background separation be come, it must utilize image segmentation.Adopt one efficiently disposal route be the gray scale linear transformation.Output and input gray level satisfy:
G
Go out=a
iG
Go intoI=1,2 ..., n (1)
A in the formula
iBe transformed value, a
i>1 is grey level stretching, and contrast strengthens.The gray scale linear transformation can be carried out in segmentation, and the gray scale of defect feature and background is drawn back greatly, has effectively extracted the target signature image.
Image segmentation and binaryzation
Image segmentation is a very important image analysis technology.After grey level stretching, both separate substantially at gray scale, and histogram must be " L " type, and promptly the gray-scale value probability of background is much larger than the gray-scale value of defect target.Optimal threshold search method in utilization and the shape Region Segmentation Algorithm.This data model is according to known image probability density function expression-form, when the probability density of background and defect target is respectively p
b, p
o, can solve and make target cut apart the optimal threshold T of total error probability minimum:
μ in the formula
b, μ
0Be respectively the average optical density of background and target; σ is the standard deviation of noise, as the separatrix of cutting apart background and target, to this method of imagery exploitation, makes background and target optimal segmentation with T.
Binaryzation is based on the basis of image segmentation, is the boundary with background and target according to being worth most threshold value T, respectively background and target are made as 0 and 1 (help like this accelerate in the morphology processing speed), binaryzation can make the realization of algorithm greatly simple, and to following removal redundant information, applied morphology carries out feature extraction to image and provides the foundation.
Remove redundant information
Heavy caliber scanning detects, and has hundreds and thousands of sub-apertures.Whether there is defect information in each sub-aperture, screened and carry out next step computing.Defective is stochastic distribution in the aperture, to each connected region zoning size (promptly to target pixel summation), whether judges in certain sub-aperture defectiveness or little to ignoring, with quickening subsequent operation speed after binaryzation.
The morphology refinement
The morphology refinement is a kind of main image processing method, to above-mentioned binary image, adopts morphologic erosion operation and hits the miss computing, carries out refinement, is convenient to line tracking subsequently, to carry out length computation.In the defect standard lines length L there is special tolerance limit requirement.
To the defect image A of a frame binaryzation, the setting structure element is its corrosion E to A of S, and mathematical expression is:
And the normally set of structural element origin position of E.Relatively being fit to program by the displacement computing realizes.By erosion operation lines are attenuated.But, when eroding to certain depth, lines are eroded than narrow, same lines are divided into two sections.Therefore in order compensating its defect, to keep the connectedness of target lines, correctly to reflect the rationality (, then defective, and produce flase drop when being separated into the two-lines bar) of plane was seized lines length and element as the long 40mm of surpassing of lines.Erosion operation improved promptly judge earlier, corrode and keep the connective thinning method that adopts of former lines, its mathematical definition is
In the formula
Be to hit the miss computing, it is defined as:
S is by two disjoint structural element S in the formula
1, S
2Form, A is the supplementary set of A.Hit or miss transform can keep the connectedness of target lines in the following formula.When specific procedure is implemented, be provided with Rule of judgment, meet then and peel off, otherwise then keep.After refinement, the different thicknesses lines are refined as the lines that single pixel is wide, can calculate the physical length of cut.
Line tracking
After refinement, removed and the irrelevant information of cut lines length, made the cut that is detected high-visible." 1 " is target, and " 0 " is no information.Therefore, in routine processes, exploring with target pixel 1 to 8 neighborhood direction.Set priority, track explored in record, lines all searched for finish.When operation, can utilize multiple method for limiting to finish the line tracking record, and the course of the initial and terminal point of lines is the lines length L.
Differentiating for characterize edge chips with A , is that the physical pore size edge with plane was seized is the boundary, and there is fixed size in the aperture, is stored in advance and is aided with scanning by computing machine and determine, also can utilize the aforesaid method such as image segmentation of doing according to the edge gray feature to obtain.
(2) sub-aperture scanning system
The beauty defects of heavy-calibre element detects, and is that full aperture is progressively implemented sub-aperture scanning, implements splicing during last Flame Image Process.Set up the translation that utilizes the XY both direction as shown in Figure 4 and obtained surperficial sub-aperture scanning, wherein A
11, A
12Deng being sub-aperture, the straight line running fix that moves guiding systems has at present reached the bearing accuracy (promptly less than CCD a pixel value) of micron, sub-micron.For the sub-aperture scanning of lens, can utilize the beat scanning of plane was seized (centre of sphere) simultaneously, sphere is carried out the full aperture imaging around meridian ellipse and sagittal surface.
(3) comparison of defect width criteria and evaluation
The image that detection system of the present invention produces is to detect with bright elephant the on the dark background, therefore, for the physical size size of correct evaluation defect, can set one group of defect standard groove and carry out the actual detection calibration.
The substrate of defect standard and width are selected:
Owing to measure,, make the image of detection and the standard scale can be consistent because enlargement factor difference at every turn so will correctly will resemble the face size conversion to the object plane physical size, is promptly obtained a correct enlargement factor with a varifocal optical microscope system.Therefore adopted the optical glass substrate, made the cut groove of different in width by lithography, width is (length unanimity) from several microns to tens microns; From technologies such as polishings as can be known, the line that particulate marks from the teeth outwards generally is " V " shape, and the scattered light that produces along the edge to be exactly CCD resemble the bright target that forms on the face resembles.These width are to utilize equipment such as step instrument, contourgraph, accurately ask for.When detecting, this on-gauge plate is called contrast when storage supplies calibration as built-in function.
In setting up standard cut groove,, suitably select the substrate of different reflectivity according to different measured targets.Research by analysis, the calibration of the reflective dark ground illumination image of usefulness native system is better than the image comparison of transmission-type, and by the groove calibration, can guarantee the accuracy of its detection fully, and be suitable for any reflecting element surface.
The evaluation of defect and classification:
The classification of defect is to be based upon on the image model base of recognition, handles and the database of the geometric configuration of different defects such as all kinds of cuts in the full aperture, defective, broken limit has been set up in calibration through the scanner uni a series of images.According to the engineering specification of industry, the number of picture elements of defect of identification is carried out mathematical computations, calculate the length of cut and width, the square root of pit area, the length of edge damage etc.
The present invention has set up the novel scanning scattering image-forming detecting system that is suitable for heavy caliber, high-precision surface according to international defect engineering specification; Set up a comprehensive, scientifical evaluation heavy caliber of energy and detected the mathematical model of scanning imagery and the mode identificating software system of Flame Image Process; Can promote domestic and international beauty defects evaluation to develop greatly to the digitizing reference direction.
Embodiment 1
The automated detection method of smooth surface defect of the present invention and system as shown in Figure 1, when tested surperficial bore hour, detected element 6 is placed on the worktable 18, is dark background 7 in the detected element bottom.But adjustment rack 3 makes optical fiber source (light source be incandescent lamp and can carry out light intensity regulating) 9 with the specific tested element of angular illumination, from other end outgoing, collected and image on the CCD 1 by varifocal optical microphotograph amplification system 2 after then becoming the α corner reflection by the part scattered light that the beauty defects edge brings out after being positioned at the surface reflection on the optical system object plane for incident light.Monitoring when image one tunnel supplies to detect through watch-dog 11, computer patterns disposal system 13 is sent the view data that collects into through image capturing system 10 in another road, machine carries out a series of pattern-recognition digitized processing of defect image and compares with the groove of standard as calculated, the width that can draw the long lines of accompanying drawing 2 is about 42 microns, and length is about 7 millimeters.
Embodiment 2
When tested surperficial bore is big, the automated detection system of the smooth surface defect of employing as shown in Figure 1, the laying and adjust of detected element as embodiment 1.When tested surface is heavy caliber, can carry out scan mode as shown in Figure 4, the X of computing machine 12 control sub-aperture scannings, the driving circuit 14,15 of Y worktable, make X, Y motor 16,17 drive worktable 18 and carry out a plurality of sub-aperture scannings of X, Y direction, thereby can obtain unified defect view data.And finish sub-aperture stitching according to the coordinate of each scan aperture.Heavy caliber detects and must be made up of a plurality of sub-aperture stitchings, so data volume is very big, for amount of compressed data, can remove the sub-aperture of no defect information, satisfies the accuracy of defect measurement and the demand between the processing speed simultaneously.Final can carry out and obtain the measurement result identical equally with embodiment 1.