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

Bullet primer top appearance defect detection method Download PDF

Info

Publication number
CN112781452A
CN112781452A CN202110318175.7A CN202110318175A CN112781452A CN 112781452 A CN112781452 A CN 112781452A CN 202110318175 A CN202110318175 A CN 202110318175A CN 112781452 A CN112781452 A CN 112781452A
Authority
CN
China
Prior art keywords
ellipse
image
sum
primer
loc
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.)
Granted
Application number
CN202110318175.7A
Other languages
Chinese (zh)
Other versions
CN112781452B (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, the 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 obtaineds1. Thirdly, correcting the score P by adopting the Euclidean distance between the center of the fitted ellipse and the center of mass of the ellipses1Obtain the actual ellipse score PSum. Finally, score P according to ellipseSumAnd 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 the indispensable partly in the weaponry, optimizes the production technology of weaponry, promotes the yields, 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 appearance of the primer by 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 detection process of the primer to replace manual detection and elimination of defective products existing in the primer.
The primer belongs to flammable 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 workpiece region segmentation, defect detection and the like.
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 defect 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 T1And T2Binarizing the bullet primer part image I with the size of (h, w) to correspondingly obtain images Bin1 and Bin 2;
s200, extracting a top area of the bullet primer in the binary image Bin1, and extracting a body area of the bullet primer in the binary image Bin 2;
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 Ps1And correcting the score P by combining the Euclidean distance methods1Obtain the actual ellipse score PSumAccording to PSumAnd 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 diagram of horizontal and vertical scanning of an image Bin1 and a schematic diagram 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, acA640-90gc cameras of Basler are selected, the resolution is 658x 492, and the theoretical frame rate is 90 fps; a M5018-MP2 lens from computer was used, which had a focal length of 50 mm. 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 phases, the cameras are arranged at 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 part of the primer, and the primer body 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 bullet bottom fire body part images I, and respectively adopting threshold values T1And T2Binarizing the bullet primer body part image I with the size of (h, w) to obtain images Bin1 and Bin 2:
Figure BDA0002992100840000021
Figure BDA0002992100840000031
in the formula, I is a bullet primer image acquired by a camera, Bin1 is I and takes a threshold value T1Obtaining a binary image with Bin2 as I and taking a threshold value T2Obtaining a binary image;
s200, extracting a top area of the bullet primer in the binary image Bin1, and extracting a body area of the bullet primer in the binary image Bin2, as shown in FIG. 2;
S210.I2=Bin1,body=0;
s220, for image I2And 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)sumIf > N, the upper edge loc _ up ═ u; if H (d)sum>N&H(d+1)sumIf < N, the lower edge loc _ down is d; in the formula, H (i)sumThe sum of the gray levels of all pixels in the ith row is N, and N is a threshold value;
if body is 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, that is, ltop _ up _ loc _ up and ltop _ down _ loc _ down, as shown in fig. 3 (a);
s240, for image I2Scanning 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)sumIf the left edge loc _ left is greater than N, l; if L (r)sum>N&H(r+1)sumIf < N, the right edge loc _ right ═ r; in the formula, L (j)sumThe sum of the gray levels of all the pixels in the jth row is obtained, and N is a threshold value;
s250, determining left edge ltop _ left and right edge ltop _ right of the object in the image Bin1, i.e. ltop _ left ═ loc _ left, ltop _ right ═ loc _ right, as shown in fig. 3 (a);
S260.I2b, changing to Bin2 and body to 1, and jumping to execute S220;
s270, determining the upper edge loc _ o _ up and the lower edge loc _ o _ down of the object in the image Bin2, i.e. loc _ o _ up and loc _ o _ down, as shown in fig. 3 (b);
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 BDA0002992100840000041
(ltop _ left, loc _ o _ down) and (ltop _ right)t,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 between 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 Ps1And correcting the score P by combining the Euclidean distance methods1Obtain the actual ellipse score PSumAccording to PSumJudging 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,yE) And an evaluation score P for the ellipses1
Figure BDA0002992100840000042
Wherein SI is the morphological index of the fitted ellipse, LIiIs a position index of a sampling point, GIiIs a gradient index of a sampling point, WIiIs a weighting index of the sampling point, i 1,2v
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 matrixE,yE) (ii) a Point C is the actual centroid of the top ellipse with pixel coordinates of (x)C,yC);
S330, correcting score P according to Euclidean distance between the center of the ellipse and the centroid obtained in the previous steps1Calculating the actual score P of the fitted ellipseSumAnd then judging the top defect of the bullet primer according to a threshold value:
Figure BDA0002992100840000044
if the score is PSum>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 threshold value S is 0.8, D is 3 and T is 0.8.

Claims (3)

1. A bullet primer top appearance defect detection method at least comprises the following steps:
s100, respectively adopting threshold values T1And T2Binarizing the bullet primer part image I with the size of (h, w) to correspondingly obtain images Bin1 and Bin 2;
Figure FDA0002992100830000011
Figure FDA0002992100830000012
in the formula, I is a bullet primer image acquired by a camera, Bin1 is I and takes a threshold value T1Obtaining a binary image with Bin2 as I and taking a threshold value T2Obtaining a binary image;
s200, extracting a top area of the bullet primer in the binary image Bin1, and extracting a body area of the bullet primer in the binary image Bin 2;
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 Ps1And correcting the score P by combining the Euclidean distance methods1Obtain the actual ellipse score PSumAccording to PSumAnd judging whether the top area of the bullet primer has a notch or not.
2. The method of detecting appearance defects of the top of bullet primer according to claim 1, wherein the top area of bullet primer is extracted in binary image Bin1, and the body area of bullet primer is extracted in binary image Bin2, said step S200 further comprises at least the following steps:
S210.I2=Bin1,body=0;
s220, for image I2And 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 FDA0002992100830000013
wherein, ifH (u-1)sum&H(u)sumIf > N, the upper edge loc _ up ═ u; ifH (d)sum>N&H(d+1)sumIf < N, the lower edge loc _ down is d; in the formula, H (i)sumThe sum of the gray levels of all pixels in the ith row is N, and N is a threshold value;
if body is 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 and ltop _ down;
s240, for image I2Scanning 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 FDA0002992100830000014
wherein, if L (L-1)sum<N&L(l)sumIf the left edge loc _ left is greater than N, l; if L (r)sum>N&H(r+1)sumIf < N, the right edge loc _ right ═ r; in the formula, L (j)sumThe 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.I2b, changing to Bin2 and body to 1, and jumping to execute 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 and loc _ o _ 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 FDA0002992100830000021
(ltop _ left, loc _ o _ down) and (ltop _ right, loc _ o _ down);
s290, taking out the negative of the image Bin1, performing pixel-by-pixel phase comparison with the image Bin2 to obtain an image Bin3, performing pixel-by-pixel phase comparison between 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.
3. The method of claim 1, wherein the defect of top notch of bullet primer is determined, and the step S300 further comprises the following steps:
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,yE) And an evaluation score P for the ellipses1
Figure FDA0002992100830000022
Wherein SI is the morphological index of the fitted ellipse, LIiIs a position index of a sampling point, GIiIs a gradient index of a sampling point, WIiIs a weighting index of the sampling point, i 1,2v
S320, calculating the Euclidean distance between the ellipse center point E and the ellipse center point C:
Figure FDA0002992100830000023
wherein, the point E is the center (x) of an ellipse fitted by a rapid ellipse detection method based on an arc adjacency matrixE,yE) (ii) a Point C is the actual centroid of the top ellipse with pixel coordinates of (x)C,yC);
S330, correcting score P according to Euclidean distance between the center of the ellipse and the centroid obtained in the previous steps1Calculating the actual score P of the fitted ellipseSumAnd then judging the top defect of the bullet primer according to a threshold value:
Figure FDA0002992100830000031
if the score is PSum>T, judging that the ellipse at the top of the bullet primer does not have a notch; otherwise, it must have a gap;
s, D, T are all threshold values.
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 true CN112781452A (en) 2021-05-11
CN112781452B 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
CN112781452B (en) 2022-10-18

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
CN106052575B (en) Online test method is worn away based on the pantograph carbon slide in train high-speed cruising
CN108896574B (en) Bottled liquor impurity detection method and system based on machine vision
CN105654507B (en) A kind of vehicle overall dimension measurement method based on the tracking of image behavioral characteristics
CN109523541A (en) A kind of metal surface fine defects detection method of view-based access control model
CN111266315A (en) Ore material online sorting system and method based on visual analysis
CN105678776B (en) Laser vision sensor based weld image feature point extraction method
CN107610085A (en) A kind of welding point defect detecting system based on computer vision
CN110345918B (en) Space debris detection method and system based on star retrieval
CN106780473A (en) A kind of magnet ring defect multi-vision visual detection method and system
CN105225251A (en) Over the horizon movement overseas target based on machine vision identifies and locating device and method fast
CN111583114A (en) Automatic measuring device and measuring method for pipeline threads
CN108596909A (en) Hollow cylinder Surface Flaw Detection system and method
CN111292228A (en) Lens defect detection method
CN116358449A (en) Aircraft rivet concave-convex amount measuring method based on binocular surface structured light
CN116429768A (en) Sealing nail welding quality detection method, system, equipment and storage medium
CN112819844A (en) Image edge detection method and device
EP0686841A2 (en) System and method for inspecting lenses
CN115830018A (en) Carbon block detection method and system based on deep learning and binocular vision
CN108520260A (en) The recognition methods of visible foreign matters in bottled oral solution
CN114018946B (en) OpenCV-based high-reflectivity bottle cap defect detection method
CN114755236A (en) System and method for detecting surface defects of electroplated part with revolution curved surface
CN112781452B (en) Bullet primer top appearance defect detection method
CN209606340U (en) Transparent medicine bottle bottom buildup defect detecting system

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