CN112781452B - Bullet primer top appearance defect detection method - Google Patents

Bullet primer top appearance defect detection method Download PDF

Info

Publication number
CN112781452B
CN112781452B CN202110318175.7A CN202110318175A CN112781452B CN 112781452 B CN112781452 B CN 112781452B CN 202110318175 A CN202110318175 A CN 202110318175A CN 112781452 B CN112781452 B CN 112781452B
Authority
CN
China
Prior art keywords
image
ellipse
sum
loc
primer
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.)
Active
Application number
CN202110318175.7A
Other languages
Chinese (zh)
Other versions
CN112781452A (en
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.)
Xiangtan University
Original Assignee
Xiangtan University
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 Xiangtan University filed Critical Xiangtan University
Priority to CN202110318175.7A priority Critical patent/CN112781452B/en
Publication of CN112781452A publication Critical patent/CN112781452A/en
Application granted granted Critical
Publication of CN112781452B publication Critical patent/CN112781452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F42AMMUNITION; BLASTING
    • F42BEXPLOSIVE CHARGES, e.g. FOR BLASTING, FIREWORKS, AMMUNITION
    • F42B35/00Testing or checking of ammunition

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a bullet primer top appearance defect detection method. First, will obtainThe acquired bullet primer image is divided into a top area and a body area. Then, an arc adjacency matrix-based rapid ellipse detection method is adopted to detect the ellipse in the image, and a corresponding ellipse fitting score P is obtained s1 . Thirdly, correcting the score P by adopting the Euclidean distance between the center of the fitted ellipse and the center of mass of the ellipse s1 Obtain the actual ellipse score P Sum . Finally, score P according to ellipse Sum And judging whether the top area of the bullet primer has a notch or not. The method has the advantages of high real-time performance, strong robustness and low false detection and missing detection rate for detecting the top defect of the bullet primer.

Description

Bullet primer top appearance defect detection method
Technical Field
The invention relates to the field of appearance defect detection of industrial products, in particular to a bullet primer top appearance detection method.
Background
The bullet is an essential part in the weapon equipment, optimizes the production technology of the weapon equipment, promotes the yield, is favorable to promoting the input-output ratio, ensures the needs of fighting immediately. The primer has the characteristics of long storage time, high ignition stability, safe use and the like, and is widely applied to ignition devices at the bottoms of various bullets and guns. In the production process, the production process is complex, the production links are numerous, and the primer inevitably has appearance defects such as gaps and the like. The primer is used as a key ignition part at the bottom of the bullet, and the yield of the primer is directly related to the storage time and the firing success rate of the bullet.
The traditional primer production line usually adopts a mode of observing the primer appearance by artificial naked eyes to detect appearance defects. The detection mode has low efficiency and low precision, and is easily interfered by subjective factors such as human visual fatigue and the like, so that the false detection rate of the primer is high. With the new requirements of the large-scale production of the primer on the detection speed and the detection precision, the existing detection mode is difficult to meet the defect detection of the primer. Therefore, a full-automatic detection device with high speed, high precision and strong stability is urgently needed in the primer detection process to replace manual detection and elimination of defective products in the primer.
The primer belongs to inflammable and explosive articles, the detection process needs to contact the surface as little as possible, and the generation of static electricity needs to be strictly prevented. Therefore, the detection should be performed by a non-contact non-destructive detection method. The detection method does not need to contact the surface of the detected object and does not change the physical and chemical properties of the detected object. The nondestructive detection technology based on machine vision is essentially characterized in that an industrial camera and a light source are utilized to simulate human eyes to acquire image data, and relevant information of a workpiece to be detected is acquired; and transmitting the acquired image to a designed image processing and analyzing system in an industrial personal computer, so as to realize related requirements of region segmentation, defect detection and the like of the workpiece.
With the continuous maturity, popularization and application of computer vision technology, automatic bullet quality detection becomes possible. However, due to the complex structure of the bullet primer and the mutual interference among the defects of the primer part, the image segmentation of the surface defects of the bullet primer is difficult. Therefore, how to accurately, quickly and effectively extract the top defects of the bullet primer is the key of machine vision detection. In addition, the traditional methods such as a regional area statistical method and an ellipse detection method are easily influenced by environmental factors such as imaging distance and illumination when the notch at the top of the bullet primer is judged, and the problem of visual defect detection is that how to accurately judge the notch defect at the top is the problem.
Disclosure of Invention
Aiming at the problems, the invention provides a bullet primer top appearance defect detection method which can accurately, quickly and efficiently divide a bullet primer image into a top area and a body area and can well fit and detect a top notch in the image. The invention comprises the following contents:
s100, respectively adopting threshold values T 1 And T 2 Binarizing the bullet bottom fire body part image I with the size of (h, w) to correspondingly obtain images Bin1 and Bin2;
s200, extracting a top area of the bullet primer from the binary image Bin1, and extracting a body area of the bullet primer from the binary image Bin2;
s300, carrying out ellipse detection on the extracted bullet primer region by adopting a rapid ellipse detection method based on an arc adjacency matrix to obtain a corresponding ellipse fitting score P s1 And correcting the score P by combining the Euclidean distance method s1 Obtain the actual ellipse score P Sum According to P Sum And judging whether the top area of the bullet primer has a notch or not.
The invention has the following advantages:
1. the top-side rapid partitioning algorithm for the primer has high partitioning precision and high speed, can meet the requirement on precision in industrial visual detection of the primer, and can well fit the beat of the primer in industrial production;
2. the top gap judgment method provided by the invention has better robustness and strong anti-interference capability.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a schematic view of a bullet primer dividing region;
fig. 3 is a schematic diagram of a boundary acquisition method for performing horizontal and vertical scanning on an image. The method comprises the following specific steps: fig. 3 (a) and 3 (b) are a schematic view of horizontal and vertical scanning of an image Bin1 and a schematic view of horizontal scanning of an image Bin2, respectively;
FIG. 4 is a schematic view of the distance between the center of the fitted ellipse and the centroid point;
fig. 5 is a schematic view of a bullet primer body detection station.
The specific implementation mode is as follows:
in the implementation of the invention, a Basler acA640-90gc camera is selected, the resolution is 658x 492, and the theoretical frame rate is 90fps; an M5018-MP2 lens manufactured by computer corporation was used, and the focal length was 50mm. The camera is combined with a lens for acquiring an image.
The image acquisition system of the bullet primer body detection station comprises three camera positions, the cameras form an included angle of 120 degrees, primer images are respectively acquired from 3 symmetrical positions, and the system structure is shown in fig. 5. The camera collects images from the oblique upper side of the primer, and the primer part is polished in a mode that surface light penetrates through the glass disc. The polishing mode can avoid the characteristic interference of the elliptic area at the top of the primer to the maximum extent (the elliptic area at the top is in a large-area extremely-low gray value area), and the defects of the side area of the primer are highlighted, so that the rapid segmentation of the top area and the side area of the bullet primer is facilitated.
The method comprises the following specific implementation steps:
s100, turning on an LED light source, triggering a camera, obtaining an image I of a bullet primer body part, and respectively adopting threshold values T 1 And T 2 Binarizing the bullet primer body part image I with the size of (h, w) correspondinglyObtaining images Bin1 and Bin2:
Figure BDA0002992100840000021
Figure BDA0002992100840000031
in the formula, I is a bullet primer image acquired by a camera, bin1 is I and is a threshold value T 1 Obtaining a binary image with Bin2 as I and a threshold value T 2 Obtaining a binary image;
s200, extracting a top area of the bullet primer from the binary image Bin1, and extracting a body area of the bullet primer from the binary image Bin2, as shown in figure 2;
S210.I 2 =Bin1,body=0;
s220, for the image I 2 And scanning transversely line by line from left to right, accumulating and summing the pixel gray scale of each line, and solving the upper edge and the lower edge of the target in the image:
Figure BDA0002992100840000032
wherein, if H (u-1) sum &H(u) sum If > N, the upper edge loc _ up = u; if H (d) sum >N&H(d+1) sum If < N, the lower edge loc _ down = d; in the formula, H (i) sum The sum of the gray levels of all pixels in the ith row, N is a threshold value;
if body =0, performing step S230, otherwise, performing step S270;
s230, determining an upper edge ltop _ up and a lower edge ltop _ down of the target in the image Bin1, namely ltop _ up = loc _ up and ltop _ down = loc _ down, as shown in FIG. 3 (a);
s240, for image I 2 Scanning longitudinally from top to bottom column by column, and cumulatively summing the pixel gray levels of each column to obtain the left and right edges of the object in the image:
Figure BDA0002992100840000033
wherein, if L (L-1) sum <N&L(l) sum If the ratio is more than N, the left edge loc _ left = l; if L (r) sum >N&H(r+1) sum If < N, the right edge loc _ right = r; in the formula, L (j) sum The sum of the gray levels of all the pixels in the jth row is obtained, and N is a threshold value;
s250, determining a left edge ltop _ left and a right edge ltop _ right of the object in the image Bin1, namely ltop _ left = loc _ left and ltop _ right = loc _ right, as shown in FIG. 3 (a);
S260.I 2 = Bin2, body =1, skipping execution S220;
s270, determining an upper edge loc _ o _ up and a lower edge loc _ o _ down of the object in the image Bin2, i.e. loc _ o _ up = loc _ up, loc _ o _ down = loc _ down, as shown in fig. 3 (b);
s280, obtaining the coordinates of the upper left boundary point, the upper right boundary point, the lower left boundary point and the lower right boundary point of the region of interest frame as
Figure BDA0002992100840000041
(ltop _ left, loc _ o _ down) and (ltop _ right, loc _ o _ down);
s290, taking a non-image Bin1, performing pixel-by-pixel phase comparison with an image Bin2 to obtain an image Bin3, performing pixel-by-pixel phase comparison on Bin3 (x, y) and an original image I (x, y), and performing frame phase comparison with an area of interest to finally obtain a primer side metal semicircular ring area image;
s300, carrying out ellipse detection on the extracted bullet primer region by adopting a rapid ellipse detection method based on an arc adjacency matrix to obtain a corresponding ellipse fitting score P s1 And correcting the score P by combining the Euclidean distance method s1 Obtain the actual ellipse score P Sum According to P Sum Judging whether a gap exists in the top area of the bullet primer;
s310, fitting the ellipse in the image by adopting a rapid ellipse detection method based on the arc adjacency matrix to obtain the circle center E (x) E ,y E ) And an evaluation score P for the ellipse s1
Figure BDA0002992100840000042
Wherein SI is the morphological index of the fitted ellipse, LI i Is a position index of the sampling point, GI i Is a gradient index of a sampling point, WI i Is a weighted index of the sample points, i =1,2 v
S320, calculating the Euclidean distance between the two points according to the position relation between the ellipse center point E and the ellipse center point C in the figure 4:
Figure BDA0002992100840000043
wherein, the point E is the center (x) of an ellipse fitted by a rapid ellipse detection method based on an arc adjacency matrix E ,y E ) (ii) a Point C is the actual centroid of the top ellipse with pixel coordinates of (x) C ,y C );
S330, correcting score P according to Euclidean distance between the center of the ellipse and the centroid obtained in the previous step s1 Calculating the actual score P of the fitted ellipse Sum And then judging the top defect of the bullet primer according to a threshold value:
Figure BDA0002992100840000044
if the score is P Sum >T, judging that the ellipse at the top of the bullet primer does not have a notch; otherwise, it must have a gap;
wherein the thresholds S =0.8, D =3 and T =0.8.

Claims (2)

1. A bullet primer top appearance defect detection method at least comprises the following steps:
s100, respectively adopting threshold values T 1 And T 2 Binarizing the bullet bottom fire body part image I with the size of (h, w) to correspondingly obtain images Bin1 and Bin2;
Figure FDA0003770481530000011
Figure FDA0003770481530000012
in the formula, I is a bullet primer image acquired by a camera, bin1 is I, and a threshold T is selected 1 Obtaining a binary image with Bin2 as I and a threshold T 2 Obtaining a binary image, wherein h is the length of the image I, and w is the width of the image I;
s200, extracting a top area of the bullet primer from the binary image Bin1, and extracting a body area of the bullet primer from the binary image Bin2;
s300, carrying out ellipse detection on the extracted top area of the bullet primer by adopting a rapid ellipse detection method based on an arc adjacency matrix to obtain the circle center E (x) of the corresponding ellipse E ,y E ) And a fitting score P for the ellipse s1
Figure FDA0003770481530000013
Wherein SI is the morphological index of the fitted ellipse, LI i Is a position index of a sampling point, GI i Is a gradient index of a sampling point, WI i Is a weighted indicator of the sample point, i =1,2 v
Calculating the Euclidean distance between the ellipse center point E and the ellipse center point C:
Figure FDA0003770481530000014
wherein, the point E is the center (x) of an ellipse fitted by a rapid ellipse detection method based on an arc adjacency matrix E ,y E ) (ii) a Point C is the actual centroid of the top ellipse with pixel coordinates of (x) C ,y C );
Combined Euclidean distance correction score P s1 Obtain the actual ellipse score P Sum According to P Sum Determining whether a gap exists in the top area of the bullet primer:
Figure FDA0003770481530000015
if the score is P Sum >T, judging that the ellipse at the top of the bullet primer does not have a notch; otherwise, it must have a gap;
wherein, S, D and T are all threshold values.
2. The method of claim 1, wherein the top region of the bullet primer is extracted from the binary image Bin1, and the body region of the bullet primer is extracted from the binary image Bin2, and the step S200 further comprises the steps of:
S210.I 2 =Bin1,body=0;
s220, for image I 2 Scanning transversely from left to right line by line, accumulating and summing the pixel gray scale of each line, and solving the upper edge and the lower edge of the target in the image:
Figure FDA0003770481530000021
wherein, ifH (u-1) sum &H(u) sum If > N, the upper edge loc _ up = u; ifH (d) sum >N&H(d+1) sum If < N, the lower edge loc _ down = d; in the formula, H (i) sum The sum of the gray levels of all pixels in the ith row, N is a threshold value;
if body =0, performing step S230, otherwise, performing step S270;
s230, determining an upper edge ltop _ up and a lower edge ltop _ down of a target in the image Bin1, namely ltop _ up = loc _ up and ltop _ down = loc _ down;
s240, for image I 2 Scanning longitudinally from top to bottom column by column, the pixel gray scale of each columnAnd accumulating and summing to obtain the left and right edges of the target in the image:
Figure FDA0003770481530000022
wherein if L (L-1) sum <N&L(l) sum If > N, the left edge loc _ left = l; if L (r) sum >N&H(r+1) sum If < N, the right edge loc _ right = r; in the formula, L (j) sum The sum of the gray levels of all the pixels in the jth row is obtained, and N is a threshold value;
s250, determining a left edge ltop _ left and a right edge ltop _ right of an object in the image Bin1, namely ltop _ left = loc _ left and ltop _ right = loc _ right;
S260.I 2 = Bin2, body =1, skipping execution S220;
s270, determining an upper edge loc _ o _ up and a lower edge loc _ o _ down of an object in the image Bin2, namely loc _ o _ up = loc _ up, loc _ o _ down = loc _ down;
s280, obtaining the coordinates of an upper left boundary point, an upper right boundary point, a lower left boundary point and a lower right boundary point of the region of interest frame as
Figure FDA0003770481530000023
(ltop _ left, loc _ o _ down) and (ltop _ right, loc _ o _ down);
s290, taking out the non-image Bin1, performing pixel-by-pixel phase comparison with the image Bin2 to obtain an image Bin3, performing pixel-by-pixel phase comparison on the Bin3 (x, y) and the original image I (x, y), and performing frame phase comparison with the region of interest to finally obtain the image of the metal semicircular ring area on the side face of the primer.
CN202110318175.7A 2021-03-25 2021-03-25 Bullet primer top appearance defect detection method Active CN112781452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110318175.7A CN112781452B (en) 2021-03-25 2021-03-25 Bullet primer top appearance defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110318175.7A CN112781452B (en) 2021-03-25 2021-03-25 Bullet primer top appearance defect detection method

Publications (2)

Publication Number Publication Date
CN112781452A CN112781452A (en) 2021-05-11
CN112781452B true CN112781452B (en) 2022-10-18

Family

ID=75762893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110318175.7A Active CN112781452B (en) 2021-03-25 2021-03-25 Bullet primer top appearance defect detection method

Country Status (1)

Country Link
CN (1) CN112781452B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10255056A (en) * 1997-03-07 1998-09-25 Toshiba Eng Co Ltd Circuit body defect detecting method
CN105092589A (en) * 2015-07-07 2015-11-25 东北大学 Detection method for defects of capsule head
CN105334219A (en) * 2015-09-16 2016-02-17 湖南大学 Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation
CN106824816A (en) * 2016-12-20 2017-06-13 浙江工业大学 A kind of PE based on machine vision bottles of detection and method for sorting
CN109187581A (en) * 2018-07-12 2019-01-11 中国科学院自动化研究所 The bearing finished products plate defects detection method of view-based access control model
CN109544547A (en) * 2018-11-30 2019-03-29 湘潭大学 A kind of bayonet type autobulb lamp cap top open defect detection method
CN111602047A (en) * 2018-01-15 2020-08-28 株式会社斯库林集团 Tablet inspection method and tablet inspection device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10255056A (en) * 1997-03-07 1998-09-25 Toshiba Eng Co Ltd Circuit body defect detecting method
CN105092589A (en) * 2015-07-07 2015-11-25 东北大学 Detection method for defects of capsule head
CN105334219A (en) * 2015-09-16 2016-02-17 湖南大学 Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation
CN106824816A (en) * 2016-12-20 2017-06-13 浙江工业大学 A kind of PE based on machine vision bottles of detection and method for sorting
CN111602047A (en) * 2018-01-15 2020-08-28 株式会社斯库林集团 Tablet inspection method and tablet inspection device
CN109187581A (en) * 2018-07-12 2019-01-11 中国科学院自动化研究所 The bearing finished products plate defects detection method of view-based access control model
CN109544547A (en) * 2018-11-30 2019-03-29 湘潭大学 A kind of bayonet type autobulb lamp cap top open defect detection method

Also Published As

Publication number Publication date
CN112781452A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN110163853B (en) Edge defect detection method
CN107705288B (en) Infrared video detection method for dangerous gas leakage under strong interference of pseudo-target motion
CN109141232B (en) Online detection method for disc castings based on machine vision
CN105067638B (en) Tire fetal membrane face character defect inspection method based on machine vision
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN106052575B (en) Online test method is worn away based on the pantograph carbon slide in train high-speed cruising
CN108520514B (en) Consistency detection method for electronic elements of printed circuit board based on computer vision
CN111266315A (en) Ore material online sorting system and method based on visual analysis
CN109100363A (en) A kind of differentiating method and system being bonded foreign matter defect and dust
CN116559183B (en) Method and system for improving defect judging efficiency
CN111369516A (en) Transformer bushing heating defect detection method based on infrared image recognition
CN106780473A (en) A kind of magnet ring defect multi-vision visual detection method and system
CN108596909A (en) Hollow cylinder Surface Flaw Detection system and method
CN113237889A (en) Multi-scale ceramic detection method and system
CN112819844A (en) Image edge detection method and device
CN116678826A (en) Appearance defect detection system and method based on rapid three-dimensional reconstruction
CN114018946B (en) OpenCV-based high-reflectivity bottle cap defect detection method
CN107818583A (en) Cross searching detection method and device
CN105391998B (en) Automatic detection method and apparatus for resolution of low-light night vision device
CN112781452B (en) Bullet primer top appearance defect detection method
CN116883446B (en) Real-time monitoring system for grinding degree of vehicle-mounted camera lens
CN109741311B (en) Aluminum alloy fusion welding back face fusion width detection method with false edge
CN209606340U (en) Transparent medicine bottle bottom buildup defect detecting system
CN111127542A (en) Image-based non-cooperative target docking ring extraction method
CN111008960A (en) Aluminum electrolytic capacitor bottom appearance detection method and device based on machine vision

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant