Next Article in Journal
Analysis and Proposed Remedies for Power System Blackouts around the Globe
Previous Article in Journal
Sector-Wise Optimal Energy Demand Forecasting for a Developing Country Using LEAP Software
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Machine-Vision-Based Plastic Bottle Inspection for Quality Assurance †

1
Electrical and Computer Engineering Faculty, NED University of Engineering & Technology, Karachi 75270, Pakistan
2
Neurocomputational Lab, National Centre of Artificial Intelligence–NCAI, NED University of Engineering & Technology, Karachi 75270, Pakistan
*
Author to whom correspondence should be addressed.
Presented at the 7th International Electrical Engineering Conference, Karachi, Pakistan, 25–26 March 2022.
Eng. Proc. 2022, 20(1), 9; https://doi.org/10.3390/engproc2022020009
Published: 28 July 2022
(This article belongs to the Proceedings of The 7th International Electrical Engineering Conference)

Abstract

:
With the increasing utilization of plastic bottles in the fast-moving consumer goods industry, the efficiency and accuracy of the bottle defect inspection process becomes very important for quality assurance. Deep-learning-based inspection is accurate and robust, but at the same time data hogging and computationally expensive. Thus, it is not feasible for fast inspection. Therefore, this paper presents an efficient and fast machine-vision-based system for inspecting plastic bottle defects. The system is composed of a chamber which has a camera and illuminators to capture high-resolution images in controlled lighting conditions. Captured images are processed by using simple image processing techniques to identify multiple defects such as seated cap, dents on the body and label alignment on the plastic. The experimental results show that the proposed system is 95% accurate in determining a range of bottle defects. It is highly feasible for fast inspection and does not require high computation power and a large amount of training data.

1. Introduction

Quality assurance (QA) is very important in product development and thus it is necessary to prevent defects in manufactured products. It requires the thorough inspection of a product before its dispatch [1]. Currently, QA relies on manual inspection which is time consuming, error-prone and has integrity issues [2]. Alternately, automated systems become a viable solution for inspecting different product defects in an error-free way [3]. Many industries, such as fast-moving consumer goods (fmcg), textile, food and beverages, pharmaceuticals, etc., are now inclined to use such systems for quality inspection. The highly sensitive part of the manufacturing industry is the packaging of their products where bottles are mainly used for liquid products [4,5]. As they are non-fragile and light weight, plastic bottles are currently preferred to glass bottles. Thus, an automated inspection system for bottles is needed to detect defects without human intervention.
Bottle defect inspection techniques reported in the literature can be divided into two groups: deep-learning-based techniques [6,7,8,9,10] and simple image processing-based techniques [11,12,13,14,15]. Horputra et al. [6] utilized a deep learning model (Yolov3 and Inception-Resnet-v2) on 254 images to detect bottle cap defects. Zhang et al. [7] proposed using a method of selective mergence to carry out bottle defect detection, i.e., selecting a deep learning model with the highest detection accuracy. The training and testing of bottle caps was performed on 1736 images. Koodtalang et al. [8] proposed a convolutional neural networks (CNN) model to detect the glass bottom defects. Bahaghighat et al. [9] also proposed a CNN-based inspection of bottle cap defects. Defects were classified as normal cap, unfixed cap and no cap and the model was trained on 1200 images. Wang et al. [10] also tested a CNN model with residual block using 332 images.
All of the above deep-learning-based techniques are very accurate but at the expense of using computationally expensive algorithms and a large number of images for training and testing the models. Simple image processing-based machine vision is another approach reported by many researchers [11,12,13,14,15]. For glass bottle defect inspection, Fu et al. [11,12] proposed using image processing techniques (i.e., grayscale, binarization, morphological transformation, edge detection and threshold segmentation). Kumchoo et al. [13] proposed a cap inspection system for pharmaceutical bottles with 84% safety ring detection accuracy and 87% loose cap detection accuracy. Similarly, Xie et al. [14] detected the cap defect by the distance measurement of the support ring and cap with an accuracy of 99%. Saad et al. [15] detected the shape defects of glass bottles using image processing techniques (i.e., grayscale, threshold, morphological transforms) to extract image features. These features were then used as an input in the Naïve Bayes Classifier, which classified them on the basis of bottle shape.
For fast inspection applications, deep-learning-based techniques [6,7,8,9,10] are not feasible due to two main reasons: high computation power requirements and the need for a large number of images for model training. Therefore, simple image processing-based machine vision techniques [11,12,13,14,15] are good candidates for such applications. They can quickly and accurately detect most of the defects without requiring a large amount of data. However, most of them focused on a similar type of defect, mainly in glass bottles. With the increasing utilization of plastic bottles across industries, the plastic bottle defect inspection process has become very important. Therefore, this paper proposes an efficient and fast system for inspecting plastic bottle defects. The system identifies a range of plastic bottle defects by using simple image processing techniques with an overall accuracy of 95%, making it very suitable for fast industrial inspection. The rest of the paper is organized as follows: Section 2 discusses the proposed methodology and Section 3 and Section 4 present the results and conclusion, respectively.

2. Proposed Methodology

The proposed plastic bottle inspection system comprises a testbed as shown in Figure 1. It has a camera, illuminators and a rotating station. An autofocused camera is mounted on a flexible pod to adjust the camera height according to bottle size. Illuminators adjust the intensity of the light to obtain clear images in a controlled lighting environment. Finally, the rotating station is used for capturing images from different sides of the bottle by using a single camera. All acquired images are then fed to the image processing framework as shown in Figure 2. First, the region of interest (ROI) of the images is extracted and then passed to particular inspection processes. The results obtained by the inspection algorithms will decide to accept or reject the bottle. Inspection algorithms for caps, dents and labels are explained in detail below.

2.1. Cap Inspection

The proposed cap inspection algorithm identifies if a bottle cap is properly seated or not, as shown in Figure 3a. First, the ROI, composed of a blue cap from the upper portion of the bottle, is extracted by using hard threshold and binarization. Harris’ corner detector technique [16] is applied for detecting the corners of the cap. After detecting the corners, the reference line is drawn to join extreme corner points. The distance is calculated to distinguish whether the cap is seated or not by comparing the distance with known threshold value of the seated cap.

2.2. Dent Inspection

For dent detection, the image is first converted into a grayscale and then a gray-level co-occurrence matrix (GLCM) function with nine different gray levels was applied for enhancing dent region/s. Next, the image is converted into a binary form through pre-calculated hard thresholding in which white pixels represent the dent area and black pixels represent the no-dent area. Finally, the bounded box is created around the identified dented area by calculating the minimum and maximum values of the dented region, as shown in Figure 3b.

2.3. Label Inspection

Label alignment on the bottle is detected by checking the skewness of the label with respect to the perfectly aligned label on the bottle. First, the canny edge detector is deployed to obtain the strong edges of the label. Then, a full scan of the image is carried out to remove any unwanted pixels which may not constitute the edge. Distance between the minimum and maximum points on two edges of the label is calculated and compared with the un-defected label. If both are parallel, then the distance would be zero and the sticker is aligned, otherwise it is a misaligned label, as shown in Figure 3c.

3. Results

The proposed algorithm has been tested on multiple defected bottles to validate the results and check the accuracy of the proposed system. Table 1 illustrates the accuracy of the tested results. The cap defect detection algorithm has detected the defects correctly with no false detection. However, out of 20 bottles, the dent defect detection algorithm detects 18 defects correctly. Similarly, one false detection occurred for a label defect for an unlabeled bottle with no region to detect the label edges. Overall, the accuracy of the system is 95%. Table 2 compares our results with previously proposed algorithms [11,12,13,14,15] and shows that our algorithm is effective for a range of plastic bottle defects.

4. Conclusions

An automated defect inspection system for quality assurance is proposed for the plastic bottle manufacturing industry. This system inspects the most frequently occurring defects of the bottle by using machine vision. All these defects can be detected with highly advanced AI-based algorithms for more efficient results, but on the availability of a large amount of data and computation power. The proposed system is a portable and cost-efficient system which can be used in small industries without disturbing their production line. Furthermore, the system can be used by other large-scale industries for in-line product inspection by replacing its camera with high-speed industrial cameras and integrating fast processors.

Author Contributions

Conceptualization, M.K. and S.A.Q.; methodology, M.K., B.H. and H.R.K.; software, B.H.; validation, M.K. and B.H.; formal analysis, B.H. and H.R.K.; investigation, M.K. and S.A.Q.; resources, M.K., S.A.Q. and H.R.K.; data curation, H.R.K. and B.H.; writing—original draft preparation, B.H.; writing—review and editing, M.K.; visualization, M.K. and B.H.; supervision, S.A.Q. and M.K.; project administration, H.R.K. and M.K.; funding acquisition, M.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received Higher Education Commission (HEC) funding from the Technology Transfer Support Fund with Ref No. 20-TTSF-95/RGM/R&D/HEC/2020.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Galindo-Salcedo, M.; Pertúz-Moreno, A.; Guzmán-Castillo, S.; Gómez-Charris, Y.; Romero-Conrado, A.R. Smart manufacturing applications for inspection and quality assurance processes. Procedia Comput. Sci. 2022, 198, 536–541. [Google Scholar] [CrossRef]
  2. Teng, S.-A.; Chao, C.-J.; Teng, M.-N. A Human Factors Engineering Analysis of Waste Disposal Industry. In Proceedings of the 2019 IEEE 6th International Conference on Industrial Engineering and Applications (ICIEA), Tokyo, Japan, 12–15 April 2019; pp. 577–582. [Google Scholar] [CrossRef]
  3. Zhang, T.; Ding, B.; Zhao, X.; Liu, G.; Pang, Z. LearningADD: Machine learning based acoustic defect detection in factory automation. J. Manuf. Syst. 2021, 60, 48–58. [Google Scholar] [CrossRef]
  4. Abhijit, M.; Priya, S.S. Detecting faulty bottle caps using CNN model. In Proceedings of the 2021 2nd International Conference on Smart Electronics and Communication (ICOSEC), Trichy, India, 7–9 October 2021; pp. 1446–1452. [Google Scholar] [CrossRef]
  5. Bahaghighat, M.; Mirfattahi, M.; Akbari, L.; Babaie, M. Designing quality control system based on vision inspection in pharmaceutical product lines. In Proceedings of the 2018 International Conference on Computing, Mathematics and Engineering Technologies (iCoMET), Sukkur, Pakistan, 3–4 March 2018; pp. 1–4. [Google Scholar] [CrossRef]
  6. Arun, J.S.; George, J.; Jaya, J.; Janardhana, S.; Sabareesaan, K.J. Visual quality analysis of using computer aided inspection technique. In Proceedings of the 2013 International Conference on Current Trends in Engineering and Technology (ICCTET), Coimbatore, India, 3 July 2013; pp. 134–137. [Google Scholar] [CrossRef]
  7. Horputra, P.; Phrajonthong, R.; Kaewprapha, P. Deep Learning-Based Bottle Caps Inspection in Beverage Manufacturing and Packaging Process. In Proceedings of the 2021 9th International Electrical Engineering Congress (iEECON), Pattaya, Thailand, 10–12 March 2021; pp. 499–502. [Google Scholar] [CrossRef]
  8. Zhang, X.; Yan, L.; Yan, H. Defect detection of bottled liquor based on deep learning. In Proceedings of the CSAA/IET International Conference on Aircraft Utility Systems (AUS 2020), Online Conference, 18–21 September 2020; Volume 2020, pp. 1259–1264. [Google Scholar] [CrossRef]
  9. Koodtalang, W.; Sangsuwan, T.; Sukanna, S. Glass Bottle Bottom Inspection Based on Image Processing and Deep Learning. In Proceedings of the 2019 Research, Invention, and Innovation Congress (RI2C), Bangkok, Thailand, 11–13 December 2019; pp. 1–5. [Google Scholar] [CrossRef]
  10. Bahaghighat, M.; Abedini, F.; S’hoyan, M.; Molnar, A.-J. Vision Inspection of Bottle Caps in Drink Factories Using Convolutional Neural Networks. In Proceedings of the 2019 IEEE 15th International Conference on Intelligent Computer Communication and Processing (ICCP), Cluj-Napoca, Romania, 5–7 September 2019; pp. 381–385. [Google Scholar] [CrossRef]
  11. Wang, J.; Fu, P.; Gao, R.X. Machine vision intelligence for product defect inspection based on deep learning and Hough transform. J. Manuf. Syst. 2019, 51, 52–60. [Google Scholar] [CrossRef]
  12. Li, F.; Hang, Z.; Yu, G.; Wei, G.; Xinyu, C. The method for glass bottle defects detecting based on machine vision. In Proceedings of the 2017 29th Chinese Control Additionally, Decision Conference (CCDC), Chongqing, China, 28–30 May 2017; pp. 7618–7621. [Google Scholar] [CrossRef]
  13. Fu, L.; Zhang, S.; Gong, Y.; Huang, Q. Medicine Glass Bottle Defect Detection Based on Machine Vision. In Proceedings of the 2019 Chinese Control Additionally, Decision Conference (CCDC), Nanchang, China, 3–5 June 2019; pp. 5681–5685. [Google Scholar] [CrossRef]
  14. Kumchoo, W.; Chiracharit, W. Detection of loose cap and safety ring for pharmaceutical glass bottles. In Proceedings of the 2018 International ECTI Northern Section Conference on Electrical, Electronics, Computer and Telecommunications Engineering (ECTI-NCON), Chiang Rai, Thailand, 25–28 February 2018; pp. 125–130. [Google Scholar] [CrossRef]
  15. Xie, H.; Lu, F.; Ouyang, G.; Shang, X.; Zhao, Z. A rapid inspection method for encapsulating quality of PET bottles based on machine vision. In Proceedings of the 2017 3rd IEEE International Conference on Computer and Communications (ICCC), Chengdu, China, 13–16 December 2017; pp. 2025–2028. [Google Scholar] [CrossRef]
  16. Saad, N.M.; Rahman, N.N.S.A.; Abdullah, A.R.; Wahab, F.A. Shape defect detection for product quality inspection and monitoring system. In Proceedings of the 2017 4th International Conference on Electrical Engineering, Computer Science and Informatics (EECSI), Yogyakarta, Indonesia, 19–21 September 2017; pp. 1–6. [Google Scholar] [CrossRef]
Figure 1. Proposed testbed.
Figure 1. Proposed testbed.
Engproc 20 00009 g001
Figure 2. Proposed framework for inspection process.
Figure 2. Proposed framework for inspection process.
Engproc 20 00009 g002
Figure 3. Input and output images for the inspection of the (a) cap, (b) dent on body and (c) label.
Figure 3. Input and output images for the inspection of the (a) cap, (b) dent on body and (c) label.
Engproc 20 00009 g003
Table 1. Experimental results on the basis of proposed inspection algorithms.
Table 1. Experimental results on the basis of proposed inspection algorithms.
List of DefectsNo. of Defected BottlesCorrect
Detection
False
Detection
Accuracy
Cap Defect30300100%
Dent Defect2018290%
Label Defect1514193%
Table 2. Results comparison.
Table 2. Results comparison.
WorkProductDefectResults %Limitations
[11]Glass bottleCrack97.3%For glass bottle,
bottom surface only
[12]Glass bottleCrack96%For glass bottle,
mouth surface only
Missing edge
Dirt
[13]Glass bottleLoose Cap87%For glass bottle,
loose cap only
[14]Plastic bottlesLoose Cap99%For loose cap only
[15]Plastic bottlesShape of bottle100%For bottle shape only
Proposed WorkPlastic bottlesCap95%Inspects the complete bottle for multiple defects
Dent
Label
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Kazmi, M.; Hafeez, B.; Khan, H.R.; Qazi, S.A. Machine-Vision-Based Plastic Bottle Inspection for Quality Assurance. Eng. Proc. 2022, 20, 9. https://doi.org/10.3390/engproc2022020009

AMA Style

Kazmi M, Hafeez B, Khan HR, Qazi SA. Machine-Vision-Based Plastic Bottle Inspection for Quality Assurance. Engineering Proceedings. 2022; 20(1):9. https://doi.org/10.3390/engproc2022020009

Chicago/Turabian Style

Kazmi, Majida, Basra Hafeez, Hashim Raza Khan, and Saad Ahmed Qazi. 2022. "Machine-Vision-Based Plastic Bottle Inspection for Quality Assurance" Engineering Proceedings 20, no. 1: 9. https://doi.org/10.3390/engproc2022020009

Article Metrics

Back to TopTop