CN102519972B - Detection method of PET bottle cap and liquid level - Google Patents
Detection method of PET bottle cap and liquid level Download PDFInfo
- Publication number
- CN102519972B CN102519972B CN201110413074.4A CN201110413074A CN102519972B CN 102519972 B CN102519972 B CN 102519972B CN 201110413074 A CN201110413074 A CN 201110413074A CN 102519972 B CN102519972 B CN 102519972B
- Authority
- CN
- China
- Prior art keywords
- image
- pet bottle
- carried out
- qualified
- liquid level
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
- Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)
Abstract
The invention discloses a detection method of a PET bottle cap and a liquid level. The method comprises steps of: segmenting an interested zone of an image and carrying out pretreatment on the image; carrying out segmentation on a PET bottle body and a background zone; carrying out PET bottle symmetry axis positioning on the image after the pretreatment; and carrying out detection according to the position of the symmetry axis and a line, which a PET bottle adapter ring is on, and coordinates of an adapter ring central point. The method of the invention can carry out real-time ongoing detection on PET bottle cap and liquid level defect on a high speed automatic production pipeline and realize high detection efficiency.
Description
Technical field
The invention belongs to industrial automation detection technique field, especially relate to a kind of method of the PET of detection bottle cap and liquid level, can in high-speed automated production line, to the defect of PET bottle cap and liquid level, carry out uninterrupted detection in real time.
Background technology
In the production run of present beer, beverage and medicine, all require container filling to meet corresponding quality standard, in the filling front and back of production, all to carry out strict test.Such as, for PET bottle, to detect bottle cap and whether liquid level exists defect, if bottle cap does not seal, may introduce foreign matter and cause food unhealthy; If bottle cap is jagged or crack, may cause eater injured; If liquid level is too high, may cause the blast of PET bottle under transportation or solar radiation; If liquid level is too low, may cause the disappearance of enterprise's overall image.
At present, the method and apparatus detecting for PET bottle is mainly divided into three classes: the detection of manual detection, sensor detection and computer vision.Manual detection is the method for traditional industrial detection, mainly by detection person, by visual inspection, detects each PET bottle and whether has defect, and the problem of existence has: verification and measurement ratio is low, and speed is slow, data statistics gather difficulty and cost high.It is to utilize various sensors to detect that sensor detects, and whether qualified such as utilizing X-ray line sensor to detect liquid level, the problem of existence has: be easily subject to the impact of external environment, system versatility is poor.Now the detection method of main flow is to utilize machine to replace human eye, and computer vision completes the detection of PET bottle, and this detection method speed is fast, and it is strong that data statistics gathers ability, and robustness is good.Early, Hai Fu, the Leiderkranz of Germany have carried out the research and development of oneself in external Computer Vision Detection starting, but due to external PET bottle uniform specification, detect comparatively simple, and domestic PET bottle is of a great variety, the versatility that therefore can not complete PET bottle detects, and expansibility is poor.Sun Huaiyuan has proposed a kind of detection algorithm of images match in < < computer utility and software > >, by extracting feature and the template image of PET bottle, compare, thereby complete classification and detection; Zou Zhenxing has realized the device of the embedded detection PET quality of FPGA in < < modern electronic technology > >, by analyzing the difference of adaptation ring and bottle cap top slope, detects PET bottle cap.But their algorithm complex is high, cannot meet the needs that detect PET bottle on Modern High-Speed production line, and verification and measurement ratio is inadequate, can not overcome the impact of body inclination, the shake of chain road, the body globule and burr.
Summary of the invention
Object of the present invention: the problem of avoiding prior art to exist, the PET bottle cap that provide a kind of and can carry out uninterruptedly in real time detecting on high-speed automated production line, verification and measurement ratio is high and the detection method of liquid level.
Technical scheme of the present invention is: comprise the following steps:
(1) to the PET bottle image input computing machine of taking, image is carried out to cutting apart of area-of-interest;
(2) area-of-interest is carried out to image pre-service, complete cutting apart of PET bottle bottle region and background area; The pretreated method of image is as follows: the first, entire image is carried out to ashing processing, and only retain the monochrome information of image; The second, the single channel image after ashing is carried out to filtering, make image border become clear; The 3rd, according to the grey level histogram of whole image, determine the threshold value of image binaryzation, and it is carried out to binary conversion treatment; The 4th, the image after binaryzation is carried out to connected domain analysis, establish the upper left corner and belong to background area, and the region of this regional connectivity all belongs to background, all the other regions are all PET bottle bottle part, complete cutting apart of PET bottle bottle region and background area;
(3) pretreated image is carried out to PET bottle axis of symmetry location; The method is: first, image is carried out to rim detection, obtain the point set of PET bottle image outline; Secondly, find m leftmost point and m rightmost point, ask for the average point in a corresponding m left and right; Again, according to Algorithm of fitting a straight line, estimate the position of axis of symmetry;
(4) according to the position of axis of symmetry, the coordinate of location PET bottle adaptation ring place straight line and adaptation ring central point; Method is as follows: first, correct the deviation angle of axis of symmetry, the number to the every row black picture element of image statistics after correcting; Secondly, the matrix of pixels statistics is carried out to smothing filtering; Again, determine that peaked position is the position of adaptation ring place straight line; Finally, find the coordinate of first black picture element from two side direction centers, the mean value of first black picture element position, the left and right sides is adaptation ring central point;
(5) detect the defect of PET bottle cap: first, according to the coordinate of adaptation ring central point, on PET bottle cap image, place the rectangle frame of i different sizes; Secondly, add up the number percent that black picture element in each rectangle frame accounts for whole pixels, in normality threshold interval, sentence this rectangle frame qualified; Finally, when all rectangle frames are qualified, PET bottle cap is qualified, there is no defect;
(6) detect the defect of PET bottle liquid level: first, according to the coordinate of adaptation ring central point, in the internal image of PET bottle bottle chamber, place the rectangle frame of j different sizes; Secondly, add up the number percent that black picture element in each rectangle frame accounts for whole pixels, in normality threshold interval, sentence this rectangle frame qualified; Finally, when all rectangle frames are qualified, PET bottle liquid level is qualified, there is no defect.
Beneficial effect of the present invention: the globule that 1, because the present invention is based on axis of symmetry technology for detection PET bottle cap and liquid level, can prevent that PET bottle body on mechanical chain road from tilting, adheres on PET bottle and burr are for the impact detecting; 2, according to location adaptation ring, obtain the position of the unique definite judgement rectangle frame of center point coordinate, can prevent that flating that PET bottle steadily do not cause in mechanical chain road is for the impact detecting; 3, adopted the mode of a plurality of judgement rectangle frame cascade, each judges that rectangle frame is as a Weak Classifier, and the strong classifier detection efficiency that so framework obtains is high, realizes simple; 4, the present invention can carry out uninterrupted detection in real time to the defect of PET bottle cap and liquid level in high-speed automated production line, and detection efficiency is high, and speed realizes soon and easily, and versatility is wide, is convenient to be transplanted in other environment and platform.
Accompanying drawing explanation
Fig. 1 is process chart of the present invention.
Embodiment
In conjunction with process chart of the present invention shown in Fig. 1, the invention will be further described, the present invention includes following steps:
Step (one): the PET bottle image input computing machine to taking, carries out cutting apart of area-of-interest to image.
Step (two): area-of-interest is carried out to image pre-service, complete cutting apart of PET bottle bottle region and background area.The pretreated method of image is as follows: first, entire image is carried out to ashing processing, only retain the monochrome information of image; Secondly, the single channel image after ashing is carried out to filtering, make image border become clear; Again, according to the grey level histogram of whole image, determine the threshold value of image binaryzation, and it is carried out to binary conversion treatment; Finally, the image after binaryzation is carried out to connected domain analysis, establish the upper left corner and belong to background area, all belong to background so with the region of this regional connectivity, all the other regions are all PET bottle bottle part, thereby have completed cutting apart of PET bottle bottle region and background area.
Step (three): pretreated image is carried out to PET bottle axis of symmetry location.Method is as follows: first, image is carried out to rim detection, obtain the point set of PET bottle image outline; Secondly, find m leftmost point and m rightmost point, ask for the average point in a corresponding m left and right; Again, according to Algorithm of fitting a straight line, estimate the position of axis of symmetry.
Step (four): according to the position of axis of symmetry, the coordinate of location PET bottle adaptation ring place straight line and adaptation ring central point.Method is as follows: first, the deviation angle of axis of symmetry is corrected the number to the every row black picture element of image statistics after correcting; Secondly, the matrix of pixels statistics is carried out to smothing filtering, prevent the impact of the globule and wild point; Again, determine that peaked position is the position of adaptation ring place straight line; Finally, find the coordinate of first black picture element from two side direction centers, the mean value of first black picture element position, the left and right sides is adaptation ring central point.
Step (five): detect PET bottle cap defect, method is as follows: first, place the rectangle frame of i different sizes according to the coordinate of adaptation ring central point on PET bottle cap image; Secondly, add up the number percent that black picture element in each rectangle frame accounts for whole pixels, in normality threshold interval, sentence this rectangle frame qualified; Finally, when and if only if all rectangle frames are qualified, PET bottle cap is qualified, there is no defect.
Step (six): detect PET bottle liquid level defect, method is as follows: first, place the rectangle frame of j different sizes according to the coordinate of adaptation ring central point in the internal image of PET bottle bottle chamber; Secondly, add up the number percent that black picture element in each rectangle frame accounts for whole pixels, in normality threshold interval, sentence this rectangle frame qualified; Finally, when and if only if all rectangle frames are qualified, PET bottle liquid level is qualified, there is no defect.
Claims (1)
1. a detection method for PET bottle cap and liquid level, is characterized in that, comprises the following steps:
(1) to the PET bottle image input computing machine of taking, image is carried out to cutting apart of area-of-interest;
(2) area-of-interest is carried out to image pre-service, complete cutting apart of PET bottle bottle region and background area; The pretreated method of image is as follows: the first, entire image is carried out to ashing processing, and only retain the monochrome information of image; The second, the single channel image after ashing is carried out to filtering, make image border become clear; The 3rd, according to the grey level histogram of whole image, determine the threshold value of image binaryzation, and it is carried out to binary conversion treatment; The 4th, the image after binaryzation is carried out to connected domain analysis, establish the upper left corner and belong to background area, and the region of this regional connectivity all belongs to background, all the other regions are all PET bottle bottle part, complete cutting apart of PET bottle bottle region and background area;
(3) pretreated image is carried out to PET bottle axis of symmetry location; Method is as follows: first, image is carried out to rim detection, obtain the point set of PET bottle image outline; Secondly, find m leftmost point and m rightmost point, ask for the average point in a corresponding m left and right; Again, according to Algorithm of fitting a straight line, estimate the position of axis of symmetry;
(4) according to the position of axis of symmetry, the coordinate of location PET bottle adaptation ring place straight line and adaptation ring central point; Method is as follows: first, correct the deviation angle of axis of symmetry, the number to the every row black picture element of image statistics after correcting; Secondly, the matrix of pixels statistics is carried out to smothing filtering; Again, determine that peaked position is the position of adaptation ring place straight line; Finally, find the coordinate of first black picture element from two side direction centers, the mean value of first black picture element position, the left and right sides is adaptation ring central point;
(5) detect the defect of PET bottle cap: first, according to the coordinate of adaptation ring central point, on PET bottle cap image, place the rectangle frame of i different sizes; Secondly, add up the number percent that black picture element in each rectangle frame accounts for whole pixels, in normality threshold interval, sentence this rectangle frame qualified; Finally, when and if only if all rectangle frames are qualified, PET bottle cap is qualified, there is no defect;
(6) detect the defect of PET bottle liquid level: first, according to the coordinate of adaptation ring central point, in the internal image of PET bottle bottle chamber, place the rectangle frame of j different sizes; Secondly, add up the number percent that black picture element in each rectangle frame accounts for whole pixels, in normality threshold interval, sentence this rectangle frame qualified; Finally, when and if only if all rectangle frames are qualified, PET bottle liquid level is qualified, there is no defect.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110413074.4A CN102519972B (en) | 2011-12-10 | 2011-12-10 | Detection method of PET bottle cap and liquid level |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110413074.4A CN102519972B (en) | 2011-12-10 | 2011-12-10 | Detection method of PET bottle cap and liquid level |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102519972A CN102519972A (en) | 2012-06-27 |
CN102519972B true CN102519972B (en) | 2014-04-16 |
Family
ID=46290962
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110413074.4A Active CN102519972B (en) | 2011-12-10 | 2011-12-10 | Detection method of PET bottle cap and liquid level |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102519972B (en) |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102854193A (en) * | 2012-08-30 | 2013-01-02 | 苏州天准精密技术有限公司 | Detection method and detection system used for image defect detection |
CN103258218B (en) * | 2013-05-28 | 2016-04-20 | 清华大学 | Masking-out detects skeleton generating method, device, defect inspection method and device |
CN103552712B (en) * | 2013-10-28 | 2015-06-03 | 中达电通股份有限公司 | Drug bottle cap installation in place detection method and device |
CN104764746B (en) * | 2014-01-06 | 2017-04-05 | 山东明佳包装检测科技有限公司 | A kind of detection method of comprehensive PET bottle lid anti-theft ring defect |
CN104181176B (en) * | 2014-08-14 | 2017-04-05 | 公安部第一研究所 | The method that liquid article automatic identification is carried out in X-ray wraps up image |
CN104528617B (en) * | 2014-12-10 | 2016-06-29 | 天津普达软件技术有限公司 | A kind of detect the method whether body liquid level meets fill requirement |
CN104700423A (en) * | 2015-03-27 | 2015-06-10 | 四川索牌科技股份有限公司 | Method and device for detecting bottle cap |
CN105301003A (en) * | 2015-11-05 | 2016-02-03 | 天津大学 | Method for detecting bottle cap surface production date based on machine vision |
CN105865570A (en) * | 2016-06-15 | 2016-08-17 | 天津大学 | Machine vision-based glass bottle liquid level detection method |
CN106370659B (en) * | 2016-08-17 | 2018-12-04 | 湘潭大学 | A kind of bottle body package quality visible detection method |
CN106546600B (en) * | 2016-10-26 | 2019-07-16 | 湖南大学 | A kind of PET bottle multi-orientation detection method and apparatus based on machine vision |
CN106778747A (en) * | 2016-12-28 | 2017-05-31 | 天津普达软件技术有限公司 | A kind of method for detecting packing box spray printing character position offset amount |
CN106651850A (en) * | 2016-12-28 | 2017-05-10 | 天津普达软件技术有限公司 | Method detecting whether packing box printed character position is qualified or not |
CN106651851A (en) * | 2016-12-28 | 2017-05-10 | 天津普达软件技术有限公司 | Unaccepted product rejecting method of packing carton spray printing characters out of bounds |
CN108759973B (en) * | 2018-04-28 | 2020-03-31 | 南京昊控软件技术有限公司 | Water level measuring method |
CN110686873B (en) * | 2018-06-20 | 2022-01-18 | 苏州巨佳电子科技有限公司 | Notebook computer rotating shaft quality detection device and method |
CN108982544B (en) * | 2018-06-20 | 2020-09-29 | 青岛联合创智科技有限公司 | Method for detecting defective parts of printed circuit board |
CN109325519A (en) * | 2018-08-20 | 2019-02-12 | 中国铁道科学研究院集团有限公司电子计算技术研究所 | Fault recognition method and device |
CN110132985A (en) * | 2019-05-30 | 2019-08-16 | 中国科学院长春光学精密机械与物理研究所 | Bottling liquid visible foreign matters detection method and its system based on low sparse decomposition of being lost |
CN112508852A (en) * | 2020-11-12 | 2021-03-16 | 深圳科瑞技术股份有限公司 | Method and system for detecting liquid level in liquid storage bottle |
CN113516702B (en) * | 2021-07-16 | 2022-04-08 | 中国科学院自动化研究所 | Method and system for detecting liquid level of automatic liquid preparation ampoule bottle and method for detecting proportion of liquid medicine |
CN114581653A (en) * | 2022-01-21 | 2022-06-03 | 北京信息科技大学 | Method, equipment, medium and product for detecting liquid level of microporous plate |
CN115457067B (en) * | 2022-11-09 | 2023-04-07 | 乐比(广州)健康产业有限公司 | Nose-clearing and refreshing medicine liquid level detection method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1715328A1 (en) * | 2005-04-18 | 2006-10-25 | Khs Ag | Inspection apparatus for inspecting sealed containers |
EP1558919B1 (en) * | 2002-10-25 | 2009-03-18 | Tiama | Method and device for the detection of surface defects on the finish of a transparent or translucent rotating container |
CN101806752A (en) * | 2010-03-12 | 2010-08-18 | 长沙图创机电科技有限公司 | Method and equipment for visual detection of visible foreign matters in bottled liquid medicine |
CN101858734B (en) * | 2010-05-19 | 2011-06-29 | 山东明佳包装检测科技有限公司 | Method for detecting PET bottleneck quality |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08122276A (en) * | 1994-10-19 | 1996-05-17 | Ishizuka Glass Co Ltd | Bottle mouth top face check method |
JPH1048139A (en) * | 1996-07-31 | 1998-02-20 | Mitsubishi Plastics Ind Ltd | End face inspecting instrument |
JP2004317184A (en) * | 2003-04-14 | 2004-11-11 | Shimadzu Corp | X-ray foreign matter inspection device |
-
2011
- 2011-12-10 CN CN201110413074.4A patent/CN102519972B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1558919B1 (en) * | 2002-10-25 | 2009-03-18 | Tiama | Method and device for the detection of surface defects on the finish of a transparent or translucent rotating container |
EP1715328A1 (en) * | 2005-04-18 | 2006-10-25 | Khs Ag | Inspection apparatus for inspecting sealed containers |
CN101806752A (en) * | 2010-03-12 | 2010-08-18 | 长沙图创机电科技有限公司 | Method and equipment for visual detection of visible foreign matters in bottled liquid medicine |
CN101858734B (en) * | 2010-05-19 | 2011-06-29 | 山东明佳包装检测科技有限公司 | Method for detecting PET bottleneck quality |
Non-Patent Citations (5)
Title |
---|
《基于直线拟合算法的PET瓶瓶盖检测方法》;郑云峰等;《计算机应用研究》;20111130;第28卷(第11期);全文 * |
JP特开2004-317184A 2004.11.11 |
JP特开平10-48139A 1998.02.20 |
JP特开平8-122276A 1996.05.17 |
郑云峰等.《基于直线拟合算法的PET瓶瓶盖检测方法》.《计算机应用研究》.2011,第28卷(第11期),全文. |
Also Published As
Publication number | Publication date |
---|---|
CN102519972A (en) | 2012-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102519972B (en) | Detection method of PET bottle cap and liquid level | |
CN110060237B (en) | Fault detection method, device, equipment and system | |
CN108896574B (en) | Bottled liquor impurity detection method and system based on machine vision | |
CN107966454A (en) | A kind of end plug defect detecting device and detection method based on FPGA | |
CN109308700A (en) | A kind of visual identity defect inspection method based on printed matter character | |
CN105403147B (en) | One kind being based on Embedded bottle embryo detection system and detection method | |
CN109324061B (en) | Burr detection device and method for lithium battery pole piece | |
Yazdi et al. | Feature extraction algorithm for fill level and cap inspection in bottling machine | |
CN111696077A (en) | Wafer defect detection method based on wafer Det network | |
CN101995223A (en) | Chip appearance detection method and system | |
CN102393906B (en) | Computer vision inspection technology-based method for rapid detection and extraction of two-dimensional code | |
CN104135660A (en) | Detection method of contamination of image pickup module and detection system | |
CN201707305U (en) | Inspection system for inspecting quality of container caps | |
CN111766245B (en) | Button cell negative electrode shell defect detection method based on machine vision | |
CN103439348A (en) | Remote controller key defect detection method based on difference image method | |
CN109187553A (en) | A kind of rotten egg online intelligent recognition method based on machine vision | |
CN107154042A (en) | A kind of seed-coating machine visible detection method and device | |
CN105005969B (en) | A kind of bill images alter detection method and system | |
CN106018422A (en) | Matching-based visual outline defect inspection system and method for specially-shaped stamping parts | |
CN110310275A (en) | A kind of chain conveyor defect inspection method based on image procossing | |
Pithadiya et al. | Comparison of optimal edge detection algorithms for liquid level inspection in bottles | |
CN107358270B (en) | Water seepage detection method and device for tunnel wall | |
CN103245676A (en) | Optics lens smudge detecting method | |
CN104700423A (en) | Method and device for detecting bottle cap | |
Wang et al. | Intelligent injection liquid particle inspection machine based on two-dimensional Tsallis Entropy with modified pulse-coupled neural networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |