CN104122271A - Automated optical inspection (AOI)-based bullet apparent defect detection method - Google Patents

Automated optical inspection (AOI)-based bullet apparent defect detection method Download PDF

Info

Publication number
CN104122271A
CN104122271A CN201410324207.4A CN201410324207A CN104122271A CN 104122271 A CN104122271 A CN 104122271A CN 201410324207 A CN201410324207 A CN 201410324207A CN 104122271 A CN104122271 A CN 104122271A
Authority
CN
China
Prior art keywords
value
point
mark value
mark
image
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
CN201410324207.4A
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 CN201410324207.4A priority Critical patent/CN104122271A/en
Publication of CN104122271A publication Critical patent/CN104122271A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses an automated optical inspection (AOI)-based bullet apparent defect detection method including (1) using a CCD (charge coupled device) linear array camera to shoot the bullet surface to obtain a bullet surface initial gray level image; (2) sequentially denoising, enhancing and segmenting the initial gray level image for pretreatment to obtain a binaryzation image; (3) performing connected domain labeling processing on the binaryzation image to obtain a pixel dot set of all defects on the bullet surface; (4) respectively extracting the characteristics of each defective area; and (5) comparing the extracted characteristic values with preset defect standard features to determine the type of each defect. The method is based on the automatic optical inspection, designs a whole set of bullet apparent defect detection programs, and through the precision comprehensive image acquisition, fast image processing algorithm and convenient and accurate feature extraction and recognition, complete bullet apparent defect detection can be efficiently and accurately implemented.

Description

A kind of bullet visual defects detection method based on AOI
Technical field
The present invention relates to examination and test of products field, particularly relate to a kind of bullet visual defects detection method based on AOI.
Background technology
Bullet, as the most basic weapon in modern times, is one of most important article in war, and its consumption is very huge.So link and its quality of guarantee for safety in production bullet are one of major criterions weighing a national military project cause level.But in bullet production run for various reasons, all inevitably cause a series of situations of a lot of damages, cut, greasy dirt etc., so how to ensure that the yields that bullet is produced is to ensureing that soldier is in an important step of battlefield safety.Due to above reason, there is extremely important meaning for the detection of bullet visual defects.
At present, the domestic detection mode for bullet visual defects, is all the method that uses manual detection substantially.Clearly, due to some reasons of people self, not only work efficiency is low to differentiate the apparent defect of bullet by naked eyes, and working strength is very large.Along with the growth of time, the generation of people's fatigue, causes artificial testing result very unstable, has improved greatly false drop rate.For the product of this high-risk of bullet, high false drop rate means the threat to using soldier's life.Along with scientific and technological development with for the requirement of production run, by a kind of robotization, at a high speed, the detection bullet visual defects that detects of high precision has very important practical significance.
According to the properties feature of bullet, can consider to use the mode of Non-Destructive Testing.So-called Non-Destructive Testing, does not just refer to directly contact, but adopts some other means, and as shape, character characteristic etc., more do not destroy on the basis of object in contact neither, reach the object of test and check object.Current, the Dynamic Non-Destruction Measurement of often using aborning has infiltration, X ray, micro-magnetic detection, ultrasonic inspection, infrared thermal imaging etc., and some of them come into operation and obtained good economic benefit in many industries.But detect for bullet visual defects, these methods all more or less have that automaticity is low, the problem such as complicated operation, cost cost are excessive, cause these technology on bullet identification, to use smoothly.
The AOI technology of rising is in recent years a kind of novel test technology, and rapidly, these have brought new opportunity all to bullet defects detection in its development.AOI (Automatic Optic Inspection), being called again automated optical detects, using exercise machine vision as basic technology, use the shortcoming that detects of optical instrument with manpower traditionally as improvement, improve optical image detection system precision and speed and a special kind of skill of being born.Its ultimate principle utilize exactly machine imitate people obtain, recognition image.
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.
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, can automatically detect and reduce manual detection intensity, improve detection efficiency and the safe and reliable bullet visual defects detection method based on AOI.
To achieve these goals, the technical solution used in the present invention is as follows:
A bullet visual defects detection method based on AOI, comprises the steps:
(1) adopt CCD line-scan digital camera to take bullet surface, obtain the initial gray level image on bullet surface;
(2) pre-service of initial gray level image being carried out denoising successively, strengthening, cut apart, the image of acquisition binaryzation;
(3) binary image is carried out to connected component labeling processing, obtain the pixel set of all defect on bullet surface;
(4) each defect area is carried out respectively to feature extraction;
(5), by the each eigenwert extracting and default defect standard Characteristic Contrast, determine the type of each defect.
Wherein, when bullet surface shooting in described step (1), bullet at the uniform velocity rotates along its axis, and at least CCD line-scan digital camera is revolved and turned around.
Further, when bullet surface shooting in described step (1), adopt two bar-shaped LED light sources to carry out illumination process to bullet, wherein two bar-shaped LED light sources arrange in CCD line-scan digital camera symmetria bilateralis, and bar shaped direction is along bullet axis direction.
Specifically, in described step (2), the pretreated concrete grammar of image is as follows:
(2a) in image, determine a neighborhood centered by certain pixel, the size of the gray-scale value of each pixel in this neighborhood relatively again, and get its intermediate value as the new gray-scale value of choosing pixel, then this neighborhood scope is made as to window, and move successively this window, entire image is carried out to denoising;
(2b) adopt linear greyscale transformation to strengthen processing to image;
(2c) at image f (x, the gray-scale value T that will ask for a point by differentiation y) is as threshold values, and by the gray-scale value of all pixels and threshold values T comparison, the gray-scale value of the pixel that is more than or equal to threshold values T is made as to 1 again, the gray-scale value of the pixel that is less than threshold values T is made as to 0 again, obtains the image after binaryzation
Further, in described step (2c), the concrete grammar of definite gray-scale value T is as follows:
(2c1) establishing N is the total number of pixel in entire image, and the gray-scale value scope of whole image is from 0 to L, and in the time that the number of pixels that in whole image, gray level is i is ni, corresponding probability is p i=n i/ NL, i=0,1,2 ..., L-1 and
(2c2) 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 overall intensity profile probability, the average of whole pixel is c 0and C 1average be μ 0 = Σ i = 0 T i p i / w 0 With μ 1 = Σ i = T + 1 L - 1 i p i / w 1 , Wherein w 0 = Σ i = 0 T p i , w 1 = Σ i = T + 1 L - 1 p i = 1 - w 0 ;
(2c3) by the above-mentioned u that derives to obtain t=w 0μ 0+ w 1μ 1, variance σ B 2 = w 0 ( μ 0 - μ T ) 2 + w 1 ( μ 1 - μ T ) 2 = w 0 ( μ 0 2 + μ T 2 ) + μ T 2 ( w 0 + w 1 ) - 2 ( w 0 μ 0 + w 1 μ 1 ) μ T = w 0 μ 0 2 + w 1 μ 1 2 - μ T 2 = w 0 μ 0 2 + w 1 μ 1 2 - ( w 0 μ 0 + w 1 μ ) 2 = w 0 μ 0 2 ( 1 - w 0 ) + w 1 μ 1 2 ( 1 - w 1 ) - 2 w 0 w 1 μ 0 μ 1 = w 0 w 1 ( μ 0 - μ 1 ) 2 ;
(2c4) value of adjustment T within the scope of the gray-scale value of [0, L-1], works as variance while obtaining maximal value, T is best threshold value.
Specifically, in described step (3), binary image is carried out to the concrete grammar of connected component labeling processing as follows:
(3a) pretreated binary image is scanned by order from left to right, from top to bottom, and make preliminary mark, set up his-and-hers watches of equal value, wherein, of equal value to referring to that two disconnected regions formerly thinking by scanning sequency are found to be the label matching relationship in the region of connection in follow up scan, two marks that are about to two disconnected zone markers are formerly recorded in his-and-hers watches of equal value, to illustrate that these two regions are same connected regions;
(3b) image after above-mentioned mark is carried out to rescan, the equivalence satisfying condition, to replacing accordingly, is merged to connected domain of equal value, eliminate connected component labeling conflict, obtain connected component labeling image.
Further, in described step (3a), do first step mark and set up the concrete grammar of his-and-hers watches of equal value as follows:
(3a1) press the pixel gray-scale value in predefined procedure scanning binary image, if the gray-scale value of current pixel point is 0, establishing this point is background dot, be left intact, if current some gray-scale value is 255, its initial markers value is made as to 0, carry out next step;
(3a2) according to the Yu Qi upper right, position of this current point, just go up, upper left, left front each point judge, and carry out respective markers;
If (3a3) this current point is the point of image in the upper left corner, mark value adds 1, and mark value using this mark value as current point;
(3a4) current point is positioned at the first row and not in the time of first row, its point left front with it compares, if left front point is marked, the mark value of current point is got the mark value of left front point, if left front point does not have marked, mark value adds 1, then the mark value using this mark value as current point;
(3a5) current point is positioned at first row and not in the time of the first row, itself and its upper right and the pixel just gone up are compared, if it is marked that the mark value of these two points does not all have, mark value adds 1, then the mark value using this mark value as current point, if wherein only have a point marked, the mark value of current point is got the mark value of marked point, if two points are all marked, current point is got the mark value of just upper point, if two points when all marked and mark value is different, are recorded to its just upper point in his-and-hers watches of equal value;
(3a6) current point is positioned at last row and not in the first row, just go up itself and its, upper left, three left front pixels compare, if these three points all do not have marked, mark value adds 1, then the mark value using this mark value as current point, if wherein only have a point marked, the mark value of current point is got to the mark value of this point, if point is marked and mark value is identical two or three, directly the mark value of current point is got with these and put identical value, if point is marked and mark value is different two or three, according to left front, upper left, the sequencing of just going up, to there is at first the mark value of point of mark value as the mark value of current grade, if there are two or when three points are marked and mark value is different, to there is at first the point of mark value to be recorded in his-and-hers watches of equal value by its order,
(3a7) current point is not or not the time of above-mentioned (3a3)~(3a6) described position, by itself and its upper right, just go up, upper left, four left front pixels compare, if four points all do not have marked, mark value adds 1, then the mark value using this mark value as current point, if there is point marked or have multiple point and mark value that are labeled identical, the mark value using this mark value as current point, if have, two or more point is marked and mark value is unequal, according to left front, upper left, just go up, the sequencing of upper right, the mark value of point that has at first mark value is made as to the mark value of current point, if have, two or more point is marked and mark value is unequal, to there is at first the point of mark value to be recorded in his-and-hers watches of equal value by its order.
Specifically the feature of, in described step (4), each defect area being extracted at least comprises area, center of gravity, external matrix, major axis, inclination angle, length breadth ratio and gray-scale value.
Further, calculating general formula corresponding to each described feature distinguished as follows:
The defect area inner area that is i at connected component labeling wherein (x, y) represents the coordinate of pixel, R ifor being marked as the set of all pixels of i;
The center of gravity of defect area in, horizontal ordinate average is ordinate average is y ‾ i = 1 S i Σ ( x , y ) ∈ R i y ;
Upper left corner coordinate (the x of the external matrix of defect area a, y a) be x ai = min ( x i ) y ai = min ( y i ) , ( xi , yi ) ∈ R i , The long L of this external world's matrix awith wide W afor L a = max ( y i ) - min ( y i ) W a = max ( x i ) - min ( x i ) , ( x i , y i ) ∈ R i ;
The major axis value of defect area wherein (x 1, y 1) and (x 2, y 2) be a center of gravity excessively straight line two points crossing with defect area edge;
The inclination angle of defect area is long axis direction and the axial angle of x wherein (x c, y c) be the intersection point of major axis and x axle;
The length breadth ratio of defect area the length that wherein A is major axis, the length that B is minor axis, so-called minor axis refers to perpendicular to defect major axis and crosses the straight line of center of gravity and the length of the crossing point-to-point transmission in defect area edge;
Maximum gradation value and minimum gradation value u max i = max ( f ( x i , y i ) ) u min i = min ( f ( x i , y i ) ) , ( x i , y i ) ∈ R i , Average gray value μ ‾ i = Σ ( x i , y i ) ∈ R i f ( x i , y i ) , The standard deviation of gray scale σ i 2 = Σ ( x i , y i ) ∈ R i ( f ( x i , y i ) - μ ‾ i ) 2 .
Compared with prior art, the present invention has following beneficial effect:
(1) the present invention detects as basis using automated optical, design the scheme that a whole set of bullet visual defects detects, by precisely comprehensively Image Acquisition, image processing algorithm, convenient feature extraction accurately and identification efficiently, realize efficiently and accurately the complete detection to bullet visual defects, there is outstanding substantive distinguishing features and significant progressive, and the present invention is reasonable in design, safe and reliable, be with a wide range of applications, be applicable to applying.
(2) the present invention is by the analysis to bullet shape, select targetedly strip source, ensure the homogeneity to bullet polishing, the mode that simultaneously adopts two strip sources to arrange in camera symmetria bilateralis, the image that camera is gathered is complete, effectively avoid shade, improved the picture quality of obtaining.
(3) the present invention designs the processing procedure to bullet surface image targetedly, is ensureing, under the condition of quality of image processing, greatly to have shortened the processing time, and then has effectively improved the efficiency that bullet visual defects detects.
(4) the present invention adopts more efficient defect image extraction algorithm, can complete fast the reduction of bullet visual defects be transformed and be the image that can identify, and all kinds of bullet visual defects are designed targetedly, and by its formulism, make machine carry out feature extraction to defect area by defect recognition image, the kind of determining defect by all types of feature speciality contrasts that have, has quite high robotization.
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
Be somebody's turn to do the bullet visual defects detection method based on AOI, concrete steps are as follows:
(1) adopt CCD line-scan digital camera to take bullet surface, bullet is at the uniform velocity rotated along its axis, and at least CCD line-scan digital camera is revolved and turned around, thus the initial gray level image on acquisition bullet surface; Wherein, in the symmetric position of CCD line-scan digital camera both sides, a bar-shaped LED light source being respectively set throws light on to bullet surface, camera obtains image along bullet axis, the arranged direction of bar-shaped LED light source is also mated with bullet axis direction, thereby make the one side of bullet straight-on camera by adequate illumination, identification impacts to successive image to avoid producing shade.As preferably, CCD line-scan digital camera adopts 7400 pixel line array cameras.
(2) due to various factors, on the initial pictures on bullet surface, inevitably there will be some interference, in order to improve the quality of image, the pre-service that need to carry out denoising successively, strengthen, cut apart initial gray level image, the image of acquisition binaryzation; Its concrete processing procedure is as follows:
(2a) in image, determine a neighborhood centered by certain pixel, the size of the gray-scale value of each pixel in this neighborhood relatively again, and get its intermediate value as the new gray-scale value of choosing pixel, then this neighborhood scope is made as to window, and move successively this window, entire image is carried out to denoising;
(2b) adopt linear greyscale transformation to strengthen processing to image;
(2c) at image f (x, the gray-scale value T that will ask for a point by differentiation y) is as threshold values, and by the gray-scale value of all pixels and threshold values T comparison, the gray-scale value of the pixel that is more than or equal to threshold values T is made as to 1 again, the gray-scale value of the pixel that is less than threshold values T is made as to 0 again, obtains the image after binaryzation this process fast operation, treatment effect is good, especially has outstanding handling property for this point in bullet surface, line, the less image in angle.
Further, in above-mentioned steps (2c), determine by the following method gray-scale value T:
(2c1) establishing N is the total number of pixel in entire image, and the gray-scale value scope of whole image is from 0 to L, and in the time that the number of pixels that in whole image, gray level is i is ni, corresponding probability is p i=n i/ NL, i=0,1,2 ..., L-1 and
(2c2) 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 overall intensity profile probability, the average of whole pixel is c 0and C 1average be μ 0 = Σ i = 0 T i p i / w 0 With μ 1 = Σ i = T + 1 L - 1 i p i / w 1 , Wherein w 0 = Σ i = 0 T p i , w 1 = Σ i = T + 1 L - 1 p i = 1 - w 0 ;
(2c3) by the above-mentioned u that derives to obtain t=w 0μ 0+ w 1μ 1, variance σ B 2 = w 0 ( μ 0 - μ T ) 2 + w 1 ( μ 1 - μ T ) 2 = w 0 ( μ 0 2 + μ T 2 ) + μ T 2 ( w 0 + w 1 ) - 2 ( w 0 μ 0 + w 1 μ 1 ) μ T = w 0 μ 0 2 + w 1 μ 1 2 - μ T 2 = w 0 μ 0 2 + w 1 μ 1 2 - ( w 0 μ 0 + w 1 μ ) 2 = w 0 μ 0 2 ( 1 - w 0 ) + w 1 μ 1 2 ( 1 - w 1 ) - 2 w 0 w 1 μ 0 μ 1 = w 0 w 1 ( μ 0 - μ 1 ) 2 ;
(2c4) value of adjustment T within the scope of the gray-scale value of [0, L-1], works as variance while obtaining maximal value, T is best threshold value.
(3) for the ease of follow-up feature extraction, also need binary image to carry out connected component labeling processing, obtain the pixel set of all defect on bullet surface; Particularly:
(3a) pretreated binary image is scanned by order from left to right, from top to bottom, and make preliminary mark, set up his-and-hers watches of equal value, wherein, of equal value to referring to that two disconnected regions formerly thinking by scanning sequency are found to be the label matching relationship in the region of connection in follow up scan, two marks that are about to two disconnected zone markers are formerly recorded in his-and-hers watches of equal value, to illustrate that these two regions are same connected regions;
(3b) image after above-mentioned mark is carried out to rescan, the equivalence satisfying condition, to replacing accordingly, is merged to connected domain of equal value, eliminate connected component labeling conflict, obtain connected component labeling image.
Wherein, in described step (3a), do first step mark and set up the concrete grammar of his-and-hers watches of equal value as follows:
(3a1) press the pixel gray-scale value in predefined procedure scanning binary image, if the gray-scale value of current pixel point is 0, establishing this point is background dot, be left intact, if current some gray-scale value is 255, its initial markers value is made as to 0, carry out next step;
(3a2) according to the Yu Qi upper right, position of this current point, just go up, upper left, left front each point judge, and carry out respective markers;
If (3a3) this current point is the point of image in the upper left corner, mark value adds 1, and mark value using this mark value as current point;
(3a4) current point is positioned at the first row and not in the time of first row, its point left front with it compares, if left front point is marked, the mark value of current point is got the mark value of left front point, if left front point does not have marked, mark value adds 1, then the mark value using this mark value as current point;
(3a5) current point is positioned at first row and not in the time of the first row, itself and its upper right and the pixel just gone up are compared, if it is marked that the mark value of these two points does not all have, mark value adds 1, then the mark value using this mark value as current point, if wherein only have a point marked, the mark value of current point is got the mark value of marked point, if two points are all marked, current point is got the mark value of just upper point, if two points when all marked and mark value is different, are recorded to its just upper point in his-and-hers watches of equal value;
(3a6) current point is positioned at last row and not in the first row, just go up itself and its, upper left, three left front pixels compare, if these three points all do not have marked, mark value adds 1, then the mark value using this mark value as current point, if wherein only have a point marked, the mark value of current point is got to the mark value of this point, if point is marked and mark value is identical two or three, directly the mark value of current point is got with these and put identical value, if point is marked and mark value is different two or three, according to left front, upper left, the sequencing of just going up, to there is at first the mark value of point of mark value as the mark value of current grade, if there are two or when three points are marked and mark value is different, to there is at first the point of mark value to be recorded in his-and-hers watches of equal value by its order,
(3a7) current point is not or not the time of above-mentioned (3a3)~(3a6) described position, by itself and its upper right, just go up, upper left, four left front pixels compare, if four points all do not have marked, mark value adds 1, then the mark value using this mark value as current point, if there is point marked or have multiple point and mark value that are labeled identical, the mark value using this mark value as current point, if have, two or more point is marked and mark value is unequal, according to left front, upper left, just go up, the sequencing of upper right, the mark value of point that has at first mark value is made as to the mark value of current point, if have, two or more point is marked and mark value is unequal, to there is at first the point of mark value to be recorded in his-and-hers watches of equal value by its order.
(4) each defect area is carried out respectively to feature extraction; Specifically the feature of, each defect area being extracted at least comprises area, center of gravity, external matrix, major axis, inclination angle, length breadth ratio and gray-scale value.
Further, calculating general formula corresponding to each described feature distinguished as follows:
The defect area inner area that is i at connected component labeling wherein (x, y) represents the coordinate of pixel, R ifor being marked as the set of all pixels of i;
The center of gravity of defect area in, horizontal ordinate average is ordinate average is y ‾ i = 1 S i Σ ( x , y ) ∈ R i y ;
Upper left corner coordinate (the x of the external matrix of defect area a, y a) be x ai = min ( x i ) y ai = min ( y i ) , ( xi , yi ) ∈ R i , The long L of this external world's matrix awith wide W afor L a = max ( y i ) - min ( y i ) W a = max ( x i ) - min ( x i ) , ( x i , y i ) ∈ R i ;
The major axis value of defect area wherein (x 1, y 1) and (x 2, y 2) be a center of gravity excessively straight line two points crossing with defect area edge;
The inclination angle of defect area is long axis direction and the axial angle of x wherein (x c, y c) be the intersection point of major axis and x axle;
The length breadth ratio of defect area the length that wherein A is major axis, the length that B is minor axis, so-called minor axis refers to perpendicular to defect major axis and crosses the straight line of center of gravity and the length of the crossing point-to-point transmission in defect area edge;
Maximum gradation value and minimum gradation value u max i = max ( f ( x i , y i ) ) u min i = min ( f ( x i , y i ) ) , ( x i , y i ) ∈ R i , Average gray value μ ‾ i = Σ ( x i , y i ) ∈ R i f ( x i , y i ) , The standard deviation of gray scale σ i 2 = Σ ( x i , y i ) ∈ R i ( f ( x i , y i ) - μ ‾ i ) 2 .
(5), by the each eigenwert extracting and default defect standard Characteristic Contrast, determine the type of each defect.
In this process, by the analysis to bullet visual defects, design the characteristics of image that each defect type is corresponding, draw every kind of standard threshold values that defect is corresponding with this, specific as follows:
(I) diatom: length breadth ratio is greater than 30:1, boundary rectangle length breadth ratio is not less than 30:1, and angle of inclination is between-5 ° and 5 °, and average gray is between 100 to 180;
(II) oral area card wound: length breadth ratio is between 1 to 5, and minimum gradation value is less than 10, centered by center of gravity, radius is less than in 300 border circular areas and has at least one region, and the length breadth ratio in this region is between 0.2 to 5, and maximum gradation value is greater than 150;
(III) cut: length breadth ratio is between 5 to 20, and average gray value is less than 40 or be greater than 100;
(IV) perforation: length breadth ratio is between 1 to 2, and area is greater than 400, and lowest gray value is 0, and the number of pixels that gray-scale value is 0 is greater than 10;
(V) slight crack: length breadth ratio is between 5 to 30, lowest gray value is 0, and the number of pixels that gray-scale value is 0 is greater than 10, centered by center of gravity, radius is less than in 300 border circular areas and has at least one region, and the length breadth ratio in this region is between 5 to 30, maximum gradation value equals 255, and the pixel number that the highest gray-scale value is 255 is greater than 10;
(VI) corrosion: length breadth ratio is between 0.2 to 5, and average gray value is between 30 to 55;
(VII) paint is coated with wrong: area is greater than 10000, and average gray value is greater than 50, or minimum gradation value is less than 5 area and is greater than 1000, and color is darker;
(VIII) reveal steel: area is greater than 10000, and average gray value is less than 100, or minimum gradation value is less than 20 area and is greater than 1000;
(IX) bright spot: area is less than 200, average gray value is greater than 200.
By the contrast of each defect area feature, can determine the type of this defect again.
After tested, the false drop rate of the method is in 3%, and loss is 0, without undetected, and the danger that can effectively avoid bullet defect to bring, on average, in 0.7 second/, can guarantee the testing requirement of 60 of per minutes detection time, test result statistics is as shown in table 1:
Table 1
By the present invention, can greatly reduce the manpower labour cost in bullet identification flow process, effectively improve especially Detection accuracy and detection efficiency, for huge contribution has been made in the development that bullet visual defects detects.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments 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 (9)

1. the bullet visual defects detection method based on AOI, is characterized in that, comprises the steps:
(1) adopt CCD line-scan digital camera to take bullet surface, obtain the initial gray level image on bullet surface;
(2) pre-service of initial gray level image being carried out denoising successively, strengthening, cut apart, the image of acquisition binaryzation;
(3) binary image is carried out to connected component labeling processing, obtain the pixel set of all defect on bullet surface;
(4) each defect area is carried out respectively to feature extraction;
(5), by the each eigenwert extracting and default defect standard Characteristic Contrast, determine the type of each defect.
2. a kind of bullet visual defects detection method based on AOI according to claim 1, is characterized in that, when bullet surface shooting in described step (1), bullet at the uniform velocity rotates along its axis, and at least CCD line-scan digital camera is revolved and turned around.
3. a kind of bullet visual defects detection method based on AOI according to claim 2, it is characterized in that, when bullet surface shooting in described step (1), adopt two bar-shaped LED light sources to carry out illumination process to bullet, wherein two bar-shaped LED light sources arrange in CCD line-scan digital camera symmetria bilateralis, and bar shaped direction is along bullet axis direction.
4. a kind of bullet visual defects detection method based on AOI according to claim 1, is characterized in that, in described step (2), the pretreated concrete grammar of image is as follows:
(2a) in image, determine a neighborhood centered by certain pixel, the size of the gray-scale value of each pixel in this neighborhood relatively again, and get its intermediate value as the new gray-scale value of choosing pixel, then this neighborhood scope is made as to window, and move successively this window, entire image is carried out to denoising;
(2b) adopt linear greyscale transformation to strengthen processing to image;
(2c) at image f (x, the gray-scale value T that will ask for a point by differentiation y) is as threshold values, and by the gray-scale value of all pixels and threshold values T comparison, the gray-scale value of the pixel that is more than or equal to threshold values T is made as to 1 again, the gray-scale value of the pixel that is less than threshold values T is made as to 0 again, obtains the image after binaryzation
5. a kind of bullet visual defects detection method based on AOI according to claim 4, is characterized in that, determines that the concrete grammar of gray-scale value T is as follows in described step (2c):
(2c1) establishing N is the total number of pixel in entire image, and the gray-scale value scope of whole image is from 0 to L, when the number of pixels that in whole image, gray level is i is n itime, corresponding probability is p i=n i/ NL, i=0,1,2 ..., L-1 and
(2c2) 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 overall intensity profile probability, the average of whole pixel is c 0and C 1average be μ 0 = Σ i = 0 T i p i / w 0 With μ 1 = Σ i = T + 1 L - 1 i p i / w 1 , Wherein w 0 = Σ i = 0 T p i , w 1 = Σ i = T + 1 L - 1 p i = 1 - w 0 ;
(2c3) by the above-mentioned u that derives to obtain t=w 0μ 0+ w 1μ 1, variance σ B 2 = w 0 ( μ 0 - μ T ) 2 + w 1 ( μ 1 - μ T ) 2 = w 0 ( μ 0 2 + μ T 2 ) + μ T 2 ( w 0 + w 1 ) - 2 ( w 0 μ 0 + w 1 μ 1 ) μ T = w 0 μ 0 2 + w 1 μ 1 2 - μ T 2 = w 0 μ 0 2 + w 1 μ 1 2 - ( w 0 μ 0 + w 1 μ ) 2 = w 0 μ 0 2 ( 1 - w 0 ) + w 1 μ 1 2 ( 1 - w 1 ) - 2 w 0 w 1 μ 0 μ 1 = w 0 w 1 ( μ 0 - μ 1 ) 2 ;
(2c4) value of adjustment T within the scope of the gray-scale value of [0, L-1], works as variance while obtaining maximal value, T is best threshold value.
6. a kind of bullet visual defects detection method based on AOI according to claim 1, is characterized in that, in described step (3), binary image is carried out to the concrete grammar of connected component labeling processing as follows:
(3a) pretreated binary image is scanned by order from left to right, from top to bottom, and make preliminary mark, set up his-and-hers watches of equal value;
(3b) image after above-mentioned mark is carried out to rescan, the equivalence satisfying condition, to replacing accordingly, is merged to connected domain of equal value, eliminate connected component labeling conflict, obtain connected component labeling image.
7. a kind of bullet visual defects detection method based on AOI according to claim 6, is characterized in that, does first step mark as follows with the concrete grammar of setting up his-and-hers watches of equal value in described step (3a):
(3a1) press the pixel gray-scale value in predefined procedure scanning binary image, if the gray-scale value of current pixel point is 0, establishing this point is background dot, be left intact, if current some gray-scale value is 255, its initial markers value is made as to 0, carry out next step;
(3a2) according to the Yu Qi upper right, position of this current point, just go up, upper left, left front each point judge, and carry out respective markers;
If (3a3) this current point is the point of image in the upper left corner, mark value adds 1, and mark value using this mark value as current point;
(3a4) current point is positioned at the first row and not in the time of first row, its point left front with it compares, if left front point is marked, the mark value of current point is got the mark value of left front point, if left front point does not have marked, mark value adds 1, then the mark value using this mark value as current point;
(3a5) current point is positioned at first row and not in the time of the first row, itself and its upper right and the pixel just gone up are compared, if it is marked that the mark value of these two points does not all have, mark value adds 1, then the mark value using this mark value as current point, if wherein only have a point marked, the mark value of current point is got the mark value of marked point, if two points are all marked, current point is got the mark value of just upper point, if two points when all marked and mark value is different, are recorded to its just upper point in his-and-hers watches of equal value;
(3a6) current point is positioned at last row and not in the first row, just go up itself and its, upper left, three left front pixels compare, if these three points all do not have marked, mark value adds 1, then the mark value using this mark value as current point, if wherein only have a point marked, the mark value of current point is got to the mark value of this point, if point is marked and mark value is identical two or three, directly the mark value of current point is got with these and put identical value, if point is marked and mark value is different two or three, according to left front, upper left, the sequencing of just going up, to there is at first the mark value of point of mark value as the mark value of current grade, if there are two or when three points are marked and mark value is different, to there is at first the point of mark value to be recorded in his-and-hers watches of equal value by its order,
(3a7) current point is not or not the time of above-mentioned (3a3)~(3a6) described position, by itself and its upper right, just go up, upper left, four left front pixels compare, if four points all do not have marked, mark value adds 1, then the mark value using this mark value as current point, if there is point marked or have multiple point and mark value that are labeled identical, the mark value using this mark value as current point, if have, two or more point is marked and mark value is unequal, according to left front, upper left, just go up, the sequencing of upper right, the mark value of point that has at first mark value is made as to the mark value of current point, if have, two or more point is marked and mark value is unequal, to there is at first the point of mark value to be recorded in his-and-hers watches of equal value by its order.
8. a kind of bullet visual defects detection method based on AOI according to claim 1, it is characterized in that, the feature of in described step (4), each defect area being extracted at least comprises area, center of gravity, external matrix, major axis, inclination angle, length breadth ratio and gray-scale value.
9. a kind of bullet visual defects detection method based on AOI according to claim 8, is characterized in that, calculating general formula corresponding to each described feature distinguished as follows:
The defect area inner area that is i at connected component labeling wherein (x, y) represents the coordinate of pixel, R ifor being marked as the set of all pixels of i;
The center of gravity of defect area in, horizontal ordinate average is ordinate average is y ‾ i = 1 S i Σ ( x , y ) ∈ R i y ;
Upper left corner coordinate (the x of the external matrix of defect area a, y a) be x ai = min ( x i ) y ai = min ( y i ) , ( xi , yi ) ∈ R i , The long L of this external world's matrix awith wide W afor L a = max ( y i ) - min ( y i ) W a = max ( x i ) - min ( x i ) , ( x i , y i ) ∈ R i ;
The major axis value of defect area wherein (x 1, y 1) and (x 2, y 2) be a center of gravity excessively straight line two points crossing with defect area edge;
The inclination angle of defect area is long axis direction and the axial angle of x wherein (x c, y c) be the intersection point of major axis and x axle;
The length breadth ratio of defect area the length that wherein A is major axis, the length that B is minor axis, so-called minor axis refers to perpendicular to defect major axis and crosses the straight line of center of gravity and the length of the crossing point-to-point transmission in defect area edge;
Maximum gradation value and minimum gradation value u max i = max ( f ( x i , y i ) ) u min i = min ( f ( x i , y i ) ) , ( x i , y i ) ∈ R i , Average gray value μ ‾ i = Σ ( x i , y i ) ∈ R i f ( x i , y i ) , The standard deviation of gray scale σ i 2 = Σ ( x i , y i ) ∈ R i ( f ( x i , y i ) - μ ‾ i ) 2 .
CN201410324207.4A 2014-07-09 2014-07-09 Automated optical inspection (AOI)-based bullet apparent defect detection method Pending CN104122271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410324207.4A CN104122271A (en) 2014-07-09 2014-07-09 Automated optical inspection (AOI)-based bullet apparent defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410324207.4A CN104122271A (en) 2014-07-09 2014-07-09 Automated optical inspection (AOI)-based bullet apparent defect detection method

Publications (1)

Publication Number Publication Date
CN104122271A true CN104122271A (en) 2014-10-29

Family

ID=51767767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410324207.4A Pending CN104122271A (en) 2014-07-09 2014-07-09 Automated optical inspection (AOI)-based bullet apparent defect detection method

Country Status (1)

Country Link
CN (1) CN104122271A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104501721A (en) * 2014-12-26 2015-04-08 广东威创视讯科技股份有限公司 Method ad system for checking relative positions in display wall
CN104504386A (en) * 2014-12-08 2015-04-08 深圳市浦洛电子科技有限公司 Modular AOI (automated optical inspection) positioning method, system and burning IC (integrated circuit) equipment
CN104851086A (en) * 2015-04-17 2015-08-19 武汉恒兴通检测有限公司 Image detection method for cable rope surface defect
CN105424709A (en) * 2015-11-20 2016-03-23 陕西科技大学 Fruit surface defect detection method based on image marking
CN106485696A (en) * 2016-09-22 2017-03-08 电子科技大学 A kind of detection method of the explosive dangerous materials stitch defect based on machine vision
CN107331029A (en) * 2017-06-23 2017-11-07 深圳怡化电脑股份有限公司 Bank note dislocation detection method, device, equipment and storage medium
CN108072668A (en) * 2016-11-18 2018-05-25 中国科学院沈阳自动化研究所 Bullet open defect automatic recognition system based on Photoelectric Detection
CN109509200A (en) * 2018-12-26 2019-03-22 深圳市繁维医疗科技有限公司 Checkerboard angle point detection process, device and computer readable storage medium based on contours extract
CN109671078A (en) * 2018-12-24 2019-04-23 广东理致技术有限公司 A kind of product surface image abnormity detection method and device
CN110095410A (en) * 2019-05-07 2019-08-06 西北核技术研究所 Pattern measurement method, system and ballistic deflection measurement method are injured in target plate perforation
CN110514675A (en) * 2019-08-29 2019-11-29 珠海格力电器股份有限公司 A kind of intelligent detecting method and system of label
CN115018853A (en) * 2022-08-10 2022-09-06 南通市立新机械制造有限公司 Mechanical component defect detection method based on image processing
WO2024087870A1 (en) * 2022-10-26 2024-05-02 上海船舶工艺研究所(中国船舶集团有限公司第十一研究所) Defect identification method for x-ray weld seam image, device, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06323824A (en) * 1993-05-13 1994-11-25 Sharp Corp Method and equipment for inspecting appearance of bump
US20040146189A1 (en) * 2003-01-29 2004-07-29 General Electric Company Method and apparatus for correcting digital x-ray images
JP2008077379A (en) * 2006-09-21 2008-04-03 Seiko Epson Corp Image detection device, image detection method, and image detection program
WO2008120321A1 (en) * 2007-03-28 2008-10-09 Fujitsu Limited Image processing device, image processing method, and image processing program
CN102034106A (en) * 2010-12-20 2011-04-27 浙江工业大学 Image treatment-based method for extracting flame outline
US8107734B2 (en) * 2006-04-28 2012-01-31 Sharp Kabushiki Kaisha Image processing apparatus, and method for performing document matching using extracted feature points of connected image components
CN103745483A (en) * 2013-12-20 2014-04-23 成都体育学院 Mobile-target position automatic detection method based on stadium match video images
JP2014123230A (en) * 2012-12-20 2014-07-03 Sony Corp Image processor, image processing method, and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06323824A (en) * 1993-05-13 1994-11-25 Sharp Corp Method and equipment for inspecting appearance of bump
US20040146189A1 (en) * 2003-01-29 2004-07-29 General Electric Company Method and apparatus for correcting digital x-ray images
US8107734B2 (en) * 2006-04-28 2012-01-31 Sharp Kabushiki Kaisha Image processing apparatus, and method for performing document matching using extracted feature points of connected image components
JP2008077379A (en) * 2006-09-21 2008-04-03 Seiko Epson Corp Image detection device, image detection method, and image detection program
WO2008120321A1 (en) * 2007-03-28 2008-10-09 Fujitsu Limited Image processing device, image processing method, and image processing program
EP2131589A1 (en) * 2007-03-28 2009-12-09 Fujitsu Limited Image processing device, image processing method, and image processing program
CN102034106A (en) * 2010-12-20 2011-04-27 浙江工业大学 Image treatment-based method for extracting flame outline
JP2014123230A (en) * 2012-12-20 2014-07-03 Sony Corp Image processor, image processing method, and program
CN103745483A (en) * 2013-12-20 2014-04-23 成都体育学院 Mobile-target position automatic detection method based on stadium match video images

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
M.L. DUFOUR ET AL.: "Surface Inspection of hard to reach industrial parts using low-lowcoherence interferometry", 《PROC. OF SPIE》 *
刘建强: "子弹表面缺陷在线检测关键技术的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504386A (en) * 2014-12-08 2015-04-08 深圳市浦洛电子科技有限公司 Modular AOI (automated optical inspection) positioning method, system and burning IC (integrated circuit) equipment
CN104504386B (en) * 2014-12-08 2017-12-01 深圳市浦洛电子科技有限公司 A kind of modularization AOI localization methods, system and burning IC equipment
CN104501721A (en) * 2014-12-26 2015-04-08 广东威创视讯科技股份有限公司 Method ad system for checking relative positions in display wall
CN104851086A (en) * 2015-04-17 2015-08-19 武汉恒兴通检测有限公司 Image detection method for cable rope surface defect
CN104851086B (en) * 2015-04-17 2017-08-04 武汉恒兴通检测有限公司 A kind of image detecting method for cable surface defect
CN105424709A (en) * 2015-11-20 2016-03-23 陕西科技大学 Fruit surface defect detection method based on image marking
CN106485696B (en) * 2016-09-22 2019-07-19 电子科技大学 A kind of detection method of the explosive dangerous material stitch defect based on machine vision
CN106485696A (en) * 2016-09-22 2017-03-08 电子科技大学 A kind of detection method of the explosive dangerous materials stitch defect based on machine vision
CN108072668A (en) * 2016-11-18 2018-05-25 中国科学院沈阳自动化研究所 Bullet open defect automatic recognition system based on Photoelectric Detection
CN107331029A (en) * 2017-06-23 2017-11-07 深圳怡化电脑股份有限公司 Bank note dislocation detection method, device, equipment and storage medium
CN107331029B (en) * 2017-06-23 2019-09-20 深圳怡化电脑股份有限公司 Bank note dislocation detection method, device, equipment and storage medium
CN109671078A (en) * 2018-12-24 2019-04-23 广东理致技术有限公司 A kind of product surface image abnormity detection method and device
CN109671078B (en) * 2018-12-24 2022-11-01 广东理致技术有限公司 Method and device for detecting product surface image abnormity
CN109509200A (en) * 2018-12-26 2019-03-22 深圳市繁维医疗科技有限公司 Checkerboard angle point detection process, device and computer readable storage medium based on contours extract
CN109509200B (en) * 2018-12-26 2023-09-29 深圳市繁维医疗科技有限公司 Checkerboard corner detection method based on contour extraction and computer readable storage medium
CN110095410A (en) * 2019-05-07 2019-08-06 西北核技术研究所 Pattern measurement method, system and ballistic deflection measurement method are injured in target plate perforation
CN110095410B (en) * 2019-05-07 2021-10-08 西北核技术研究所 Target plate perforation damage characteristic measuring method and system and ballistic deflection measuring method
CN110514675A (en) * 2019-08-29 2019-11-29 珠海格力电器股份有限公司 A kind of intelligent detecting method and system of label
CN115018853A (en) * 2022-08-10 2022-09-06 南通市立新机械制造有限公司 Mechanical component defect detection method based on image processing
WO2024087870A1 (en) * 2022-10-26 2024-05-02 上海船舶工艺研究所(中国船舶集团有限公司第十一研究所) Defect identification method for x-ray weld seam image, device, and storage medium

Similar Documents

Publication Publication Date Title
CN104122271A (en) Automated optical inspection (AOI)-based bullet apparent defect detection method
CN105849534B (en) Detection method of surface flaw and surface defect detection apparatus
CN105067638B (en) Tire fetal membrane face character defect inspection method based on machine vision
CN105046700B (en) Fruit surface defect detection method and system based on gamma correction and color classification
CN105334219A (en) Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation
CN108596880A (en) Weld defect feature extraction based on image procossing and welding quality analysis method
CN105046697B (en) A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting
CN105913093A (en) Template matching method for character recognizing and processing
CN110827235B (en) Steel plate surface defect detection method
CN110288561A (en) Refractory brick surface scratch recognition methods based on frequency filtering enhancing
CN112819844B (en) Image edge detection method and device
CN104700112A (en) Method for detecting parasite eggs in excrement based on morphological characteristics
CN109727233A (en) A kind of LCD defect inspection method
CN107490582A (en) A kind of streamline Work Piece Verification System Based
CN104112123A (en) Defect characteristic extraction and identification method of AOI system used for bullet apparent defect detection
CN109540925A (en) Complicated ceramic tile surface defect inspection method based on difference shadow method and local variance measurement operator
CN103020609A (en) Complex fiber image recognition method
Fu et al. Medicine glass bottle defect detection based on machine vision
CN115330780A (en) Rapid detection method for slag inclusion defect of metal welding
CN110412055A (en) A kind of lens white haze defect inspection method based on multiple light courcess dark-ground illumination
CN116109633B (en) Window detection method and device for bearing retainer
CN110458882A (en) A kind of fruit phenotype test method based on computer vision
CN115753791B (en) Defect detection method, device and system based on machine vision
CN103605973A (en) Image character detection and identification method
CN108663376B (en) Seamless steel tube quality detection device and detection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141029