CN116858838A - Bottle defect detection system and method - Google Patents

Bottle defect detection system and method Download PDF

Info

Publication number
CN116858838A
CN116858838A CN202310595644.9A CN202310595644A CN116858838A CN 116858838 A CN116858838 A CN 116858838A CN 202310595644 A CN202310595644 A CN 202310595644A CN 116858838 A CN116858838 A CN 116858838A
Authority
CN
China
Prior art keywords
bottle
cap
production
bottle cap
coefficient
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
CN202310595644.9A
Other languages
Chinese (zh)
Other versions
CN116858838B (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.)
Yuzhen Automation Technology Suzhou Co ltd
Original Assignee
Yuzhen Automation Technology Suzhou 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 Yuzhen Automation Technology Suzhou Co ltd filed Critical Yuzhen Automation Technology Suzhou Co ltd
Priority to CN202310595644.9A priority Critical patent/CN116858838B/en
Publication of CN116858838A publication Critical patent/CN116858838A/en
Application granted granted Critical
Publication of CN116858838B publication Critical patent/CN116858838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8883Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges involving the calculation of gauges, generating models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a bottle defect detection system and a method, which relate to the technical field of bottle defect detection and collect production process data of a medicine bottle before defect detection by arranging a production data collection module; setting a medicine bottle data collection module to collect image data of a bottle body and a bottle cap of each medicine bottle, and capturing three-view images of the bottle body and the bottle cap by using an image acquisition device; setting a bottle defect detection module to detect bottle defects according to the bottle images and acquiring bottle defect data; setting a bottle cap flaw detection module to detect flaws of the bottle cap according to the bottle cap image; setting a comprehensive evaluation module to generate destruction marks for part of bottles or bottle caps according to the bottle defect data and the bottle cap defect data, and performing fault investigation and quality detection on the production process according to the number of the bottles and the bottle caps with the destruction marks; the aim of reducing the destroying quantity and improving the yield of the medicine bottles is fulfilled.

Description

Bottle defect detection system and method
Technical Field
The invention relates to the technical field of bottle flaw detection, in particular to a bottle flaw detection system and a bottle flaw detection method.
Background
The appearance defect of the medicine bottle is a common production phenomenon in the production process of medicine enterprises, and if any medicine bottle with defects circulates in the market, the medicine bottle can be distrusted by a patient, further the medicine sales of the medicine enterprise can be influenced, and therefore, the produced unqualified bottle body and bottle cap need to be destroyed.
The traditional method for detecting the visual defects of the human eyes is time-consuming and labor-consuming, and has low efficiency and difficult unification of detection standards; the detection machine of bottle or bottle lid that present part enterprises released can detect and mark the flaw that appears on medicine bottle and bottle lid surface through computer vision technique, but can not judge the flaw degree of bottle or bottle lid, and can't overhaul the feedback to the production process of bottle and bottle lid to reduce the destruction quantity of bottle and bottle lid, improve the yields.
Therefore, the invention provides a bottle defect detection system and a method thereof.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the invention provides a bottle defect detection system and a method thereof, which achieve the purposes of reducing the destruction quantity of bottle bodies or bottle caps and improving the yield of medicine bottles.
To achieve the above object, an embodiment according to a first aspect of the present invention provides a bottle defect detection system, including a production data collection module, a medicine bottle data collection module, a bottle defect detection module, a bottle cap defect detection module, and a comprehensive evaluation module; wherein, each module is connected by an electric and/or wireless network mode;
the production data collection module is mainly used for collecting production process data of each medicine bottle before flaw detection;
the production process data are all production links of the bottle body and the bottle cap of each medicine bottle in the production stage, the numbers of production machines or production containers used in each link and the production time;
the production data collection module sends the production process data of each medicine bottle to the comprehensive evaluation module;
the medicine bottle data collection module is mainly used for collecting image data of a bottle body and a bottle cap of each medicine bottle in real time;
the mode of the medicine bottle data collection module for collecting the image data of the bottle body and the bottle cap of each medicine bottle is as follows:
for the medicine bottle body, three-view capturing of the bottle body is respectively carried out in the directions perpendicular to the bottle mouth, the bottle body and the bottle bottom by using an image capturing device arranged in a bottle inspection machine;
for the medicine bottle cap, three-view capturing of the bottle cap is respectively carried out in the directions perpendicular to the front face, the body and the back face of the bottle cap by using an image capturing device installed in a cap inspection machine;
the medicine bottle data collection module sends the captured images of the bottle body and the bottle cap to the bottle body flaw detection module and the bottle cap flaw detection module respectively;
the bottle flaw detection module is mainly used for carrying out flaw detection on the bottle according to the bottle image and obtaining detected bottle flaw data; the bottle defect data comprise a bottle size error coefficient, a bottle shape error coefficient and a flash defect coefficient; each bottle was labeled i, i= {1,2,3,..n }, in order, where n is a bottle number value;
the bottle flaw detection module detects flaws of the bottle body in the following modes:
for the dimensional error flaw of the bottle body, a bottle body graph and a bottle mouth graph of the bottle body are cut out from the bottle body graph by utilizing a computer vision technology, and are compared with a standard bottle body graph to obtain the difference value of the bottle body i and the standard bottle body in the height, the outer diameter and the outer diameter of the bottle mouth; the bottle height difference value, the bottle body outer diameter difference value and the bottle mouth outer diameter difference value are respectively marked as hi, rbi and rmi; calculating a bottle size error coefficient Spi; the calculation formula of the bottle size error coefficient Spi is as follows:
for the bottle body shape, the shape of the bottle mouth is cut out from the top view of the bottle body, the bottle mouth shape is compared with a standard bottle mouth design drawing, and the area difference value of the bottle mouth shape and the standard bottle mouth design drawing is calculated; the shape of the bottle body is cut out from the side view of the bottle body, and the shape of the bottle body in the side view is rectangular, so that the difference between the area of the shape of the bottle body and the area of a standard bottle body design drawing is calculated; similarly, calculating the difference between the area of the bottle bottom shape and the area of the standard bottle bottom design drawing from the bottom view of the bottle body; marking the bottle mouth area difference value, the bottle body area difference value and the bottle bottom area difference value as ami, abi and aui respectively, and calculating a bottle shape error coefficient Sxi; wherein the calculation formula of the bottle shape error coefficient Sxi is that
For flash, collecting a plurality of bottle pictures with flash flaws and without flash flaws in advance, manually marking the severity of the flash on the bottle pictures, and training a multi-target recognition neural network model for recognizing the flash and the severity of the bottle according to the bottle pictures by taking the bottle pictures as input; inputting a three-view image of the bottle to be detected into the multi-target recognition neural network model, and outputting a mark for severity of flash appearing on the bottle; setting a weight coefficient for the severity of each level of flash according to actual experience in advance; the flash level is marked as f, the weight coefficient corresponding to the flash level f is marked as wf, and the number of the flash levels f appearing in the bottle i is marked as nfi; calculating a flash flaw coefficient Sfi; wherein, the calculation formula of the flash flaw coefficient Sfi is sfi=ln (Σ) f (wf*nfi)+1);
The bottle defect detection module sends bottle defect data to the comprehensive evaluation module;
the bottle cap flaw detection module detects flaws of the bottle cap according to the bottle cap image and acquires bottle cap flaw data of the bottle cap; the bottle cap flaw data comprise a bottle cap size error coefficient, a thread deviation coefficient and a bottle cap deformation error coefficient; each cap was labeled j, j= {1,2,3,..m }, in order, where m is the cap number value;
the bottle cap flaw detection module obtains bottle cap flaw data of the bottle cap in the following modes:
for the bottle cap size error, the cap surface and the bottle cap body graph of the bottle cap are respectively cut out from the top view and the side view of the bottle cap j by utilizing a computer vision technology, and the difference value between the radius of the cap surface graph and the radius of the cap surface standard graph and the difference value between the cap body height and the standard cap body height are calculated; the difference of the cover radius is marked as rgj, and the difference of the cover height is marked as hgj; marking the bottle cap size error coefficient as Gpj; wherein, the calculation formula of the bottle cap size error coefficient Gpj is as follows
For the thread deviation, collecting pictures in a plurality of bottle cap bodies in advance, and training a neural network model for identifying the number of threads according to the pictures in the cap bodies; taking the bottom view of the bottle cap body to be detected as the input of the neural network model, and outputting the number of threads in the bottle cap body; the screw deviation coefficient is the absolute value of the difference value between the detection value of the number of threads in the bottle cap body and the standard number of threads; marking the thread deviation coefficient as Glj;
for deformation of the bottle cap, cutting out the cover surface shape from the top view of the bottle cap, comparing the cover surface shape with a standard cover surface design drawing, and calculating an area difference bej between the area of the cover surface shape and the area of the standard cover surface design drawing; cutting out the shape of the cover body from the side view of the bottle cover, comparing the shape of the cover body with a standard cover body design drawing, and calculating the area difference boj between the shape of the cover body and the standard cover body design drawing; calculating a bottle cap deformation error coefficient Gxj; wherein, the calculation formula of the deformation error coefficient Gxj of the bottle cap is as follows
The bottle cap flaw detection module sends detected bottle cap flaw data to the comprehensive evaluation module;
the comprehensive evaluation module is mainly used for judging whether to generate a destruction mark for the bottle body according to the bottle body flaw data and judging whether to generate the destruction mark for the bottle cover according to the bottle cover flaw data; counting the number of destroying marks on the bottle body and the number of destroying marks on the bottle cap, and performing fault investigation and quality detection on the production process of the bottle body or the bottle cap according to the number of destroying marks on the bottle body and the number of destroying marks on the bottle cap;
the comprehensive evaluation module performs fault investigation and quality detection on the production process of the bottle body or the bottle cap, and comprises the following steps:
step S1: the first comprehensive evaluation coefficient Zsi of each bottle i is calculated, wherein the calculation formula of the first comprehensive evaluation coefficient Zsi of the bottle i is as follows: zsi =α×spi+β×sxo+γ×sfi; wherein alpha, beta and gamma are preset proportional coefficients;
step S2: calculating a second comprehensive evaluation coefficient Zgj of each bottle cap j; the calculation formula of the second comprehensive evaluation coefficient Zgj of the bottle cap j is as follows: zgj =δ Gpj +epsilon Glj + ∈ Gxj; wherein delta, epsilon and epsilon are preset proportional coefficients;
step S3: setting a flaw threshold Xs of the bottle body and a flaw threshold Xg of the bottle cap in advance according to actual experience; generating a destruction mark for a bottle body with a first comprehensive evaluation coefficient Zsi greater than a flaw threshold value Xs of the bottle body and a bottle cap with a second comprehensive evaluation coefficient Zgj greater than a flaw threshold value Xg of the bottle cap;
step S4: for the bottle body and the bottle cap with the destruction mark, acquiring production process data of each bottle body and each bottle cap, and acquiring a production equipment number or a production container number of each production process of the bottle body and the bottle cap according to the production process data; calculating the proportion of the number of times of each production equipment number or production container number in the bottle body or the bottle cap with the destruction mark; sorting according to the specific gravity from big to small; and respectively storing the production equipment or production container numbers of the bottle bodies in a collection Vs in sequence; sequentially storing the numbers of production equipment or production containers of the bottle caps in a set Vg;
step S5: the method comprises the steps of marking the number of bottle bodies with destruction marks as Ys, marking the number of bottle caps with destruction marks as Yg, marking the number of total bottle bodies as Ts, and marking the number of total bottle caps as Tg; presetting a bottle body production fault threshold value Qs, a bottle cap production fault threshold value Qg and a production quantity difference threshold value Qd;
if it isThe method includes the steps that if the number of the bottles with destruction marks exceeds a certain threshold value and faults possibly occur in the production process of the bottles, fault troubleshooting is conducted on production equipment or production containers of the bottles according to the number sequence in a set Vs;
similarly, ifPerforming fault investigation on production equipment or production containers of the bottle caps according to the number sequence in the set Vg;
if (Ts-Ys) - (Tg-Yg) > Qd, the quantity of the produced qualified bottles is far greater than the quantity of the bottle caps, quality inspection is required in the production process of the bottles, and quality inspection is performed on production equipment or production containers of the bottles according to the number sequence in the set Vs;
similarly, if (Tg-Yg) - (Ts-Ys) > Qd, quality detection is performed on the bottle cap production equipment or production containers according to the number sequence in the set Vg.
An embodiment of the second aspect of the present invention provides a bottle defect detection method, comprising the following steps:
step one: the production data collection module collects production process data of each medicine bottle before flaw detection;
step two: the medicine bottle data collection module collects image data of the bottle body and the bottle cap of each medicine bottle in real time, and three-view images of the medicine bottle body and the bottle cap are captured by utilizing the image acquisition equipment;
step three: the bottle flaw detection module detects flaws of the bottle according to the bottle image, and calculates a size error coefficient of the bottle, a bottle shape error coefficient and a flash flaw coefficient;
step four: the bottle cap flaw detection module detects flaws on the bottle cap according to the bottle cap image, and obtains a bottle cap size error coefficient, a thread deviation coefficient and a bottle cap deformation error coefficient of the bottle cap;
step five: the comprehensive evaluation module generates destruction marks for part of bottles or bottle caps according to the bottle defect data and the bottle cap defect data, and performs fault investigation and quality detection on the production process of the bottles or bottle caps according to the number of the destruction marks of the bottles to be detected and the number of the destruction marks of the bottle caps to be detected.
Compared with the prior art, the invention has the beneficial effects that:
according to the invention, the production process data of each bottle body and each bottle cap are collected in advance, three-view pictures of each bottle body and each bottle cap are captured in real time through the image capturing equipment, flaw detection is carried out on the bottle bodies according to the bottle body images, the size error coefficient, the bottle body deformation error coefficient and the flash flaw coefficient of the bottle bodies are calculated, flaw detection is carried out on the bottle caps according to the bottle cap images, the bottle cap size error coefficient, the thread deviation coefficient and the bottle cap deformation error coefficient of the bottle caps are obtained, finally the flaw degree of each bottle body and each bottle cap is analyzed according to the bottle body flaw data and the bottle cap flaw data, destruction marks are generated on the bottle bodies and the bottle caps meeting destruction conditions, further, early warning is carried out on the production process of the bottle bodies or the bottle caps according to the number of the bottle bodies and the bottle caps with the destruction marks, the beneficial effects of reducing the number of destroyed bottle bodies or the bottle caps and improving the yield of medicine bottles are achieved.
Drawings
FIG. 1 is a diagram showing the connection relationship between each module of a flaw detection system according to the first embodiment of the present invention;
fig. 2 is a flowchart of a flaw detection method in a second embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be clearly and completely described in connection with the embodiments, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
As shown in fig. 1, a bottle defect detection system comprises a production data collection module, a medicine bottle data collection module, a bottle defect detection module, a bottle cap defect detection module and a comprehensive evaluation module; wherein, each module is connected by an electric and/or wireless network mode;
the production data collection module is mainly used for collecting production process data of each medicine bottle before flaw detection;
in a preferred embodiment, the production process data are all production links that the body and the cap of each medicine bottle pass through in the production stage, the number of the production machine or the production container used in each link, and the production time;
preferably, the production process data is expressed using a numerical number; for each production process of the bottle body and the bottle cap, numbering each production equipment or production container by using a fixed number of digits; the number of each bottle body and each bottle cap can be generated by splicing the numbers of the used production equipment or production containers according to the production sequence and finally splicing the production time; when the digital numbers are read, the digital numbers are cut according to the number digits of each production link, and the numbers of production equipment or production containers or production time information are read in sections; it can be understood that the serial number splicing mode is the mode of the shortest data string for carrying out data expression on the production process data;
the production data collection module sends the production process data of each medicine bottle to the comprehensive evaluation module;
the medicine bottle data collection module is mainly used for collecting image data of a bottle body and a bottle cap of each medicine bottle in real time;
in a preferred embodiment, the medicine bottle data collecting module collects image data of the bottle body and the bottle cap of each medicine bottle in the following manner:
for the medicine bottle body, three-view capturing of the bottle body is respectively carried out in the directions perpendicular to the bottle mouth, the bottle body and the bottle bottom by using an image capturing device arranged in a bottle inspection machine;
for the medicine bottle cap, three-view capturing of the bottle cap is respectively carried out in the directions perpendicular to the front face, the body and the back face of the bottle cap by using an image capturing device installed in a cap inspection machine; it will be appreciated that the three views are top, side and bottom views, respectively;
the medicine bottle data collection module sends the captured images of the bottle body and the bottle cap to the bottle body flaw detection module and the bottle cap flaw detection module respectively;
the bottle flaw detection module is mainly used for carrying out flaw detection on the bottle according to the bottle image and obtaining detected bottle flaw data; the bottle defect data comprise a bottle size error coefficient, a bottle shape error coefficient and a flash defect coefficient; each bottle was labeled i, i= {1,2,3,..n }, in order, where n is a bottle number value;
it will be appreciated that possible imperfections in the body of the vial include body dimensional errors, body shape variations and flash; still further, the bottle size error also comprises errors of bottle height, bottle outer diameter and bottle mouth outer diameter; the shape of the bottle body comprises the shape of the bottle body, the shape of the bottle mouth and the shape of the bottle bottom;
in a preferred embodiment, the bottle defect detection module performs defect detection on the bottle body in the following ways:
for the dimensional error flaw of the bottle body, a bottle body graph and a bottle mouth graph of the bottle body are cut out from the bottle body graph by utilizing a computer vision technology, and are compared with a standard bottle body graph to obtain the difference value of the bottle body i and the standard bottle body in the height, the outer diameter and the outer diameter of the bottle mouth; the bottle height difference value, the bottle body outer diameter difference value and the bottle mouth outer diameter difference value are respectively marked as hi, rbi and rmi; calculating a bottle size error coefficient Spi; the calculation formula of the bottle size error coefficient Spi is as follows: it can be appreciated that, since the bottle height is generally greater than the body outer diameter and greater than the finish outer diameter, in order to balance the error scale, the difference in bottle height, the difference in body outer diameter and the difference in finish outer diameter are calculated using different orders of magnitude respectively;
for the bottle body shape, the shape of the bottle mouth is cut out from the top view of the bottle body, the bottle mouth shape is compared with a standard bottle mouth design drawing, and the area difference value of the bottle mouth shape and the standard bottle mouth design drawing is calculated; the shape of the bottle body is cut out from the side view of the bottle body, and the shape of the bottle body in the side view is rectangular, so that the difference between the area of the shape of the bottle body and the area of a standard bottle body design drawing is calculated; similarly, calculating the difference between the area of the bottle bottom shape and the area of the standard bottle bottom design drawing from the bottom view of the bottle body; marking the bottle mouth area difference value, the bottle body area difference value and the bottle bottom area difference value as ami, abi and aui respectively, and calculating a bottle shape error coefficient Sxi; wherein the calculation formula of the bottle shape error coefficient Sxi is thatIt can be appreciated that, because the bottle area is generally larger than the bottle bottom area and larger than the bottle mouth area, in order to balance the error scale, the bottle mouth area difference value, the bottle body area difference value and the bottle bottom area difference value are calculated by different orders of magnitude respectively;
for flash, collecting a plurality of bottle pictures with flash flaws and without flash flaws in advance, manually marking the severity of the flash on the bottle pictures, and training a multi-target recognition neural network model for recognizing the flash and the severity of the bottle according to the bottle pictures by taking the bottle pictures as input; inputting a three-view image of the bottle to be detected into the multi-target recognition neural network model, and outputting a mark for severity of flash appearing on the bottle; setting a weight coefficient for the severity of each level of flash according to actual experience in advance; specifically, the flash level is marked as fThe weight coefficient corresponding to the flash level f is marked as wf, and the number of the flash levels f appearing in the bottle body i is marked as nfi; calculating a flash flaw coefficient Sfi; wherein, the calculation formula of the flash flaw coefficient Sfi is sfi=ln (Σ) f (wf*nfi)+1);
The bottle defect detection module sends bottle defect data to the comprehensive evaluation module;
the bottle cap flaw detection module is mainly used for carrying out flaw detection on the bottle cap according to the bottle cap image and obtaining bottle cap flaw data of the bottle cap; the bottle cap flaw data comprise a bottle cap size error coefficient, a thread deviation coefficient and a bottle cap deformation error coefficient; each cap was labeled j, j= {1,2,3,..m }, in order, where m is the cap number value;
it will be appreciated that possible imperfections in the cap of the vial include cap dimensional errors, thread deviations and cap deformations; wherein, the bottle cap dimension error comprises the error of the cap surface radius and the cap body height of the bottle cap; the thread deviation is the deviation of the number of threads in the bottle cap body; the deformation of the bottle cap comprises deformation of the cap body and deformation of the cap surface;
in a preferred embodiment, the bottle cap flaw detection module obtains bottle cap flaw data of the bottle cap in the following ways:
for the bottle cap size error, the cap surface and the bottle cap body graph of the bottle cap are respectively cut out from the top view and the side view of the bottle cap j by utilizing a computer vision technology, and the difference value between the radius of the cap surface graph and the radius of the cap surface standard graph and the difference value between the cap body height and the standard cap body height are calculated; the difference of the cover radius is marked as rgj, and the difference of the cover height is marked as hgj; marking the bottle cap size error coefficient as Gpj; wherein, the calculation formula of the bottle cap size error coefficient Gpj is as follows It will be appreciated that since the cap height is generally greater than the cap radius than the finish area, in order to cope with errorsThe dimensions are balanced, and the difference value of the radius of the cover surface and the difference value of the height of the cover body are calculated by using different orders of magnitude respectively;
for the thread deviation, collecting pictures in a plurality of bottle cap bodies in advance, and training a neural network model for identifying the number of threads according to the pictures in the cap bodies; taking the bottom view of the bottle cap body to be detected as the input of the neural network model, and outputting the number of threads in the bottle cap body; the screw deviation coefficient is the absolute value of the difference value between the detection value of the number of threads in the bottle cap body and the standard number of threads; marking the thread deviation coefficient as Glj;
for deformation of the bottle cap, cutting out the cover surface shape from the top view of the bottle cap, comparing the cover surface shape with a standard cover surface design drawing, and calculating an area difference boj between the area of the cover surface shape and the area of the standard cover surface design drawing; cutting out the shape of the cover body from the side view of the bottle cover, comparing the shape of the cover body with a standard cover body design drawing, and calculating the area difference boj between the shape of the cover body and the standard cover body design drawing; calculating a bottle cap deformation error coefficient Gxj; wherein, the calculation formula of the deformation error coefficient Gxj of the bottle cap is as follows
The bottle cap flaw detection module sends detected bottle cap flaw data to the comprehensive evaluation module;
the comprehensive evaluation module is mainly used for judging whether to generate a destruction mark for the bottle body according to the bottle body flaw data and judging whether to generate the destruction mark for the bottle cover according to the bottle cover flaw data; counting the number of destroying marks on the bottle body and the number of destroying marks on the bottle cap, and performing fault investigation and quality detection on the production process of the bottle body or the bottle cap according to the number of destroying marks on the bottle body and the number of destroying marks on the bottle cap;
in a preferred embodiment, the comprehensive evaluation module performs fault detection and quality detection on the production process of the bottle body or the bottle cap, and the method comprises the following steps of:
step S1: the first comprehensive evaluation coefficient Zsi of each bottle i is calculated, wherein the calculation formula of the first comprehensive evaluation coefficient Zsi of the bottle i is as follows: zsi =α×spi+β×sxi+γ×sfi; wherein alpha, beta and gamma are preset proportional coefficients;
step S2: calculating a second comprehensive evaluation coefficient Zgj of each bottle cap j; the calculation formula of the second comprehensive evaluation coefficient Zgj of the bottle cap j is as follows: zgj =δ Gpj +epsilon Glj + ∈ Gxj; wherein delta, epsilon and epsilon are preset proportional coefficients;
step S3: setting a flaw threshold Xs of the bottle body and a flaw threshold Xg of the bottle cap in advance according to actual experience; generating a destruction mark for a bottle body with a first comprehensive evaluation coefficient Zsi greater than a flaw threshold value Xs of the bottle body and a bottle cap with a second comprehensive evaluation coefficient Zgj greater than a flaw threshold value Xg of the bottle cap;
step S4: for the bottle body and the bottle cap with the destruction mark, acquiring production process data of each bottle body and each bottle cap, and acquiring a production equipment number or a production container number of each production process of the bottle body and the bottle cap according to the production process data; calculating the proportion of the number of times of each production equipment number or production container number in the bottle body or the bottle cap with the destruction mark; sorting according to the specific gravity from big to small; and respectively storing the production equipment or production container numbers of the bottle bodies in a collection Vs in sequence; sequentially storing the numbers of production equipment or production containers of the bottle caps in a set Vg;
step S5: the method comprises the steps of marking the number of bottle bodies with destruction marks as Ys, marking the number of bottle caps with destruction marks as Yg, marking the number of total bottle bodies as Ts, and marking the number of total bottle caps as Tg; presetting a bottle body production fault threshold value Qs, a bottle cap production fault threshold value Qg and a production quantity difference threshold value Qd;
if it isThe method includes the steps that if the number of the bottles with destruction marks exceeds a certain threshold value and faults possibly occur in the production process of the bottles, fault troubleshooting is conducted on production equipment or production containers of the bottles according to the number sequence in a set Vs;
similarly, ifPerforming fault investigation on production equipment or production containers of the bottle caps according to the number sequence in the set Vg;
if (Ts-Ys) - (Tg-Yg) > Qd, the quantity of the produced qualified bottles is far greater than the quantity of the bottle caps, quality inspection is required in the production process of the bottles, and quality inspection is performed on production equipment or production containers of the bottles according to the number sequence in the set Vs;
similarly, if (Tg-Yg) - (Ts-Ys) > Qd, quality detection is performed on the bottle cap production equipment or production containers according to the number sequence in the set Vg.
Example two
As shown in fig. 2, the method for detecting bottle defects according to the present embodiment includes the following steps:
step one: the production data collection module collects production process data of each medicine bottle before flaw detection; the production process data are all production links of the bottle body and the bottle cap of each medicine bottle in the production stage, the numbers of production machines or production containers used in each link and the production time;
step two: the medicine bottle data collection module collects image data of the bottle body and the bottle cap of each medicine bottle in real time, and three-view images of the medicine bottle body and the bottle cap are captured by utilizing the image acquisition equipment;
step three: the bottle flaw detection module detects flaws of the bottle according to the bottle image, and calculates a size error coefficient of the bottle, a bottle shape error coefficient and a flash flaw coefficient;
step four: the bottle cap flaw detection module detects flaws on the bottle cap according to the bottle cap image, and obtains a bottle cap size error coefficient, a thread deviation coefficient and a bottle cap deformation error coefficient of the bottle cap;
step five: the comprehensive evaluation module generates destruction marks for part of bottles or bottle caps according to the bottle defect data and the bottle cap defect data, and performs fault investigation and quality detection on the production process of the bottles or the bottle caps according to the number of the destruction marks of the bottles to be detected and the number of the destruction marks of the bottle caps to be detected so as to achieve the purposes of reducing the destruction number of the bottles or the bottle caps and improving the yield.
The above embodiments are only for illustrating the technical method of the present invention and not for limiting the same, and it should be understood by those skilled in the art that the technical method of the present invention may be modified or substituted without departing from the spirit and scope of the technical method of the present invention.

Claims (8)

1. The bottle defect detection system is characterized by comprising a production data collection module, a medicine bottle data collection module, a bottle defect detection module, a bottle cap defect detection module and a comprehensive evaluation module; wherein, each module is connected by an electric and/or wireless network mode;
the production data collection module collects production process data of each medicine bottle before flaw detection; the production process data of each medicine bottle is sent to a comprehensive evaluation module;
the medicine bottle data collection module collects image data of the bottle body and the bottle cap of each medicine bottle in real time, and captures three-view images of the medicine bottle body and the bottle cap by using the image acquisition equipment; the captured three-view images of the bottle body and the bottle cap are respectively sent to a bottle body flaw detection module and a bottle cap flaw detection module;
the bottle flaw detection module detects flaws of the bottle according to the bottle image, acquires bottle flaw data, and marks each bottle as i, i= {1,2,3, & gt, n }, wherein n is a bottle number value; the bottle defect data comprise a bottle size error coefficient, a bottle shape error coefficient and a flash defect coefficient; the bottle defect detection module sends bottle defect data to the comprehensive evaluation module;
the bottle cap flaw detection module detects flaws of the bottle cap according to the bottle cap image and acquires bottle cap flaw data of the bottle cap; the bottle cap flaw data comprise a bottle cap size error coefficient, a thread deviation coefficient and a bottle cap deformation error coefficient; each cap was labeled j, j= {1,2,3,..m }, in order, where m is the cap number value; transmitting the detected bottle cap flaw data to a comprehensive evaluation module;
the comprehensive evaluation module judges whether to generate a destruction mark for the bottle according to the bottle defect data and judges whether to generate the destruction mark for the bottle according to the bottle cap defect data; and counting the number of the destroying marks on the bottle body and the number of the destroying marks on the bottle cover, and performing fault investigation and quality detection on the production process of the bottle body or the bottle cover according to the number of the destroying marks on the bottle body and the number of the destroying marks on the bottle cover.
2. A bottle defect detection system according to claim 1, wherein the production process data are all production links that the body and the cap of each medicine bottle pass through in the production stage, the number of the production machine or the production container used in each link, and the production time.
3. The vial flaw detection system according to claim 1, wherein the vial data collection module collects image data of the vial body and the vial cap of each vial in the following manner:
for the medicine bottle body, three-view capturing of the bottle body is respectively carried out in the directions perpendicular to the bottle mouth, the bottle body and the bottle bottom by using an image capturing device arranged in a bottle inspection machine;
for the medicine bottle cap, three-view capturing of the bottle cap is performed in directions perpendicular to the front face, the body and the back face of the bottle cap respectively using an image capturing device installed in the cap inspection machine.
4. A bottle defect detection system as set forth in claim 3 wherein the three views are top, side and bottom views, respectively.
5. The bottle defect detection system of claim 1, wherein the bottle defect detection module performs defect detection on the bottle in the following manner:
for dimensional error flaws of bottle bodies, computer vision technology is utilizedIntercepting a bottle body graph and a bottle mouth graph of a bottle body from the bottle body graph, and comparing the bottle body graph and the bottle mouth graph with a standard bottle body graph to obtain the difference value of the bottle body i and the standard bottle body on the bottle height, the outer diameter of the bottle body and the outer diameter of the bottle mouth; the bottle height difference value, the bottle body outer diameter difference value and the bottle mouth outer diameter difference value are respectively marked as hi, rbi and rmi; calculating a bottle size error coefficient Spi; the calculation formula of the bottle size error coefficient Spi is as follows:
for the bottle body shape, the shape of the bottle mouth is cut out from the top view of the bottle body, the bottle mouth shape is compared with a standard bottle mouth design drawing, and the area difference value of the bottle mouth shape and the standard bottle mouth design drawing is calculated; the shape of the bottle body is cut out from the side view of the bottle body, and the difference value between the area of the shape of the bottle body and the area of the standard bottle body design drawing is calculated; similarly, calculating the difference between the area of the bottle bottom shape and the area of the standard bottle bottom design drawing from the bottom view of the bottle body; marking the bottle mouth area difference value, the bottle body area difference value and the bottle bottom area difference value as ami, abi and aui respectively, and calculating a bottle shape error coefficient Sxi; wherein the calculation formula of the bottle shape error coefficient Sxi is that
For flash, collecting a plurality of bottle pictures with flash flaws and without flash flaws in advance, manually marking the severity of the flash on the bottle pictures, and training a multi-target recognition neural network model for recognizing the flash and the severity of the bottle according to the bottle pictures by taking the bottle pictures as input; inputting the three-view image of the bottle to be detected into the multi-target recognition neural network model, and outputting the three-view image to the bottleMarking the severity of the flash; setting a weight coefficient for the severity of each level of flash according to actual experience in advance; the flash level is marked as f, the weight coefficient corresponding to the flash level f is marked as wf, and the number of the flash levels f appearing in the bottle i is marked as nfi; calculating a flash flaw coefficient Sfi; wherein, the calculation formula of the flash flaw coefficient Sfi is sfi=ln (Σ) f (wf*nfi)+1)。
6. The vial defect detection system of claim 1, wherein the vial defect detection module obtains vial defect data by:
for the bottle cap size error, the cap surface and the bottle cap body graph of the bottle cap are respectively cut out from the top view and the side view of the bottle cap j by utilizing a computer vision technology, and the difference value between the radius of the cap surface graph and the radius of the cap surface standard graph and the difference value between the cap body height and the standard cap body height are calculated; the difference of the cover radius is marked as rgj, and the difference of the cover height is marked as hgj; marking the bottle cap size error coefficient as Gpj; wherein, the calculation formula of the bottle cap size error coefficient Gpj is as follows
For the thread deviation, collecting pictures in a plurality of bottle cap bodies in advance, and training a neural network model for identifying the number of threads according to the pictures in the cap bodies; taking the bottom view of the bottle cap body to be detected as the input of the neural network model, and outputting the number of threads in the bottle cap body; the screw deviation coefficient is the absolute value of the difference value between the detected value of the screw number in the bottle cap body and the standard screw number; marking the thread deviation coefficient as Glj;
for deformation of the bottle cap, cutting out the cap surface shape from the top view of the bottle cap, comparing the cap surface shape with a standard cap surface design drawing, and calculating the area difference between the cap surface shape and the standard cap surface design drawingValue bej; cutting out the shape of the cover body from the side view of the bottle cover, comparing the shape of the cover body with the shape of the standard cover body design drawing, and calculating the area difference boj between the shape of the cover body and the standard cover body design drawing; calculating a bottle cap deformation error coefficient Gxj; wherein, the calculation formula of the deformation error coefficient Gxj of the bottle cap is as follows
7. The bottle defect detection system of claim 1, wherein the comprehensive evaluation module performs troubleshooting and quality detection on the production process of the bottle or the bottle cap, comprising the steps of:
step S1: the first comprehensive evaluation coefficient Zsi of each bottle i is calculated, wherein the calculation formula of the first comprehensive evaluation coefficient Zsi of the bottle i is as follows: zsi =α×spi+β×sxi+γ×sfi; wherein alpha, beta and gamma are preset proportional coefficients;
step S2: calculating a second comprehensive evaluation coefficient Zgj of each bottle cap j; the calculation formula of the second comprehensive evaluation coefficient Zgj of the bottle cap j is as follows: zgj =δ Gpj +epsilon Glj + ∈ Gxj; wherein delta, epsilon and epsilon are preset proportional coefficients;
step S3: setting a flaw threshold Xs of the bottle body and a flaw threshold Xg of the bottle cap in advance according to actual experience; generating a destruction mark for a bottle body with a first comprehensive evaluation coefficient Zsi greater than a flaw threshold value Xs of the bottle body and a bottle cap with a second comprehensive evaluation coefficient Zgj greater than a flaw threshold value Xg of the bottle cap;
step S4: for the bottle body and the bottle cap which generate the destruction mark, acquiring production process data of each bottle body and each bottle cap, and acquiring a production equipment number or a production container number of each production process of the bottle body and the bottle cap according to the production process data; calculating the proportion of the number of times of each production equipment number or production container number in the bottle body or the bottle cap with the destruction mark; sorting according to the specific gravity from big to small; and respectively storing the production equipment or production container numbers of the bottle bodies in a collection Vs in sequence; sequentially storing the numbers of production equipment or production containers of the bottle caps in a set Vg;
step S5: the method comprises the steps of marking the number of bottle bodies with destruction marks as Ys, marking the number of bottle caps with destruction marks as Yg, marking the number of total bottle bodies as Ts, and marking the number of total bottle caps as Tg; presetting a bottle body production fault threshold value Qs, a bottle cap production fault threshold value Qg and a production quantity difference threshold value Qd;
if it isPerforming fault checking on the production equipment or the production containers of the bottle bodies according to the number sequence in the set Vs;
similarly, ifPerforming fault investigation on production equipment or production containers of the bottle caps according to the number sequence in the set Vg;
if (Ts-Ys) - (Tg-Yg) > Qd, quality detection is carried out on the production equipment or the production container of the bottle body according to the number sequence in the set Vs;
if (Tg-Yg) - (Ts-Ys) > Qd, quality detection is carried out on the production equipment or the production container of the bottle cap according to the number sequence in the set Vg.
8. A method of flaw detection for bottle flaw detection system according to any one of claims 1 to 7, comprising the steps of:
step one: the production data collection module collects production process data of each medicine bottle before flaw detection;
step two: the medicine bottle data collection module collects image data of the bottle body and the bottle cap of each medicine bottle in real time, and three-view images of the medicine bottle body and the bottle cap are captured by utilizing the image acquisition equipment;
step three: the bottle flaw detection module detects flaws of the bottle according to the bottle image, and calculates a size error coefficient of the bottle, a bottle shape error coefficient and a flash flaw coefficient;
step four: the bottle cap flaw detection module detects flaws on the bottle cap according to the bottle cap image, and obtains a bottle cap size error coefficient, a thread deviation coefficient and a bottle cap deformation error coefficient of the bottle cap;
step five: judging whether to generate a destruction mark for the bottle body according to the bottle body flaw data, and judging whether to generate the destruction mark for the bottle cover according to the bottle cover flaw data; and counting the number of the destroying marks on the bottle body and the number of the destroying marks on the bottle cover, and performing fault investigation and quality detection on the production process of the bottle body or the bottle cover according to the number of the destroying marks on the bottle body and the number of the destroying marks on the bottle cover.
CN202310595644.9A 2023-05-25 2023-05-25 Bottle defect detection system and method Active CN116858838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310595644.9A CN116858838B (en) 2023-05-25 2023-05-25 Bottle defect detection system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310595644.9A CN116858838B (en) 2023-05-25 2023-05-25 Bottle defect detection system and method

Publications (2)

Publication Number Publication Date
CN116858838A true CN116858838A (en) 2023-10-10
CN116858838B CN116858838B (en) 2024-03-19

Family

ID=88217824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310595644.9A Active CN116858838B (en) 2023-05-25 2023-05-25 Bottle defect detection system and method

Country Status (1)

Country Link
CN (1) CN116858838B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118333472A (en) * 2024-06-13 2024-07-12 江西艾丽斯日化有限公司 Skin care product production control method, system and equipment
CN118501063A (en) * 2024-07-19 2024-08-16 泸州启航科技有限公司 Bottle cap defect detection method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5045688A (en) * 1989-12-04 1991-09-03 Coors Brewing Company Method and apparatus for inspection of bottle thread having a unitary image plane
CN102095733A (en) * 2011-03-02 2011-06-15 上海大学 Machine vision-based intelligent detection method for surface defect of bottle cap
CN103718025A (en) * 2011-08-03 2014-04-09 东洋玻璃株式会社 Container mouth portion inspection method and device
JP2021156832A (en) * 2020-03-30 2021-10-07 ユニバーサル製缶株式会社 Method and device for inspecting screw part of bottle can
CN115035092A (en) * 2022-07-01 2022-09-09 心鉴智控(深圳)科技有限公司 Image-based bottle detection method, device, equipment and storage medium
CN115272234A (en) * 2022-07-29 2022-11-01 烟台海维软件科技有限公司 Bottle cap quality detection method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5045688A (en) * 1989-12-04 1991-09-03 Coors Brewing Company Method and apparatus for inspection of bottle thread having a unitary image plane
CN102095733A (en) * 2011-03-02 2011-06-15 上海大学 Machine vision-based intelligent detection method for surface defect of bottle cap
CN103718025A (en) * 2011-08-03 2014-04-09 东洋玻璃株式会社 Container mouth portion inspection method and device
JP2021156832A (en) * 2020-03-30 2021-10-07 ユニバーサル製缶株式会社 Method and device for inspecting screw part of bottle can
CN115035092A (en) * 2022-07-01 2022-09-09 心鉴智控(深圳)科技有限公司 Image-based bottle detection method, device, equipment and storage medium
CN115272234A (en) * 2022-07-29 2022-11-01 烟台海维软件科技有限公司 Bottle cap quality detection method and device, computer equipment and storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
WENJU ZHOU 等: "A sparse representation based fast detection method for surface defect detection of bottle caps", 《NEUROCOMPUTING》, vol. 123, pages 406 - 414, XP028757363, DOI: 10.1016/j.neucom.2013.07.038 *
岳昊 等: "基于机器视觉的医用塑料瓶瓶口检测系统研究", 《智能计算机与应用》, vol. 8, no. 5, pages 31 - 33 *
朱庆港: "基于机器视觉的酒瓶瑕疵检测系统研究及应用", 《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》, no. 1, pages 9 - 68 *
杨梦瑶: "陶瓷药瓶缺陷检测及尺寸测量技术的研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》, no. 2, pages 9 - 64 *
罗时光: "基于机器视觉的玻璃瓶口缺陷检测方法", 《包装工程》, vol. 39, no. 3, pages 183 - 187 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118333472A (en) * 2024-06-13 2024-07-12 江西艾丽斯日化有限公司 Skin care product production control method, system and equipment
CN118501063A (en) * 2024-07-19 2024-08-16 泸州启航科技有限公司 Bottle cap defect detection method and system

Also Published As

Publication number Publication date
CN116858838B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN116858838B (en) Bottle defect detection system and method
JP2583146B2 (en) Top cleanliness inspection method
CN106934800B (en) Metal plate strip surface defect detection method and device based on YOLO9000 network
CN117115147B (en) Textile detection method and system based on machine vision
CN111080622A (en) Neural network training method, workpiece surface defect classification and detection method and device
CN109308700A (en) A kind of visual identity defect inspection method based on printed matter character
CN107966454A (en) A kind of end plug defect detecting device and detection method based on FPGA
CN111696077A (en) Wafer defect detection method based on wafer Det network
CN110570422B (en) Capsule defect visual detection method based on matrix analysis
CN112070135A (en) Power equipment image detection method and device, power equipment and storage medium
CN111487250A (en) Intelligent visual detection method and system applied to injection molding defective product detection
CN105251707A (en) Defective goods eliminating and sorting device based on medical infusion visible impurity detecting system
US20230022631A1 (en) Method and apparatus for analyzing a product, training method, system, computer program, and computer-readable storage medium
CN117169282B (en) Quality detection method and system of composite film for medicine packaging
TW202127014A (en) Intelligent Production Line Monitoring System and Implementation Method Thereof
KR20210122429A (en) Method and System for Artificial Intelligence based Quality Inspection in Manufacturing Process using Machine Vision Deep Learning
CN115035092A (en) Image-based bottle detection method, device, equipment and storage medium
CN115184228B (en) Security situation sensing method and system based on machine learning
CN112756840A (en) Welding quality detection system
CN111415339A (en) Image defect detection method for complex texture industrial product
CN112733676A (en) Method for detecting and identifying garbage in elevator based on deep learning
CN115019294A (en) Pointer instrument reading identification method and system
CN110335242A (en) A kind of tire X-ray defect detection method based on multi-model fusion
CN117314829A (en) Industrial part quality inspection method and system based on computer vision
CN115937555A (en) Industrial defect detection algorithm based on standardized flow model

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