[go: up one dir, main page]

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 PDF

Info

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
Application number
CN201410324615.XA
Other languages
Chinese (zh)
Inventor
杨雷
尹志强
赵泽东
陈仕隆
吕坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NINGBO MOSHI OPTOELECTRONICS TECHNOLOGY Co Ltd
Original Assignee
NINGBO MOSHI OPTOELECTRONICS TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by NINGBO MOSHI OPTOELECTRONICS TECHNOLOGY Co Ltd filed Critical NINGBO MOSHI OPTOELECTRONICS TECHNOLOGY Co Ltd
Priority to CN201410324615.XA priority Critical patent/CN104102911A/en
Publication of CN104102911A publication Critical patent/CN104102911A/en
Pending legal-status Critical Current

Links

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

A kind of image processing algorithm of the bullet visual defects detection system based on AOI
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:
f ( x , y ) = f ( 0,0 ) f ( 0,1 ) · · · f ( 0 , N - 1 ) f ( 1,0 ) f ( 1,1 ) · · · · · · f ( M - 1,0 ) f ( M - 1,1 ) · · · f ( M - 1 , N - 1 ) Wherein each element is exactly the pixel of this digital picture, so just can carry out the processing of various needs by f (x, y) logm word image.
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)
f ( s ) = t 1 s 1 s 0 &le; s &le; s 1 t 2 - t 1 s 2 - s 1 [ s - s 1 ] + t 1 s 1 < s &le; s 2 L - 1 - t 2 L - 1 - s 2 [ s - s 2 ] + t 2 s 2 < s &le; L - 1 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.
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 &mu; 0 = &Sigma; i = 0 T ip i / w 0 With &mu; 1 = &Sigma; i = T + 1 L - 1 ip i / w 1 , Wherein w 0 = &Sigma; i = 0 T p i , w 1 = &Sigma; i = T + 1 L - 1 p i = 1 - w 0 ;
(4c) by the above-mentioned u that derives to obtain t=w 0μ 0+ w 1μ 1, inter-class variance is defined as
&sigma; B 2 = w 0 ( &mu; 0 - &mu; T ) 2 + w 1 ( &mu; 1 - &mu; T ) 2 = w 0 ( &mu; 0 2 + &mu; T 2 ) + &mu; T 2 ( w 0 + w 1 ) - 2 ( w 0 &mu; 0 + w 1 &mu; 1 ) &mu; T = w 0 &mu; 0 2 + w 1 &mu; 1 2 - &mu; T 2 = w 0 &mu; 0 2 + w 1 &mu; 1 2 - ( w 0 &mu; 0 + w 1 &mu; ) 2 = w 0 &mu; 0 2 ( 1 - w 0 ) + w 1 &mu; 1 2 ( 1 - w 1 ) - 2 w 0 w 1 &mu; 0 &mu; 1 = w 0 w 1 ( &mu; 0 - &mu; 1 ) 2 ;
(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 f ( s ) = t 1 s 1 s 0 &le; s &le; s 1 t 2 - t 1 s 2 - s 1 [ s - s 1 ] + t 1 s 1 < s &le; s 2 L - 1 - t 2 L - 1 - s 2 [ s - s 2 ] + t 2 s 2 < s &le; L - 1 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 &mu; 0 = &Sigma; i = 0 T ip i / w 0 With &mu; 1 = &Sigma; i = T + 1 L - 1 ip i / w 1 , Wherein w 0 = &Sigma; i = 0 T p i , w 1 = &Sigma; i = T + 1 L - 1 p i = 1 - w 0 ;
(4c) by the above-mentioned u that derives to obtain t=w 0μ 0+ w 1μ 1, inter-class variance is defined as
&sigma; B 2 = w 0 ( &mu; 0 - &mu; T ) 2 + w 1 ( &mu; 1 - &mu; T ) 2 = w 0 ( &mu; 0 2 + &mu; T 2 ) + &mu; T 2 ( w 0 + w 1 ) - 2 ( w 0 &mu; 0 + w 1 &mu; 1 ) &mu; T = w 0 &mu; 0 2 + w 1 &mu; 1 2 - &mu; T 2 = w 0 &mu; 0 2 + w 1 &mu; 1 2 - ( w 0 &mu; 0 + w 1 &mu; ) 2 = w 0 &mu; 0 2 ( 1 - w 0 ) + w 1 &mu; 1 2 ( 1 - w 1 ) - 2 w 0 w 1 &mu; 0 &mu; 1 = w 0 w 1 ( &mu; 0 - &mu; 1 ) 2 ;
(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)
f ( s ) = t 1 s 1 s 0 &le; s &le; s 1 t 2 - t 1 s 2 - s 1 [ s - s 1 ] + t 1 s 1 < s &le; s 2 L - 1 - t 2 L - 1 - s 2 [ s - s 2 ] + t 2 s 2 < s &le; L - 1 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.
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 &mu; 0 = &Sigma; i = 0 T ip i / w 0 With &mu; 1 = &Sigma; i = T + 1 L - 1 ip i / w 1 , Wherein w 0 = &Sigma; i = 0 T p i , w 1 = &Sigma; i = T + 1 L - 1 p i = 1 - w 0 ;
(4c) by the above-mentioned u that derives to obtain t=w 0μ 0+ w 1μ 1, inter-class variance is defined as
&sigma; B 2 = w 0 ( &mu; 0 - &mu; T ) 2 + w 1 ( &mu; 1 - &mu; T ) 2 = w 0 ( &mu; 0 2 + &mu; T 2 ) + &mu; T 2 ( w 0 + w 1 ) - 2 ( w 0 &mu; 0 + w 1 &mu; 1 ) &mu; T = w 0 &mu; 0 2 + w 1 &mu; 1 2 - &mu; T 2 = w 0 &mu; 0 2 + w 1 &mu; 1 2 - ( w 0 &mu; 0 + w 1 &mu; ) 2 = w 0 &mu; 0 2 ( 1 - w 0 ) + w 1 &mu; 1 2 ( 1 - w 1 ) - 2 w 0 w 1 &mu; 0 &mu; 1 = w 0 w 1 ( &mu; 0 - &mu; 1 ) 2 ;
(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.
CN201410324615.XA 2014-07-09 2014-07-09 Image processing for AOI (automated optical inspection)-based bullet appearance defect detection system Pending CN104102911A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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