CN104102911A - Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system - Google Patents
Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system Download PDFInfo
- Publication number
- CN104102911A CN104102911A CN201410324615.XA CN201410324615A CN104102911A CN 104102911 A CN104102911 A CN 104102911A CN 201410324615 A CN201410324615 A CN 201410324615A CN 104102911 A CN104102911 A CN 104102911A
- Authority
- CN
- China
- Prior art keywords
- image
- aoi
- gray
- value
- detection system
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 21
- 230000007547 defect Effects 0.000 title claims abstract description 16
- 238000001514 detection method Methods 0.000 title claims abstract description 13
- 230000003287 optical effect Effects 0.000 title abstract description 7
- 238000007689 inspection Methods 0.000 title abstract description 3
- 238000000034 method Methods 0.000 claims abstract description 18
- 230000008569 process Effects 0.000 claims abstract description 10
- 230000009466 transformation Effects 0.000 claims abstract description 7
- 238000001914 filtration Methods 0.000 claims abstract description 4
- 238000003709 image segmentation Methods 0.000 claims abstract description 4
- 230000000007 visual effect Effects 0.000 claims description 12
- 238000005516 engineering process Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005498 polishing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
The invention discloses an image processing algorithm for an AOI (automated optical inspection)-based bullet appearance defect detection system. The image processing algorithm comprises the following steps: (1) obtaining an original image of a bullet appearance by an AOI system; (2) processing the original image by a median filtering method, removing noise, and smoothening an original image signal; (3) stretching the image by linear grey level transformation; and (4) segmenting the image by Otsu to obtain a binarization image. The original image obtained by the AOI system is subjected to processing, such as smooth denoising, image enhancement, image segmentation and the like by an algorithm with a high operation speed, so that the original image is converted into the binarization image, bullet appearance defects can be more obviously highlighted and can be more conveniently extracted and identified in a subsequent process, and image processing efficiency is greatly increased.
Description
Technical field
The present invention relates to the image processing techniques of AOI system, particularly relate to a kind of image processing algorithm of the bullet visual defects detection system based on AOI.
Background technology
AOI (Automatic Optic Inspection), being called again automated optical detects, to using exercise machine vision as basic technology, the shortcoming of using optical instrument to detect with manpower traditionally as improvement, improves optical image detection system precision and speed and a special kind of skill of being born.
Digital picture refers to the two-dimensional matrix of the pocket composition that is known as pixel.After physical image ranks are divided, each pocket becomes pixel.Each pixel comprises two attributes: picture position and gray-scale value.
For monochrome image, i.e. gray level image, by a scope, the numerical value between 0 to 255 represents the gray-scale value of each pixel.Wherein 0 represent black, 255 representatives are white.
One sub-picture may be defined as a two-dimensional function f (x, y), and x and y are volume coordinates here, and amplitude f in any a pair of volume coordinate (x, y) is called intensity or the gray scale of this dot image.Work as x, when y and amplitude f are preferential discrete values, claim that this image is digital picture.
Suppose that the digital picture producing has the capable and N row of M, whole image is with regard to total M * N pixel, generally a M=N=2
n=64,128,256,512,1024,2048.So can be by complete M * N digital picture of compact matrix representation below:
By optical imagery module and the image capture module of AOI system, can obtain the apparent initial picture of bullet, but initial picture is due to the existence of various interference, can not well reflect required information, especially rely on machine analysis, the information that is difficult to allow operator obtain and wants, therefore, also needs initial picture to process.
Along with scientific and technical development, a lot of image processing methods miscellaneous in prior art, have been developed, but existing data shows, can not apply AOI system completely at present and be applicable to not only fast operation but also the good image processing algorithm of result that bullet visual defects detects.
Summary of the invention
In order to solve above-mentioned the problems of the prior art, the invention provides a kind of reasonable in design, image processing algorithm of fast operation but also the good bullet visual defects detection system based on AOI of result not only.
To achieve these goals, the technical solution used in the present invention is as follows:
An image processing algorithm for bullet visual defects detection system based on AOI, comprises the steps:
(1) by AOI system, obtain the apparent original image of bullet;
(2) adopt median filter method to process original image, remove noise level and smooth original image signal;
(3) adopt linear greyscale transformation to stretch to image;
(4) adopt maximum variance between clusters to Image Segmentation Using, obtain the image of binaryzation.
Further, the median filter method in described step (2) is specific as follows:
(2a) determine a neighborhood centered by certain pixel;
(2b) size of the gray-scale value of each pixel in this neighborhood relatively, and get its intermediate value as the new gray-scale value of choosing pixel;
(2c) this neighborhood is made as to window, and presses filtering mode moving window successively, entire image is processed.
Wherein, in described step (2a) neighborhood be shaped as square.
Basis while further, carrying out linear greyscale transformation in described step (3)
Further, in described step (4), the detailed process of maximum variance between clusters is as follows:
(4a) establishing N is number of pixels in entire image, and the gray-scale value scope of whole image is from 0 to L, and the number of pixels that gray level is i in whole image is n
itime, corresponding probability is p
i=n
i/ NL, i=0,1,2 ..., L-1 and
(4b) given threshold is T, image is divided into two parts according to threshold value T: C
0represent that gray-scale value is less than whole pixels of threshold value T, C
1represent that gray-scale value is greater than whole pixels of threshold value T, according to whole intensity profile probability, the average of whole pixel is
c
0and C
1average be
With
Wherein
(4c) by the above-mentioned u that derives to obtain
t=w
0μ
0+ w
1μ
1, inter-class variance is defined as
(4d) within the scope of the gray-scale value of [0, L-1], adjust the value of T, when
while obtaining maximal value, T is best threshold value.
Compared with prior art, the present invention has following beneficial effect:
The present invention is by original image that AOI system is obtained and use the processing such as algorithm that arithmetic speed is quick carries out that smoothing denoising, figure image intensifying, image are cut apart, make it to be converted into bianry image, its treatment effect is good, more highlighted the apparent defect of bullet, be more convenient for subsequent process to the extraction of bullet visual defects and identification, greatly accelerate the efficiency that image is processed, there is outstanding substantive distinguishing features and significant progressive.
Embodiment
Below in conjunction with embodiment, the invention will be further described, and embodiments of the present invention include but not limited to the following example.
Embodiment
The image processing algorithm that is somebody's turn to do the bullet visual defects detection system based on AOI, comprises the steps:
(1) optical imagery module and the image capture module by AOI system obtains the apparent original image of bullet; This process is comparatively ripe in AOI technology, in the present embodiment, repeats no more;
(2) adopt median filter method to process original image, remove noise level and smooth original image signal; Particularly, this median filter method is specific as follows:
(2a) determine a neighborhood centered by certain pixel;
(2b) size of the gray-scale value of each pixel in this neighborhood relatively, and get its intermediate value as the new gray-scale value of choosing pixel;
(2c) this neighborhood is made as to window, and presses filtering mode moving window successively, entire image is processed.
Wherein, in described step (2a) neighborhood be shaped as square, further, preferred 3 * 3 or 5 * 5 sizes of this square conventionally.For this point of bullet apparent image, line, the less image in angle, the filter effect of processing is desirable, and its algorithm is simple, and time complexity is low, is very suitable for the situation of quick computing.
(3) adopt linear greyscale transformation to stretch to image; Basis while particularly, carrying out linear greyscale transformation
Carry out image stretch, wherein f (s) is the function of gray-scale value s; s
1, s
2, L-1 is the value of function, mutually form interval, t
1and t
2the corresponding s of difference
1and s
2.
(4) adopt maximum variance between clusters to Image Segmentation Using, obtain the image of binaryzation; Particularly, the detailed process of this maximum variance between clusters is as follows:
(4a) establishing N is number of pixels in entire image, and the gray-scale value scope of whole image is from 0 to L, and the number of pixels that gray level is i in whole image is n
itime, corresponding probability is p
i=n
i/ NL, i=0,1,2 ..., L-1 and
(4b) given threshold is T, image is divided into two parts according to threshold value T: C
0represent that gray-scale value is less than whole pixels of threshold value T, C
1represent that gray-scale value is greater than whole pixels of threshold value T, according to whole intensity profile probability, the average of whole pixel is
c
0and C
1average be
With
Wherein
(4c) by the above-mentioned u that derives to obtain
t=w
0μ
0+ w
1μ
1, inter-class variance is defined as
(4d) within the scope of the gray-scale value of [0, L-1], adjust the value of T, when
while obtaining maximal value, T is best threshold value.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.
According to above-described embodiment, just can realize well the present invention.What deserves to be explained is; under prerequisite based on said structure design, for solving same technical matters, even if some that make in the present invention are without substantial change or polishing; the essence of the technical scheme adopting is still consistent with the present invention, also should be in protection scope of the present invention.
Claims (5)
1. an image processing algorithm for the bullet visual defects detection system based on AOI, is characterized in that, comprises the steps:
(1) by AOI system, obtain the apparent original image of bullet;
(2) adopt median filter method to process original image, remove noise level and smooth original image signal;
(3) adopt linear greyscale transformation to stretch to image;
(4) adopt maximum variance between clusters to Image Segmentation Using, obtain the image of binaryzation.
2. the image processing algorithm of a kind of bullet visual defects detection system based on AOI according to claim 1, is characterized in that, the median filter method in described step (2) is specific as follows:
(2a) determine a neighborhood centered by certain pixel;
(2b) size of the gray-scale value of each pixel in this neighborhood relatively, and get its intermediate value as the new gray-scale value of choosing pixel;
(2c) this neighborhood is made as to window, and presses filtering mode moving window successively, entire image is processed.
3. the image processing algorithm of a kind of bullet visual defects detection system based on AOI according to claim 2, is characterized in that, neighborhood is shaped as square in described step (2a).
4. the image processing algorithm of a kind of bullet visual defects detection system based on AOI according to claim 1, is characterized in that, basis while carrying out linear greyscale transformation in described step (3)
5. the image processing algorithm of a kind of bullet visual defects detection system based on AOI according to claim 1, is characterized in that, in described step (4), the detailed process of maximum variance between clusters is as follows:
(4a) establishing N is number of pixels in entire image, and the gray-scale value scope of whole image is from 0 to L, and the number of pixels that gray level is i in whole image is n
itime, corresponding probability is p
i=n
i/ NL, i=0,1,2 ..., L-1 and
(4b) given threshold is T, image is divided into two parts according to threshold value T: C
0represent that gray-scale value is less than whole pixels of threshold value T, C
1represent that gray-scale value is greater than whole pixels of threshold value T, according to whole intensity profile probability, the average of whole pixel is
c
0and C
1average be
With
Wherein
(4c) by the above-mentioned u that derives to obtain
t=w
0μ
0+ w
1μ
1, inter-class variance is defined as
(4d) within the scope of the gray-scale value of [0, L-1], adjust the value of T, when
while obtaining maximal value, T is best threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410324615.XA CN104102911A (en) | 2014-07-09 | 2014-07-09 | Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410324615.XA CN104102911A (en) | 2014-07-09 | 2014-07-09 | Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104102911A true CN104102911A (en) | 2014-10-15 |
Family
ID=51671051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410324615.XA Pending CN104102911A (en) | 2014-07-09 | 2014-07-09 | Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104102911A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105300998A (en) * | 2015-09-30 | 2016-02-03 | 陕西科技大学 | Paper defect detection method based on bit planes |
CN105551034A (en) * | 2015-12-10 | 2016-05-04 | 北京中科紫鑫科技有限责任公司 | Preprocessing method and device for image recognition of DNA sequence |
CN107240081A (en) * | 2017-06-20 | 2017-10-10 | 长光卫星技术有限公司 | The denoising of night scene image and enhancing processing method |
CN113808087A (en) * | 2021-09-02 | 2021-12-17 | 上汽通用五菱汽车股份有限公司 | Defect management and control method and device for surface of steel plate and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520895A (en) * | 2009-02-24 | 2009-09-02 | 上海大学 | Method for automatic switching of pixel displacement and actual displacement in scale image |
CN102636490A (en) * | 2012-04-12 | 2012-08-15 | 江南大学 | Method for detecting surface defects of dustproof cover of bearing based on machine vision |
-
2014
- 2014-07-09 CN CN201410324615.XA patent/CN104102911A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520895A (en) * | 2009-02-24 | 2009-09-02 | 上海大学 | Method for automatic switching of pixel displacement and actual displacement in scale image |
CN102636490A (en) * | 2012-04-12 | 2012-08-15 | 江南大学 | Method for detecting surface defects of dustproof cover of bearing based on machine vision |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105300998A (en) * | 2015-09-30 | 2016-02-03 | 陕西科技大学 | Paper defect detection method based on bit planes |
CN105551034A (en) * | 2015-12-10 | 2016-05-04 | 北京中科紫鑫科技有限责任公司 | Preprocessing method and device for image recognition of DNA sequence |
CN105551034B (en) * | 2015-12-10 | 2018-06-05 | 北京中科紫鑫科技有限责任公司 | The preprocess method and device of a kind of image identification of DNA sequencing |
CN107240081A (en) * | 2017-06-20 | 2017-10-10 | 长光卫星技术有限公司 | The denoising of night scene image and enhancing processing method |
CN113808087A (en) * | 2021-09-02 | 2021-12-17 | 上汽通用五菱汽车股份有限公司 | Defect management and control method and device for surface of steel plate and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109934802B (en) | A Cloth Defect Detection Method Based on Fourier Transform and Image Morphology | |
CN112614062B (en) | Colony counting method, colony counting device and computer storage medium | |
CN106446952B (en) | A kind of musical score image recognition methods and device | |
CN107808161B (en) | A method of underwater target recognition based on optical vision | |
TW201732651A (en) | Word segmentation method and apparatus | |
CN105069807A (en) | Punched workpiece defect detection method based on image processing | |
CN105354865A (en) | Automatic cloud detection method and system for multi-spectral remote sensing satellite image | |
CN110687122A (en) | Method and system for detecting surface cracks of ceramic tile | |
CN110335233B (en) | Highway guardrail plate defect detection system and method based on image processing technology | |
CN110070548B (en) | Deep learning training sample optimization method | |
CN108121946B (en) | Fingerprint image preprocessing method and device | |
CN105590301B (en) | The Impulsive Noise Mitigation Method of adaptive just oblique diesis window mean filter | |
CN106918602A (en) | A kind of detection method of surface flaw based on machine vision of robust | |
CN112288726A (en) | Method for detecting foreign matters on belt surface of underground belt conveyor | |
CN104102911A (en) | Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system | |
CN103914829B (en) | Method for detecting edge of noisy image | |
CN108345816A (en) | A kind of Quick Response Code extracting method and system in the case where uneven illumination is even | |
CN106447686A (en) | Method for detecting image edges based on fast finite shearlet transformation | |
Shi et al. | Image enhancement for degraded binary document images | |
CN110473222A (en) | Image-element extracting method and device | |
CN113516627A (en) | Device and method for detecting foreign matter in wine bottle | |
CN105354823A (en) | Tree-ring image edge extraction and segmentation system | |
CN104112134A (en) | Image binary segmentation method of bullet apparent defect detection system based on AOI | |
CN108171705A (en) | The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars | |
CN117808746A (en) | Fruit quality grading method based on image processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20141015 |