Design of a Glucose Solution Quality Inspection System Based on Machine Vision
2026-04-06 05:11:43··#1
Abstract : This paper proposes a glucose inspection system based on machine vision. The principle of visual inspection of glucose solutions and the hardware structure and working principle of the experimental device are introduced. The cooperation of the image grabber and CCD cameras and the software workflow are explained in detail. Keywords: Machine vision; glucose inspection; image grabber; CCD camera 1 Introduction With the development of industrial technology and the improvement of quality inspection standards, traditional quality inspection methods on high-speed pharmaceutical production lines are slow, and the quality of inspection is affected by human factors and the working environment, making it difficult to guarantee hygiene. To meet the requirements of modern quality control and process control, it is necessary to study more advanced inspection technologies to complete the quality inspection of pharmaceutical products. Machine vision technology has a wide range of applications in medicine. Many complex surgeries are performed with the assistance of machine vision, such as skin inspection, brain CT imaging, and visual surgery. In medicine, machine vision is also used in the detection of some pharmaceutical products and in some scientific research in medicine, such as glucose drug detection, chromosome detection, red blood cell detection, etc. [1]. In order to effectively solve the problem of real-time detection of products on modern pharmaceutical production lines, this paper designs a detection test system for the quality detection of glucose drug. The design goal is to use machine vision technology, multiple CCD cameras, special light sources, and industrial computers with high performance to replace manual labor and realize automatic detection of glucose quality. The design of this experimental system provides an effective basis for the development of a high-precision, high-speed intelligent automatic glucose detection device [2]. 2 Glucose detection process The production process of pharmaceutical glucose injection is shown in Figure 1. First, a glucose solution is obtained by adding a suitable proportion of distilled water to a high concentration of glucose. Then, the glucose solution is filled into a container that has been sterilized by high temperature and ultraviolet light for sealing. After packaging, the products undergo quality inspection. The main objects of inspection are: (1) suspended matter in the liquid, such as insoluble impurities and glass fibers; (2) defects in the bottle; (3) dirt on the bottle that has not been cleaned. [align=center] Figure 1 Glucose production process flow[/align] The traditional inspection method is manual inspection. The inspection workshop is set up in a separate darkroom. The glucose to be tested is placed on the production line manually. The speed of the production line is controlled by the inspection workers. When the medicine is delivered to the inspection workers, the workers take it out of the production line and judge whether the product quality is qualified under a special light box. Manual inspection has great drawbacks: 1) The speed of modern production lines is getting higher and higher, and manual inspection is difficult to meet the inspection speed of the production line; 2) Modern manufacturing emphasizes real-time, online, and non-contact inspection to ensure comprehensive control of the manufacturing process and improve production efficiency and product qualification rate, which traditional inspection methods cannot provide; 3) The manufacturing precision of modern products has greatly improved, requiring correspondingly high-precision inspection methods. 4) Traditional manual testing cannot consistently produce consistent results; there are differences between different testers; real-time process control is impossible; 5) Traditional testing cannot adapt to modern quality control and statistical process control (SPC). 3. Testing System Setup For tiny glass shards, rubber shards, or other insoluble particles in glucose solution, they generally settle at the bottom of the bottle or float at the top when stationary. Manual testing requires inverting the glucose solution to make the liquid move, which also moves the solid impurities. The impurities move with the solution to the central area, at which point the camera is triggered to capture a clear image of the defective product. Alternatively, the presence of impurities can be determined by judging the moving target. Based on this detection principle, this experimental system designs a high-speed rotating platform. The rotating platform can make the bottle rotate at high speed and then stop abruptly, thereby moving the impurities to the detection area. 3.1 The hardware structure of the platform is shown in Figure 2. The glucose bottle to be tested is clamped on the rotating bed. When the rotating bed rotates, it makes the bottle rotate at high speed. A dedicated LED light source for machine vision is installed in the light source box shown in the figure. The CCD camera transmits the captured image to the industrial control computer. The hardware platform is described in detail below. [align=center] Figure 2 Structure diagram of glucose impurity detection device[/align] (1) Handle: Turning the handle in the direction shown in the figure above can drive the bottle holder to move up and down to place the medicine bottle; (2) Motor: Ordinary AC motor, which drives the spindle of the rotating bed to rotate at high speed; (3) Upper bottle holder: Holds the glucose bottle on the base. When the handle is turned, the bottle holder moves up and down to facilitate the placement of the medicine bottle; (4) Light source box: A ring-shaped ultraviolet light source is placed in the light source box to irradiate the medicine body through the bottom of the bottle; (5) CCD camera: Responsible for shooting the moving medicine body; (6) Industrial control computer: Responsible for processing the image sequence captured by the CCD camera; 3.2 Working process (1) Turn the handle to lift the upper bottle holder up and place the glucose medicine bottle to be tested on the base; (2) Put down the handle and clamp it. Turn on the rotating bed. The spindle of the rotating bed drives the bottle holder to rotate at high speed. Due to the friction, the bottle holder drives the medicine bottle to rotate at high speed; (3) Stop the rotating bed, stop the bottle card from rotating, stop the glucose bottle from rotating, but the liquid continues to rotate under the action of inertia and then slowly stops; (4) During this process, take 7 images continuously, and identify the moving target in this sequence of motion images; (5) When the identified target exceeds the specified allowable index, the liquid in this bottle is judged to be unqualified. 3.3 Visual Imaging System Configuration The image acquisition part will complete the acquisition of motion images on the production line. The quality of the image acquired by the image acquisition part will directly affect the overall detection efficiency [3]. The image acquisition part is mainly completed by the CCD camera. The CCD camera captures the image signal, and the image acquisition card acquires the image signal. This experimental device uses two cameras in two directions to detect the object to be detected, one overhead position and one side position, and can perform multi-directional detection on some objects to be detected. The camera used is the TM6703 of Pulnix [4], and the acquisition card used is the Cornora2 of Matrox [5]. Matrox Corona II is an image controller manufactured by Matrox Graphics Inc. It can acquire component RGB signals of interlaced/progressive scanning and single/dual black and white analog video signals; 3-channel 10-bit A/D converter; 24-bit RS-422/LVDS digital interface; the acquisition rate reaches 30MHz in analog mode, 25MHz in RS-422 digital mode, and 40MHz in LVDS digital mode; it can connect 2 RGB or 6 analog black and white video signals; 32-bit/33MHz PCI bus master mode; real-time acquisition and storage on expansion board; it can simultaneously support analog VGA and independent digital VGA or TV output[4]. Pulnix's TM6703 is a 1/2-inch, 648*484, shutter speed of 1/60 to 1/32000 seconds, and also has an asynchronous reset function. When the VINIT pulse is activated, the camera's scan is reset to clear the CCD. When in asynchronous mode and under the influence of an external VINIT high-level signal, the asynchronous function will be automatically selected, and signal reading will be disabled until triggered. Below are the three modes of asynchronous camera reset: 1) External VINIT with pulse width control: Shutter speed is controlled by pulse width; 2) Fast internal trigger mode: When the falling edge of VINIT is the same as the external HD, signal acquisition has no delay; otherwise, there will be a delay of 0-1HD; 3) Slow internal trigger mode: Shutter speed can be selected from 1/250 to 1/2000 seconds. If the falling edge of VINIT and the external HD are the same, and integral charging is started, the camera discharges on the falling edge of VINIT. Output delay depends on the selected shutter speed. 4. Testing Procedure As the previous analysis shows, a high-speed rotating platform is required for glucose suspension detection. The operation procedure of the entire testing system is shown in Figure 3: First, the system is powered on, all equipment is initialized, and the parameters of the camera and acquisition card are configured according to the requirements of glucose suspension detection. Then, the rotating platform is started. The rotating platform rotates for 30 seconds, causing the glucose liquid to rotate at high speed. The rotating platform is stopped, and after a 10-second delay, the liquid slowly stops. At this time, the camera captures a sequence of images. 5. Innovations of this paper (1) This paper applies machine vision technology to the quality detection of glucose liquid, realizing non-contact detection. It has made significant improvements over traditional manual detection in terms of drug safety and detection accuracy. (2) This paper designs a rotating detection device based on the characteristics of impurities in glucose liquid. (3) A special visual imaging scheme is designed based on the characteristics of impurity detection in glucose liquid. [align=center] Figure 3 Glucose impurity detection process[/align] 6 References [1] Rafael C. Gonzalez, Richard E. Woods. Digital Image Processing (second Edition). Pubulishing House of Electronics Industry, Beijing. 2002. [2] Zheng Shicha, Mao Hanping, Hu Bo, et al. Extraction of morphological features in cotton disease identification by machine vision[J]. Microcomputer Information, 2007, 04-1: P290-292. [3] Wang Wei, Wang Yaonan, Li Shutao, et al. Development of a priori detection experimental platform based on machine vision. China Instrument and Meter, 2006, (4). 62-64. [4] Matrox Corona2 installation and hardware Reference[z]. Matrox Electronic Systems Ltd. April 23, 2001. [5] PULNIX TMC6703 Manual[z]. PULNIX America Inc. 2004.