Automated Real-time Vision Quality Inspection Monitoring System

ABSTRACT


INTRODUCTION
In recent year, visual inspection system has been improved from manual inspection to an automated system in a bottle manufacturing quality control.Product quality inspection is the main process to inspect the quality of the product in order to satisfy customer demand in the market.Visual inspection is applied on machine vision as a sub-item to the whole system.However, the contribution of the visual inspection in manufacturing field is very high.The use of automatic visual inspection is recommended due to the factor likes fatigue, boredom, mood and sickness that may arise using manual inspection [2,3].Moreover, some applications required specific skills that need a human inspector to attend a training scheme.Using human as an instructor is limited to a safe environment and cause disadvantage if some of the task need to be done in dangerous and conducive place [1].
Nowadays, the visual inspection system is widely used in industry because its provide shorter time and consistent in inspecting the product.Visual inspection technology has improved quality product and management of industry.It provides a good competitive to industries that work on this technology [4].The technique of automated visual inspection has a broadly applied foreground in the most modern automatic inspection of product quality [5].This method uses integrated technology of image processing, exactitude measure, pattern recognition and artificial intelligence to classify the product quality.As a result, an Small and Medium Enterprise (SME) is a growing company and has improved time by time.However, SME uses small cost to manufacture their product [6].Due to the limitation of costs, lots of SME still used manual inspection in their quality inspection process.Therefore, this paper is conducted to design an automated vision-based inspection of SME beverage products that implements an image processing technique for the detection and classification of color concentration and water level.The information is gathered from camera vision system for conducting real-time acquisition throughout a conveyer system.
The conditions of the beverage product, either pass or reject are classified from the proposed quadratic distance classifier technique.This technique is calculated classes of an object by a quadratic surface.A quadratic distance classifier can estimate the parameters of each class independently using samples of one class only [7].Besides, high accuracy can be achieved when the differences between images reach to some extent.It also has high efficiency and easier numeric computation.
Visual Studio 2010 is applied to develop automated real-time inspection system.The quadratic distance classifier technique is implemented to inspect color concentration while rule-based classifier technique is used to inspect the level of the image.Performance verification is verified based on different color and level of the bottle image.An experimental result proves that proposed system is better with 100% accuracy achieved.
The remainders of the paper are arranged as follows.Section 2 elaborates the description of the proposed method that is used to the developed the system.Section 3 presents the experimental result.Section 4 concludes with a summary of this paper.Figure 1 shows the layout for an automation visual inspection system that uses a computer network.

RESEARCH METHOD
The color and level of quality inspection mainly employ a simple input device and software.Visual Studio software is chosen for the software development, as it provides a suitable graphical user interface.

Image Acquisition
Image acquisition is used to retrieve image from a hardware source.The webcam is used to capture the image of soft drink bottle as a sample image and conveyer is used to demo the system in real-time.Table 1 shows total samples images used for the experimental analysis.The total samples number are 205.

Image Acquisition
The framework analysis for color and level classification process is shown in Figure 2. The process is started by converting the sample images of red, green, blue (RGB) color model to hue, saturation, value (HSV) representations.This is because HSV color space is similar to the way in which humans perceive color and less complex in terms of hue and saturation [8].Only S component is taken to do the segmentation and thresholding process.Otsu' method and morphological operation are applied to segment the region of interest (ROI) area.Histogram analysis is performed to get the intensity distribution data.The RGB histogram is classified by using the quadratic distance classifier.

Pre-processing
Pre-processing is a process to normalize the image [9].The operation of the image is at the lowest level of abstraction.It is for both input and output of the image intensity.The aim of pre-processing is to improve the image intensity that suppresses unwanted distortion and enhances image features for further processing [10].

Otsu' Method
Otsu' method is applied after the pre-processing is conducted on the image.This method works by converting the image in a form of binary for computation process.The threshold image analysed using the Otsu' method is classified into two classes namely pixels and bi-modal histogram [11].From the calculation of ideal threshold, these two classes are separated and then the combine spread is minimized.

Morphological Operation
The morphological operation is a process used to correct the shape of the images.The operations of morphological are applied on the input image to create the same size of the image at the output.Each output image pixel is compared with the input image pixel of its neighbors.The choosing of the neighborhood size and shape makes the morphological operation is constructed.Morphological sensitivity is based on specific shapes in the input image.

Color Segmentation
The color segmentation often used for color and texture that retrieve from the image.It will separate an image into the certain part, which has similarity in the color information.The segmentation process is applied to segment an image into desired part which has a similar structure of the reference image [12].

Histogram Analysis
The histogram of an image is referred to the value of pixel intensity [13].A graph of the histogram shows the number of pixels in an image at each different intensity value.An 8-bit grayscale image is presented in 256 number of intensities pixels distribution.The histograms will take out the color of red, green and blue channels.

Color Classification
The quadratic distance technique is used to classify the two-color image.The color features are extracted by converting the image into a red, green and blue histogram in order to get the distribution data in the image.The image has been normalized to get the value from 0-1.Then, the red, green and blue histogram is divided into 10 bins and it is combined to become one RGB histogram which has 30 bins to distribute the data from the image. (1) Where P1(i) is reference image and P2(i) is the test image of the histogram bins.Figure 3 shows an example of the color process for the reference image.

Level Analysis
The level is inspected based on three conditions which are a level pass, level overfill, level underfill for the level classification process.There is two line that exists on the image which is red and blue.The red line is on the top of the white image while the blue line is on the bottom of the white image.This water level analysis will read the value of a white pixel that shows the height of the bottle.The pixel value of red line will subtract with the pixel value of blue line to get the height of the bottle.Then, the threshold value is set by Z.If the height value is greater than Z, it is overfilled.If less than Z, it is underfilled.If the value is Z, it is a pass.This condition of water level is shown in Figure 4 to Figure 6.

Hardware System
The hardware system includes python code, conveyer, an infrared sensor (IR), webcam and raspberry pi. Figure 7 shows the hardware system process to run the system.The system is started by key in the python code in raspberry pi to control the movement of conveyor [14,15].When the conveyor starts to run, the sensor will sense the bottle and automatically stop the DC motor.Next, the webcam will capture the image of the bottle and send to the Apache server.Then, the process is repeated again.The image that stored in Apache server will be processed after that.

Python Code
Python is a top programming language that is used with the Raspberry Pi to interact with the device [16].The code is simple and few of each line.The source code is freely available and open for modification and reuse.

Raspberry Pi
Raspberry Pi is the small physical size and a low-cost microcomputer that used to run Linux [17].It also is known as mini-computers and the function is limited compared to a personal computer.It consists WIFI and Bluetooth 4.1 or BLE module inside the board.The advantage of Raspberry Pi is low power consumption level.The pins that are used gpios, Vcc and ground ports or header.

Conveyor
A conveyor is a mechanical handling that used to move the bottle from one location to another.The DC motor is a part of conveyor component used to run the conveyor.The motor driver is used to take a lowcurrent control signal and amplify into a higher-current signal so that it can drive a motor.

Infrared Sensor Module
The infrared sensor (IR) module is an electronic instrument used to detect the presence of the bottle and stop the conveyor.The module helps the IR sensor to work more efficient and wider in term of usage.The sensor will send the data to raspberry pi for the next process.

Webcam
The Logitech C910 webcam is used because of its good image quality.The HD Pro C910 provides an excellent video recording with 30 frames per second to720p.Audio quality is equally clear and impressive.It also boasts 1080p with its new 5MP image sensor.

Apache Server
Apache is a well-known as a free source HTTP server entirely in C. Apache is an open source software available for free.It is also fast, reliable and secure.It can be highly modified to meet the requirement in many different environments by using extensions and modules.
Figure 8 shows the complete system of automated real-time vision quality inspection monitoring system.The connection of raspberry pi with IR sensor module is shown in Figure 9.

RESULTS AND ANALYSIS
Following are the results of the experiment that has been carried out.Figure 10 and Figure 11 shows the histogram distributions for the color intensity of reference and test image strawberry.The first bin histogram shows the background value of the image which is black image and the rest bins show the value of color images.The value from bin 2-10 is taken for analysis while the background image is ignored.These histograms are then combined into one variable for the classification process.This is shown in Figure 15 and Figure 16.The reference image, P1(i) and test image P2(i) of RGB histogram are calculated by using the quadratic distance formula as shown in Equation 1 to get distance value of two color images.This distance value will differentiate the color of two images.Graphical User Interface (GUI) is the last part that completing the system.The GUI is designed by meeting the criteria for the product quality inspection system.Figure 17 and Figure 18 show the completed GUI before and after running the system.Figure 19 shows the percentage of each sample image that is tested in the real-time system.The result shows the system has achieved 100% accuracy using 205 samples.

CONCLUSION
Automated vision inspection has become an important part of the quality monitoring process.This paper presents an automated real-time vision quality inspection monitoring system.The inspection is broadly determined into two categories which are color and level classification.Color classification introduces a quadratic distance technique to classify color of the beverage product based on the histogram analysis.In addition, the level is inspected using a rule-based technique by following three conditions which are a level pass, level overfill, and level underfill.Besides, raspberry pi is used to control IR sensor and DC motor at the system.The captured image is stored in the Apache server so that the image can be replaced at any time.The performance is verified based on the system accuracy to inspect colors and levels of the soft drink bottle.The results show this system can be used to classify color and level of the beverage product.Thus, this system has the ability to solve problems of quality control, especially for Small and Medium (SME) industries.

Figure 1 .
Figure 1.Layout for automated visual inspection system

Figure 3 .
Figure 3. Color process of reference image

Figure 8 .
Figure 8. Hardware system Figure 9. Raspberry pi and IR sensor module schematic diagram

Figure 10 .Figure 12 .Figure 14 .
Figure 10.RGB combines a graph of the reference image Figure 11.RGB combines a graph of the test image

Figure 15 .Figure 16 .
Figure 15.Combination of RGB histogram for reference image

Figure 17 .
Figure 17.GUI before running Figure 18.GUI after running

Table 1 .
Total Sample Image Automated Real-time Vision Quality Inspection Monitoring System (N.N. S. Abdul Rahman) 777