A kind of machine vision acquires the optimization device and its detection method of a wide range of image
Technical field
The invention belongs to IC manufacturing fields, are related to machine vision technique, more particularly, to a kind of machine vision
Acquire the optimization device and its detection method of a wide range of image.
Background technique
Currently, the design of semiconductor devices is rapidly developed to the direction of high density, high integration, to semiconductor integrated circuit
New process, new technology, new equipment propose increasingly higher demands.The application popularization of machine vision be mainly reflected in semiconductor and
Electronics industry, wherein general 40%-50% concentrates on semicon industry.Especially, as in integrated circuit production line process
Defect Detection silicon wafer manufacturing process in play important role.
Defect Detection is precision parts quality testing link step of crucial importance, flatness involved in detection process,
With the presence or absence of flaw, frame uniformity, workpiece surface brightness etc..Machine vision is that flaw is examined in ic manufacturing process
Common tool is surveyed, machine vision is the system for instigating machine to have visual perception function.It can be obtained by visual sensor
The two dimensional image of environment is taken, and is analyzed and is explained by vision processor, and then be converted to symbol, machine can be recognized
Object features simultaneously determine its position.It mainly includes image collection module, image processing module and output module.Image obtains mould
Block may include light source and video camera etc.;Image processing module includes corresponding software and hardware system;Output equipment is and system
Make the connected related system of process, including process controller and warning device etc..
The core of NI Vision Builder for Automated Inspection be Image Acquisition (how obtaining the good picture of a width) and image procossing (how
Find most effective, most accurate algorithm).All information derive from image, and picture quality is very crucial to entire vision system.
Experienced machine vision engineer can approve that in short " success or failure of machine vision project are that can obtain one beats in this way
The outstanding picture of light ".For the main effect of light source to illuminate target, raising brightness, which is formed with, overcomes ring conducive to the effect of image procossing
The interference of border light guarantees that picture steadiness is used as the tool or object of reference of measurement.
The good image of one width should have a following condition: contrast is obvious, the sharpness of border background of target and background as far as possible
Desalination and uniformly, want that color is true, brightness is moderate and not overexposure etc..If collected picture itself " quality " is very
Difference, then the image processing work under fetching will be difficult.
Referring to Fig. 1, Fig. 1 is the machine vision surface blemish detection device for using coaxial polishing mode in the prior art.
As shown, the equipment carries out carrying out Image Acquisition to product 3 using camera 1, acquisition range 30mm*30mm belongs to big model
Image is enclosed, coaxial light source 2 is used to carry out the axis light polishing mode of polishing.It will be apparent to those skilled in the art that due to axis light
The light source characteristic in source 2, Image Acquisition occur spreading decrease or local enhancement to surrounding among shade of gray after coming out.As shown in Fig. 2,
Acquisition 4 gamma error range of original image is 80 gray levels, and arc variation is presented in shade of gray, and error range is 80 gray levels,
The error range is excessive, and the easy lid of progress binaryzation falls flaw and is easy to produce office that is, if carrying out image procossing on this basis
Portion's fixed error.
Summary of the invention
To overcome drawbacks described above, it is an object of the invention to improve overall output image pixel uniformity and promote flaw inspection
The accuracy of survey.To achieve the above object, technical scheme is as follows:
A kind of machine vision acquires the optimization device of a wide range of image, including image acquisition unit, image processing unit and
Image output unit, described image acquiring unit include light source production module and image capture module;Carrying out Defect Detection mistake
Cheng Zhong, the light source production module directly beat visual light on test product, and described image acquisition module receives the vision
The reflected light of light simultaneously exports raw image data after carrying out photoelectric conversion;It is characterized in that, further include image pre-processing unit,
The original image pixels gray value that described image acquisition module is sent is received, and the original image pixels gray value is carried out
Described image processing unit is input to after value processing, comprising:
Boundary determining module, in the original pixels gray value extract gray scale high-brightness region boundary included
Pixel, wherein the pixel in the gray scale high-brightness region is the pixel of required equalization in the original image;
Mean module obtains figure for calculating the overall intensity average value of all pixels in the gray scale high-brightness region
Each single column of pixels gray average as in calculates the ratio of each the single column of pixels gray average and overall intensity average value;
Gray scale adjusts module, after calculating each single-row middle all pixels gray value multiplied by ratio formation adjustment
Image pixel gray level value, and the image pixel gray level value adjusted is replaced into the original image pixels gray value.
Further, described image pretreatment unit further includes intensity of light source rectification module, according to the vision intensity of light source
The associated features of figure and the original image pixels gray value or the image pixel gray level value adjusted, to described original
Image pixel gray level value or the image pixel gray level value adjusted are corrected.
Further, described image pretreatment unit further includes module of roguing, and is carrying out the gray scale high-brightness region
When the overall intensity mean value calculation of middle all pixels, remove the most bright spot set and most dim spot collection of described image grey scale pixel value
It closes.
Further, vision light source is annular light source, annular shadowless light source, four sides tunable light source, linear light sorurce, strip light
It is source, dome light source, area source, plane shadowless light source, coaxial light source, coaxial source of parallel light, four sides shadowless light source, point light source, big
Power industry point light source, AOI light source or combined light source.
To achieve the above object, another technical solution of the invention is as follows:
A kind of detection method using above-mentioned apparatus, includes the following steps:
Step S1: the light source production module directly beats visual light on test product, and described image acquisition module connects
It receives the reflected light of the visual light and exports raw image data after carrying out photoelectric conversion;
Step S2: image pre-processing unit receives the original image pixels gray value that described image acquisition module is sent,
And described image processing unit will be input to after original image pixels gray value progress equalization processing;Wherein, step S2
It specifically includes:
Step S21: extracting the pixel that gray scale high-brightness region boundary is included in the original pixels gray value,
In, the pixel in the gray scale high-brightness region is the pixel of required equalization in the original image;
Step S22: calculating the overall intensity average value of all pixels in the gray scale high-brightness region, obtains every in image
One single column of pixels gray average calculates the ratio of each the single column of pixels gray average and overall intensity average value;
Step S23: each single-row middle all pixels gray value is calculated multiplied by the ratio and forms image slices adjusted
Plain gray value, and the image pixel gray level value adjusted is replaced into the original image pixels gray value;
Step S24: the image pixel gray level value adjusted is input to described image processing unit;
Step S3: described image processing unit carries out target signature according to the image pixel gray level value adjusted
Processing, and result is input to described image output unit.
Further, further include intensity of light source rectification step S20 before the step S21: according to vision intensity of light source figure with
The associated features of the original image pixels gray value correct the original image pixels gray value.
Further, further include step S25 after the step S24: according to vision intensity of light source figure with it is described adjusted
The associated features of image pixel gray level value correct the image pixel gray level value adjusted.
Further, the overall intensity average value of all pixels in the gray scale high-brightness region is carried out in step S22
When calculating, remove the most bright spot set and most dim spot set of described image grey scale pixel value.
It can be seen from the above technical proposal that it can will be passed through by image equalization and intensity of light source antidote
The image grayscale error orders of magnitude more several than original image reduction valence, effectively promote general image uniformity after processing.Also, this
Method is suitable for light source uniformity compared with difference image, it is not limited to which column pixel can extend to production intensity of light source figure and image
Gray scale is associated, promotes Defect Detection accuracy.
Detailed description of the invention
Fig. 1 is the machine vision surface blemish detection device schematic diagram for using coaxial polishing in the prior art
Fig. 2 is the shade of gray pictorial diagram come out in the prior art using equipment Image Acquisition shown in Fig. 1
Fig. 3 is the module diagram for the optimization device that machine vision of the present invention acquires a wide range of image
Fig. 4 is that the process that the present invention acquires the detection method in the optimization device of a wide range of image applied to machine vision is shown
It is intended to
Fig. 5 is step S21 concrete implementation schematic diagram in the embodiment of the present invention
Fig. 6 is step S22 concrete implementation schematic diagram in the embodiment of the present invention
Fig. 7 is step S23 concrete implementation schematic diagram in the embodiment of the present invention
Fig. 8 is step S24 concrete implementation schematic diagram in the embodiment of the present invention
Fig. 9 is the present invention using Fig. 3 shown device processing image gray-scale level degree pictorial diagram adjusted
Specific embodiment
3-9 with reference to the accompanying drawing, specific embodiments of the present invention will be described in further detail.
It should be noted that the present invention is a kind of utilization of NI Vision Builder for Automated Inspection.It is identical with other NI Vision Builder for Automated Inspections
It is machine vision of the invention is to replace human eye with machine to measure and judge, by machine vision product, (i.e. image is obtained
Unit is taken, two kinds of CMOS and CCD are divided to) it target will be ingested is converted into picture signal, it sends dedicated image processing unit to, obtains
It is transformed into digitized signal according to the information such as pixel distribution and brightness, color to the shape information of target subject;Image procossing
Unit can carry out various operations to these signals to extract clarification of objective, and then defeated by output unit according to the result of differentiation
The device action at scene is controlled out.
In the following embodiments, it is only illustrated by taking Defect Detection as an example, others are no longer gone to live in the household of one's in-laws on getting married one by one herein with scene
It states.Referring to Fig. 3, Fig. 3 is the schematic diagram for the optimization device that machine vision of the present invention acquires a wide range of image.As shown, figure
As acquiring unit includes light source production module and image capture module;During carrying out Defect Detection, light source production module will
Vision light source is directly beaten on test product, after image capture module receives the reflected light of the visual light and carries out photoelectric conversion
Export raw image data.
The present invention is different with other NI Vision Builder for Automated Inspections to be, the invention also includes image pre-processing units, receives
The original image pixels gray value that image capture module is sent, and will be defeated after the progress equalization processing of original image pixels gray value
Enter to image processing unit.As shown, image pre-processing unit specifically includes boundary determining module, mean module and gray scale tune
Mould preparation block.
Boundary determining module, the picture for being included for extracting gray scale high-brightness region boundary in original pixels gray value
Element, wherein the pixel in gray scale high-brightness region is the pixel of required equalization in original image.Mean module is for calculating ash
The overall intensity average value of all pixels in high-brightness region is spent, each single column of pixels gray average in image is obtained, is calculated every
The ratio of one single column of pixels gray average and overall intensity average value.Gray scale adjustment module is for calculating each single-row middle pixel
Gray value forms image pixel gray level value adjusted multiplied by ratio, and image pixel gray level value adjusted is replaced original graph
As grey scale pixel value.
It should be noted that the optimization device that machine vision of the invention acquires a wide range of image can also count
Calculate gray scale high-brightness region in all pixels overall intensity average value when, remove image pixel gray level value most bright spot set and
Most dim spot set, i.e. image pre-processing unit can also include module of roguing.
In addition, image pre-processing unit can also include the intensity of light source in some other preferred embodiments of the present invention
Rectification module, according to the phase of vision intensity of light source figure and original image pixels gray value or image pixel gray level value adjusted
Linked character corrects original image pixels gray value or image pixel gray level value adjusted.For example, in vision light source
In the case that intensity publication is inconsistent, its influence to vision light source to original image is considered, and go to disappear by some algorithms
It removes or compensates.Certainly, correcting to image pixel gray level value can carry out before step S2 is executed, and can also be executed with step S2
After carry out, details are not described herein.
Referring to Fig. 4, Fig. 4 is the detection side optimized in device that the present invention is applied to that machine vision acquires a wide range of image
The flow diagram of method.The solution of the embodiment of the present invention is mainly as follows:
Step S1: light source production module directly beats visual light on test product, and image capture module receives visual light
Reflected light and export raw image data after carrying out photoelectric conversion.
Vision light source is an important factor for influencing NI Vision Builder for Automated Inspection input, it directly affects the quality of input data and answers
Use effect.Due to not general machine vision illumination equipment, so being directed to each specific application example, to select corresponding
Lighting device, to reach optimum efficiency.Vision light source can be divided into visible light and black light.Common several visible light sources are white
Vehement lamp, fluorescent lamp, mercury vapor lamp and sodium lamp.The shortcomings that visible light is that luminous energy is not able to maintain stabilization.Lighting system presses its irradiation side
Method can be divided into: backwards to illumination, front illumination, structure light and stroboscopic optical illumination etc..
In an embodiment of the present invention, vision light source can for annular light source, annular shadowless light source, four sides tunable light source,
Linear light sorurce, strip source, dome light source, area source, plane shadowless light source, coaxial light source, coaxial source of parallel light, on four sides without shadow
Light source, point light source, high-power industrial point light source, AOI light source or combined light source etc..
Obtaining original image from image capture module in the present invention is gray-scale image, i.e., every in gray-scale image
The image of a only one sample color of pixel.This kind of image is typically shown as the gray scale from most furvous to most bright white.
In an embodiment of the present invention, raw image data can be pixel grey scale (Gray scale) value pixel, which refers to
The color value of each object is represented when gray scale object is converted to RGB.It is several being divided between white and black by logarithmic relationship
Grade, referred to as tonal gradation.For example, the tonal gradation range, generally from 0 to 255, white is 255, black 0, intensity profile is
Refer to the distribution situation of the gray value of gray level image.
Step S2: image pre-processing unit receives the original image pixels gray value that image capture module is sent, and will be former
Beginning image pixel gray level value is input to image processing unit after carrying out equalization processing;Wherein, step S2 is specifically included:
Step S21: extracting the pixel that gray scale high-brightness region boundary is included in the original pixels gray value,
In, the pixel in the gray scale high-brightness region is pixel (the concrete implementation mode of required equalization in the original image
As shown in Figure 5);
Step S22: calculating the overall intensity average value of all pixels in gray scale high-brightness region, obtains each list in image
Column pixel grey scale mean value calculates ratio (the concrete implementation mode of each single column of pixels gray average and overall intensity average value
As shown in Figure 6);
Step S23: each single-row middle all pixels gray value is calculated multiplied by the ratio and forms image slices adjusted
Plain gray value, and image pixel gray level value adjusted is replaced into original image pixels gray value (concrete implementation mode such as Fig. 7
It is shown);
Step S24: the image pixel gray level value adjusted is input to image processing unit (concrete implementation mode
As shown in Figure 8).
Referring to Fig. 9, Fig. 9 is that the present invention uses Fig. 3 shown device to handle shade of gray figure adjusted (marked as 5 tables
Show) schematic diagram.As shown, we should be apparent that the image after equalization understands than original image very much, by step
Image grayscale error has been reduced to 50 gray levels than the gamma error of original image after S2 adjustment processing, therefore, is effectively promoted whole
Body image conformity.
It is further to note that this method is not limited to column pixel, light source uniformity is equally applicable to compared with difference image.
It is thing times during functionization of the invention it will be apparent to those skilled in the art that luminous energy how to be made to keep stablizing in certain degree
The problem of function half.It therefore, can also include intensity of light source rectification step before step S21 in one embodiment of the present of invention
S20: according to the associated features of vision intensity of light source figure and original image pixels gray value, to original image pixels gray value into
Row correction.It certainly, further include step S25 after step S24 in such as one embodiment of the invention: according to vision light source
The associated features of intensity map and image pixel gray level value adjusted correct image pixel gray level value adjusted.
Step S3: described image processing unit carries out target signature according to the image pixel gray level value adjusted
Processing, and result is input to described image output unit.
Specifically, image processing unit for example can be transformed into digitlization according to information such as pixel distribution, brightness and colors
Signal, and various operations are carried out to these signals to extract clarification of objective, such as area, quantity, position, length, further according to pre-
If permissibility and other output with conditions as a result, for example.May include size, angle, number, qualification/unqualified, with/without etc.,
The function of realizing automatic identification, will not repeat them here.
In conclusion the technical solution in the embodiment of the present invention, by image equalization and intensity of light source antidote,
It image grayscale error than original image can will reduce the several orders of magnitude of valence after treatment, it is uniform effectively to promote general image
Property.Also, this method is suitable for light source uniformity compared with difference image, it is not limited to which it is strong can to extend to production light source for column pixel
Degree figure is associated with image grayscale, promotes Defect Detection accuracy.
Above-described to be merely a preferred embodiment of the present invention, the patent that the embodiment is not intended to limit the invention is protected
Range is protected, therefore all with the variation of equivalent structure made by specification and accompanying drawing content of the invention, similarly should be included in
In protection scope of the present invention.