People have an increasing need for food, beverages, pharmaceuticals, and more. The industry’s demand for the use of automatic quality control is expanding day by day to increase the production speed and quantity of beverages. Inspection of bottles containing liquid and pharmaceutical substances includes:
- Liquid surface inspection in bottles
- Sealing of bottle caps
- Presence or absence of labels
Machine vision systems installed on production lines can detect various defects and errors, displaying them and removing defective products from the production line. These systems consist of essential components such as cameras, lighting, image processing software, and a monitor to display image processing results.
As you can see in the video, we have simulated liquid surface inspection in bottles using our machine vision system.
Quality Control of Bottle Liquid Surface with Image Processing
To inspect the liquid level in a bottle, we can use a machine vision system. In this system, if the liquid level is below a specified value, the bottle is rejected from the production line. As shown in the image, we have used the following equipment to simulate this system in our laboratory:
- Computer and image processing software
- Basler industrial camera, Dart model
- Delta PLC and alarm light
- Suitable light source
- Conveyor belt to simulate bottle movement
How the Liquid Surface Control System with Camera Works
The heart of machine vision systems is image processing software. We have used the Halcon application software. Halcon is connected to the camera via a USB cable and to the PLC via a network cable. In the image below, you can see the connection to the camera and PLC. The bottle moves in front of the camera on the conveyor belt. The camera continuously sends images of the liquid surface inside the bottle to Halcon; upon receiving the image, Halcon processes it in fractions of a second. The result of image processing is sent to the PLC, and the PLC sends a signal to turn on the corresponding light.
Hardware settings required for implementing various vision systems are covered in the comprehensive training course on machine vision.
Lighting and the Main Idea of Liquid Surface Inspection Program in Transparent Bottles
As you can see in the image, the use of back light improves the visibility of the liquid surface edge. When writing software code for liquid surface control, an acceptable range for the edge position in the image is defined. If the location of the edge in the received image is outside the specified range, the program indicates an error. The coding of this program is fully explained in the comprehensive training course on Halcon software.
Displaying Results in Liquid Level Inspection Software
The result of liquid surface processing is displayed on the bottle image with red and green rectangles. The red rectangle indicates the presence of an error, and the green rectangle indicates the acceptability of the liquid level. These results are sent to the PLC via a network cable. In the case of an error, the PLC turns on the red light; otherwise, the green light is turned on.
In the image above, the liquid level is below the acceptable range, so the red rectangle is displayed, and the red light is turned on. In the image below, the liquid level is within the acceptable range, so the green rectangle appears, and the green light is turned on.
Rejecting Empty Bottles with Image Processing on the Production Line
In the factory and on the production line, the PLC receives the results of liquid bottle image processing via a network cable. Instead of the alarm light based on the received signal, the section related to rejecting defective bottles is activated to remove defective bottles from the production line. In the image below, you can see a liquid bottle being ejected from the production line using a rejector.