Research on Defect Detection of The Liquid Bag of Bag Infusion Sets Based on Machine Vision


  • Qian Zhang
  • Kang Liu
  • Bo Huang



Machine vision, Liquid bag, Light experiment, Gamma correction.


Intravenous infusion often uses bag infusion devices for clinic treatment, and the liquid bag assembly is an essential component of the bag infusion device. This paper adopts a machine vision system to inspect the assembly quality of the pipeline and dosing interface of liquid bag assembly. We conduct in-depth research on the lighting method, image pre-processing, and defect detection algorithm of a vision system for two defects of pipeline missing and dosing interface missing. Moreover, we do a lighting experiment to detect transparent liquid bag assembly defects. Proposes an adaptive gamma correction library based on power function derivative calculation, and combines the cumulative histogram for adaptive gamma correction, which amplifies the image edge information, combined with the binarization of the OTSU, solves the image segmentation problem in this. Proposes an adaptive ROI region selection method and virtual linear scanning method to achieve the detection of two kinds of defects. The results show that the recognition rate of missing defects of the pipeline on the liquid bag assembly in the machine vision system reaches 100%.


Download data is not yet available.
<br data-mce-bogus="1"> <br data-mce-bogus="1">


Smith, M. L.; Smith, L. N.; Hansen, M. F., The quiet revolution in machine vision - a state-of-the-art survey paper, including historical review, perspectives, and future directions. Computers in Industry 2021, 130.

Liu, Z.; Qu, B., Machine vision based online detection of PCB defect. Microprocessors and Microsystems 2021, 82.

Zhang, T.; Zhang, C.; Wang, Y.; Zou, X.; Hu, T., A vision-based fusion method for defect detection of milling cutter spiral cutting edge. Measurement 2021, 177.

Galata, D. L.; Meszaros, L. A.; Kallai-Szabo, N.; Szabo, E.; Pataki, H.; Marosi, G.; Nagy, Z. K., Applications of machine vision in pharmaceutical technology: A review. Eur J Pharm Sci 2021, 159, 105717.

Ma, L.; Wu, X.; Li, Z., High-Precision Medicine Bottles Vision Online Inspection System and Classification Based on Multifeatures and Ensemble Learning via Independence Test. IEEE Transactions on Instrumentation and Measurement 2021, 70, 1-12.

Garosi, E.; Mazloumi, A.; Kalantari, R.; Vahedi, Z.; Shirzhiyan, Z., Design and ergonomic assessment of an infusion set connector tool used in nursing work. Appl Ergon 2019, 75, 91-98.

Ishii, A.; Mizuta, T.; Todo, S. In Detection of foreign substances mixed in a plastic bottle of medicinal solution using real-time video image processing, Pattern Recognition, 1998. Proceedings. Fourteenth International Conference on, 1998.

Li, Y. G.; Wang, Y. N.; Wang, W., Intelligent transfusion liquor inspector based on machine-vision. Opto-Electronic Engineering 2006, 33 (11), 69-74.

Ge, J.; Wang, Y.; Zhou, B.; Zhang, H., Intelligent foreign particle inspection machine for injection liquid examination based on modified pulse-coupled neural networks. Sensors (Basel) 2009, 9 (5), 3386-404.

Zhou, B. W., A Machine-Vision-Based Intelligent Inspection System for Pharmaceutical Injections. Robot 2009.

Wang, Y.; Ge, J.; Zhang, H.; Zhou, B., Intelligent injection liquid particle inspection machine based on two-dimensional Tsallis Entropy with modified pulse-coupled neural networks. Engineering Applications of Artificial Intelligence 2011, 24 (4), 625-637.

Yao, Q.; Wang, B. In Study of on-line inspection technique for foreign substance in Ampoule, International Conference on Artificial Intelligence, 2011.

Yang, S.; Wang, Y., On line detection and tracking method of foreign substances in ampoules in high-speed pharmaceutical lines. Chinese Journal of entific Instrument 2011, 32 (3), 488-494.

Ge, J.; Xie, S.; Wang, Y.; Liu, J.; Zhang, H.; Zhou, B.; Weng, F.; Ru, C.; Zhou, C.; Tan, M.; Sun, Y., A System for Automated Detection of Ampoule Injection Impurities. IEEE Transactions on Automation Science and Engineering 2017, 14 (2), 1119-1128.

Ren, Z.; Fang, F.; Yan, N.; Wu, Y., State of the Art in Defect Detection Based on Machine Vision. International Journal of Precision Engineering and Manufacturing-Green Technology 2021, 9 (2), 661-691.

Eshkevari, M.; Jahangoshai Rezaee, M.; Zarinbal, M.; Izadbakhsh, H., Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method. Journal of Manufacturing Processes 2021, 68, 973-989.

Ostu, N.; Nobuyuki, O.; Otsu, N., A thresholding selection method from gray level histogram. 1979.

Gonzalez;, R. C.; Woods, R. E., Digital Image Processing. 4nd ed. ed.; Pearson: Britain, 2017; p 854.

Jing, J.; Liu, S.; Wang, G.; Zhang, W.; Sun, C., Recent advances on image edge detection: A comprehensive review. Neurocomputing 2022, 503, 259-271.

Suzuki, S.; Be, K., Topological structural analysis of digitized binary images by border following. Computer Vision Graphics & Image Processing 1985, 30 (1), 32-46.

Zhang, T. Y.; Suen, C. Y., A fast parallel algorithm for thinning digital patterns. Comm Acm 1984, 27 (3), 236-239.

Han, J.; Song, L., An Improved Thinning Algorithm for Character Image. Journal of Computer-Aided Design & Computer Graphics 2013.




How to Cite

Zhang, Q., Liu, K., & Huang, B. (2023). Research on Defect Detection of The Liquid Bag of Bag Infusion Sets Based on Machine Vision. Academic Journal of Science and Technology, 5(3), 186–197.