SlideShare a Scribd company logo
1 of 11
Download to read offline
EPE 462 Industrial Machine Vision
Group Assignment
Title: Inspection System in Bottle of Medicine
Liquid in Production Line
Name : Ang Kok Wei (108467)
Lecturer: Prof. Mani Maran a/l Ratnam
Dr. Yen Kin Sam
Date of Submission: 11th
December 2013
School of Mechanical Engineering
Inspection System in Bottle of Medicine Liquid in
Production Line
K.W.Ang
School of Mechanical Engineering
Univeristi Sains Malaysia, 14300 Nibong Tebal, Penang, Malaysia
akw_90@hotmail.com
ABSTRACT
This paper presents the utilization of machine vision-based inspection system which is also
known as Automatic Optical Inspection (AOI) in doing the quality inspection of the medical
bottles. There are two inspections in this study, which are the water level of the medical liquid
and the presence of the cap. Inspection results performed on the samples have proven the
effectiveness & reliability of the algorithms in MATLAB software. With the aid of high
resolution camera in terms of image capture, proper scene constraints applications & further
image processing using MATLAB software, the quality & variety of the product can be easily
determined.
1.0 Introduction
In the medical industrial, the finish products are being inspected before packaging into the box.
The machine vision is known as a cost-effective, high repeatability & reliability system which
is suitable to be installed in this packaging line for inspection purposes. Nowadays, numerous
applications of machine vision technology have been applied into the manufacturing
environment. This paper shows a setup of inspection and classification system in the beverage bottle
production line, which the main tasks of the system, are to inspect the water level and to inspect the
bottle cap
Hui Shi and Wenyong Yu [1], has stated that to implementing a machine vision system,
several factors should be taken into consideration:
I. Product material
The texture of materials has to be carefully selected. Materials with high reflectivity
will increase the challenges faced during inspection process & further image processing.
II. Camera
The object focusing area & resolution of the camera should be taken into account as
well. This is to ensure that the image captured is clear enough during image acquisition
& at the same time shortening the image pre-processing time required as well as to
reduce the manufacturing lead time if possible.
III. The background of object
The background of the object being captured should be chosen properly to ensure that
the captured images will be easily differentiated from the foreground.
Duan et al. [2] present a machine vision based for beer bottle inspection. The method based on the
histogram of edge points is applied for real- time determination of the inspection area. For the defect
detection of bottle wall and bottle bottom, an algorithm based on local statistical characteristic is
proposed. In bottle finish inspection, two artificial neutral networks are used for low- level inspection
and high- level judgment, respectively. Inspection of beer bottle by human inspectors will result in a
low speed and efficiency because the whole inspection process is subjective and very tedious. Therefore,
as a replacement of human inspector, beer bottle inspector equipped with specific high speed image
capture and processing system enable the inspection done automatically and in high speed and accuracy.
Inspection algorithm presented in this paper is able to achieve high correct inspection rate both to
defective bottled and good ones. In addition, artificial neutral networks are adopted in bottle finish
inspection, which has proved to be very convenient for users to adjust the system for their specific
applications.
Ballard [3] mention that computer vision is the construction of explicit and meaningful descriptions of
physical objects from images. Machine vision also recognized as the integrated use of devices for non-
contact optical sensing and computing and decision processes to receive and interpret an image of a real
scene automatically.
According to Brosnan [4] computer vision is a rapid, economic, consistent and objective inspection
technique, which has expected into many diverse industries. Its speed and accuracy satisfy ever-
increasing production and quality requirements, hence aiding in the development of totally automated
processes. The adaption of computer vision for quality evaluation of processed foods is the area for the
greatest potential uptake of this technology, as analysis can be used on a standard requirement in already
automated controlled conditions.
Malamas [5], has state that they are two independent ways for classification are being proposed, one
is according to the inspection features of the industrial product or process involved while another one
is according to the inspection independent characteristic of the inspected product or process.
2.0 EXPERIMENTAL SETUP
2.1 Physical Setup of the Inspection and Classification System
The system consists of a CCD camera, a light field and light sources. The light field which is made a
white colour paper is used to provide a uniform light field as background for the system so that the
image captured can be produced easily. The light sources consist of 2 pendaflour lights. The distance
between the CCD camera and beverage is adjusted so that the beverage can be captured by the CCD
camera. The overall system setup are shown as Figure 1
Figure 1: Overall system setup
Light source
Light field
Specimen
USB 2.0
Webcamera
2.2 System Integration
In this experiment, the web camera is first used to capture the picture from a scene. The sensor inside
the camera isused to convert the optical signals (light) from the scene to analog electrical signals. Then,
the analog signal will convert to digital electrical signals and then store the data in the memory of the
frame grabber. The computer will read the data from the frame grabber memory through bus line and
store the data in computer memory. In this operation, light field illumination was used to capture the
bottle. The bottle is placed between the light box and camera. After that, the system operation was
controlled and integrated with a personal computer consist of MATLAB software. Input images from
the camera were sent to a frame grabber and processed by the software to detect image focus. The
operational schematic diagram of the system is shown in Figure 2.
Figure 2 : the schematic system of the sytem
3.0 Inspection implementation
3.1 The standard for algorithm
After the image had been capture, the image will be load into the personal computer. The Matlab
program is used to process the image in order to do the image processing. The goal of this inspection
system is to quality inspection of the water level and bottle cap. The system will reject either the water
level is within in standard and the missing of the cap. The standard has been capture and processed to
identify the specification of the specimen.
Figure 3: The standard image
Computer with
Matlab
WebcamSpecimenLight field
Light
source
3.2 Inspection Algorithm
3.2.1 Binarizing and filtering the image
The image is firstly displayed in white plane, as shown in Figure 4(a). This process is to
mitigate the effects of colour of the bottle on the gray values since the colours for the medecine
are black in colour & the cap is red in colour. The image is then undergone a morphological
operation to cancel out the noise, as shown as Figure 4(b). The white plane image is then being
binarized. From Figure 4 (c), it is clearly shown that the suitable threshold value is set at 90
which are 0.353 in Matlab ,as shown as Figure 4(d). After that, the image is inverting so that
the bottle is in colour and the different filtering process is used. This filtering process is used to
remove the unwanted noise by removes binary image of connected components (objects) that
have fewer than 8000 pixels, as shown as Figure 4(e).
(a) (b)
(c)
(d) (e)
Figure 4: (a) Image after using apply gray scale, (b) Image after noise cancelling, (c) Histogram of the
white plane image, (d) Binary image with threshold value of 90, (e) Image after inverting and
filtering.
3.2.2 Identify the water level
The standard of this medicine liquid is 28ml. In this case, the white area of the binary image becomes
an interest of study. The algorithm will identify white area correspond to the water level of the sample
by remove the cap, as shown in Figure 5.After that, 3 samples are used to determine the average area of
the white region in the binary image. The standard set is 8000 pixels which as shown at Table 1.Thus,
the area measured should have more than 8000 pixels which correspond to the acceptable water level
due to the noise.
Figure 5: Image after remove the cap
Sample Pixel number(pixel) Difference with the
standard (pixel)
Percentage of difference with
the standard (%)
1 32476 476 1.4875
2 32331 331 1.034375
3 34021 2021 6.315625
4 32000 - -
Table 1: Comparison with different sample of the medicine liquid level
3.2.3 Identifying Bottle Cap
The inspection needs to make sure that the bottle cap is attached on the bottle. The similar
algorithm that identifies the water level is applied to identify the bottle cap. However, the upper image
is cropped initially so that only the bottle cap area is inspected, as shown in Figue 6(a). The algorithm
will identify the bottle cap of the sample and compare it with the standard. 4 samples are used to
determine the average area of the white region in the binary image, which is shown in Figure 4(b), 4(c)
and 4(d). The standard set in this experiment is pixels which as shown at Table 2, with a tolerance of
5000 pixels to the standard. The tolerance is applied because some pixels of the image may be filtered
when removing the noise. Figure 5 shows the acceptable bottle cap while Figure 6 shows the missing
bottle cap. Since the comparison is done by comparing the area, the algorithm accepts the bottle with the
area more than 5000 pixels.
(a) (b)
(c)
(d) (e)
Figure 6: (a) Image after cropping, (b) Image after filtering, (c) Histogram of the white plane image,
(d)Image after binaries, (e) Image after inverting and remove noise
The standard of this medicines’ bottle is 1cm in height and 2.5 cm for the diameter. In this case, the
white area of the binary image becomes an interest of study. The algorithm will identify white area
correspond to the front area of the bottle, as shown in Figure 8(a).After that, 3 samples are used to
determine the average area of the white region in the binary image. The standard set is 5000 pixels
which as shown at Table 2.Thus, the area measured should have more than 5000 pixels which
correspond to the acceptable water level due to the noise., as shown in Figure 8.
Sample Pixel number(pixel) Difference with the
standard (pixel)
Percentage of difference with
the standard (%)
1 5103 103 2.06
2 5117 117 2.34
3 5034 34 0.68
4 5000 - -
Table 1: Comparison with different sample area of the cap
(a) (b)
Figure 8: Binary images of (a) acceptable bottle cap, (b) rejected bottle cap. The white area of image
corresponds to the bottle cap.
3.3 Flow of algorithm
The algorithm undergoes 4 important processes: Image Acquisition, Identify medicine liquid
Level, , Identify Bottle Cap and Display Inspection Result. The standard is set so that the unknown
beverage bottle can be identified. An unknown beverage bottle will be identified at the end of the
algorithm, whether it passes the inspection or is rejected at certain inspection. The flow chart of the
algorithm is shown as Figure 9.
Inspection of
medicine
Bottle
Production
Image Acquisition:
The image of the
water bottle is read
into the
program.
Identify the Water Level:
1. Converting the image into
green screen image
2. Thresholding the image into
binary image
3. Removing noise on the object
4. Removing noise on the
background
5. Measuring the water level of
the bottle
6. Comparing the water level
with standard
Identify the Bottle Cap:
1. Cropping the image
2. Thresholding the image into
binary image
3. Removing noise on the object
4. Removing noise on the
background
5. Measuring the bottle
6. Comparing the bottle cap with
standard
Show Result of the Inspection:
1. Water Level (Passed, Failed)
2. Bottle Cap (Passed, Failed)
3. Overall QC (Passed, Failed)
Water level >
32000 pixels
Bottle cap >
5000 pixels
Water level passed
& Bottle cap passed
Water level failed
Water level passed
Bottle cap passed
Bottle cap failed
End
Yes
No
Yes
No
Figure 9 : Algorithm for the process
4. RESULTS AND DISCUSSION
Computer vision has been widely used for inspection because it offer the potential to automate
manual grading practices and thus to standardize techniques and eliminate tedious inspection task. The
result presented hare demonstrate the ability of the integration of machine vision with MATLAB to
detect water level, bottle cap and water color. At first, the MATLAB code will detect the water level
then follow by the detection of the bottle cap. The MATLAB code was set in specific condition to
detect whether the liquid level of medicine is in within the standard and then detect bottle cap. Liquid
Level and bottle cap must fulfill the condition set at the MATLAB code, if not then the beverage bottle
will be rejected from the production line. 4 samples are tested in this experiment and the results are
shown in the Table 3. Only S1 is passed the inspection system. S2 failed the water level while S3 failed
the bottle cap. S4 failed both the bottle cap and water level. The test shows 100% feasibility of the
inspection system.
Picture Result Picture Result
Sample 1 Sample 2
Sample 3 Sample 4
Table 3: Result of the specimen test
5. CONCLUSION
The experiments done are success due to its high reliability and high accuracy. The feasibility of
the inspector is proved by inspecting the water level, presence of bottle cap and water colors. The
inspector is also able to inspect and differentiate both Cola and Syrup. So, there will be no mixing in
between these beverages. Furthermore, user can adjust the inspector to meet their requirements for
specific application. The Table 4 below summarizes the system that inspects the water level and bottle
cap.
6.0 Appendix
%%%%%%preprocessing %%%%%%%%%%%%
clc; clear all; close all;
file='bottle.jpg'; % declare the file
P1= imread(file);
figure, imshow(P1) % show the picture
I1=P1(:,:,3);
figure, imshow(I1)
I2=I1;
%filtering
strl=strel('diamond',5);
I3=imopen(I2,strl);
figure, imshow(I2)
I4=I3;
figure,imshow(I4)
figure, imhist(I4) % histogram used to find
the thresholding
%%%%%% segmentation %%%%%%%%%%%%%
%binarize
I5=im2bw(I4,0.349);
figure, imshow(I5);
%remove noise
F1=bwareaopen(I5, 500);
figure,imshow(F1)
F2=~F1;
F3=bwareaopen(F2, 1700);
figure, imshow(F3);
%Identify water level
F4 = bwareaopen(F3,8000); % removing the cap
Data1 = regionprops(F4); % measure the
properties of the white area
Water_Level = Data1.Area; % showing the pixel
area (by removing ;)
disp(['Area for the water is :
',Water_Level]);
%%%% feture extraction %%%%%%
%to find area
Water_Level = Data1.Area; %showing the pixel
area (by removing ;)
if(Water_Level>32000) % accept the water
level if the area > 32000
water_level_qc = 'Passed';
else
water_level_qc = 'Failed';
end;
%identify bottle cap
I6 = imcrop(I1,[130 10 420 120]); % cropping
the image
figure,imshow(I6)
%filtering
str2=strel('diamond',5);
I7=imopen(I6,str2);
figure, imshow(I7)
figure, imhist(I7) % histogram used to find
the thresholding
%binarize
I8 = im2bw(I6,0.349); % thresholding at 0.349
into binary image
figure,imshow(I8)
%remove noise
F4=bwareaopen(I8, 500);
figure,imshow(F4)
F5=~F4;
F6=bwareaopen(F5, 1700);
figure, imshow(F6);
%to find area
Data2 = regionprops(F6); % measure properties
of the white area
Cap = Data2.Area; % showing the pixel area
if(Cap>5000) % there is cap if area is > 5000
bottle_cap_qc = 'Passed';
else
bottle_cap_qc = 'Missing';
end;
%Display result
if ((Water_Level>32000)&&(Cap>500)) % passed
if correct water level & cap
qc = 'Passed';
else
qc = 'Rejected';
end;
[pathstr, name, ext] = fileparts(file); %
define the file parts
disp(['Specimen number : ',name]); % display
the specimen name
disp(['Water Level : ',water_level_qc]);%
display water level result
disp(['Bottle Cap : ',bottle_cap_qc]); %
display bottle cap result
disp(['Overall : ',qc]); % show the result of
inspection
7.0 References
[1] Hui Shi and Wenyong Yu (2011), "High speed web printing inspection with multiple linear
cameras", Proc. SPIE 8006, 800624; doi:10.1117/12.901868.
[2] Duan, F, A machine vision inspector for beer bottle. Engineering Applications of Artificial
Intelligence, 2007. 20(7): p. 1013-1021.
[3] Ballard, D.A., & Brown, C.M. (1982). computer vision. Englewood cliffs, NJ, USA: Prentice-Hall
[4] Brosnan, T. and D.-W. Sun, Inspection and grading of agricultural and food products by
computer vision systems—a review. Computers and Electronics in Agriculture, 2002. 36(2-3): p.193-213.
[5] Malamas, E.N, “A survey on industrial vision systems, applications and tools”, Image and
Vision Computing, 2003. 21(2): p. 171-188.

More Related Content

Viewers also liked

INDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finl
INDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finlINDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finl
INDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finlanil badiger
 
Machine Vision applications development in MatLab
Machine Vision applications development in MatLabMachine Vision applications development in MatLab
Machine Vision applications development in MatLabSriram Emarose
 
Machine vision
Machine visionMachine vision
Machine visiondjehlke
 
Machine vision in food & beverages
Machine vision in food & beveragesMachine vision in food & beverages
Machine vision in food & beveragesAkshay Dhole
 
3d machine-vision-systems-paper-presentation
3d machine-vision-systems-paper-presentation3d machine-vision-systems-paper-presentation
3d machine-vision-systems-paper-presentationChidananda M
 
Fundamentals of Machine Vision
Fundamentals of Machine VisionFundamentals of Machine Vision
Fundamentals of Machine VisionPete Kepf, CVP
 
What is machine vision slide share
What is machine vision slide shareWhat is machine vision slide share
What is machine vision slide shareRitesh Kanjee
 
Machine vision systems ppt
Machine vision systems pptMachine vision systems ppt
Machine vision systems pptAkash Maurya
 
Emva 2011 Plenair Final Compact
Emva 2011 Plenair Final CompactEmva 2011 Plenair Final Compact
Emva 2011 Plenair Final CompactDickgoudriaan
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals Abdul Abbasi
 
Agrosaw Sorting grading line
Agrosaw Sorting grading lineAgrosaw Sorting grading line
Agrosaw Sorting grading lineSANJEEV SAGAR
 
Machine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting techniqueMachine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting techniqueAnudeep Badam
 
Application of image processing in material handling and (1)
Application of image processing in material handling and (1)Application of image processing in material handling and (1)
Application of image processing in material handling and (1)suyash dani
 
final year student mechanical project topics
final year student mechanical project topicsfinal year student mechanical project topics
final year student mechanical project topicsAbi Nesan
 
Automatic sorting machine (cpu)
Automatic sorting machine (cpu)Automatic sorting machine (cpu)
Automatic sorting machine (cpu)vishnucool
 
pick and place robotic arm
pick and place robotic armpick and place robotic arm
pick and place robotic armANJANA ANILKUMAR
 

Viewers also liked (20)

INDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finl
INDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finlINDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finl
INDUSTRIAL APPLICATION OF MACHINE VISION ppt mrng finl
 
Machine Vision applications development in MatLab
Machine Vision applications development in MatLabMachine Vision applications development in MatLab
Machine Vision applications development in MatLab
 
Machine vision
Machine visionMachine vision
Machine vision
 
Machine vision in food & beverages
Machine vision in food & beveragesMachine vision in food & beverages
Machine vision in food & beverages
 
3d machine-vision-systems-paper-presentation
3d machine-vision-systems-paper-presentation3d machine-vision-systems-paper-presentation
3d machine-vision-systems-paper-presentation
 
Fundamentals of Machine Vision
Fundamentals of Machine VisionFundamentals of Machine Vision
Fundamentals of Machine Vision
 
What is machine vision slide share
What is machine vision slide shareWhat is machine vision slide share
What is machine vision slide share
 
Machine vision systems ppt
Machine vision systems pptMachine vision systems ppt
Machine vision systems ppt
 
Luigy Bertaglia Bortolo - Poster Final
Luigy Bertaglia Bortolo - Poster FinalLuigy Bertaglia Bortolo - Poster Final
Luigy Bertaglia Bortolo - Poster Final
 
Emva 2011 Plenair Final Compact
Emva 2011 Plenair Final CompactEmva 2011 Plenair Final Compact
Emva 2011 Plenair Final Compact
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals
 
Agrosaw Sorting grading line
Agrosaw Sorting grading lineAgrosaw Sorting grading line
Agrosaw Sorting grading line
 
Mechatriks automation - Vision Inspection/Machine Vision System
Mechatriks automation - Vision Inspection/Machine Vision SystemMechatriks automation - Vision Inspection/Machine Vision System
Mechatriks automation - Vision Inspection/Machine Vision System
 
seminar presentation
seminar presentationseminar presentation
seminar presentation
 
Machine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting techniqueMachine learning application-automated fruit sorting technique
Machine learning application-automated fruit sorting technique
 
Application of image processing in material handling and (1)
Application of image processing in material handling and (1)Application of image processing in material handling and (1)
Application of image processing in material handling and (1)
 
final year student mechanical project topics
final year student mechanical project topicsfinal year student mechanical project topics
final year student mechanical project topics
 
Automatic sorting machine (cpu)
Automatic sorting machine (cpu)Automatic sorting machine (cpu)
Automatic sorting machine (cpu)
 
pick and place robotic arm
pick and place robotic armpick and place robotic arm
pick and place robotic arm
 
fundamentals of machine vision system
fundamentals of machine vision systemfundamentals of machine vision system
fundamentals of machine vision system
 

Similar to Machine vision project

Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...
Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...
Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...IJECEIAES
 
Identify Defects in Gears Using Digital Image Processing
Identify Defects in Gears Using Digital Image ProcessingIdentify Defects in Gears Using Digital Image Processing
Identify Defects in Gears Using Digital Image ProcessingIJERD Editor
 
Monitor and Quality Control for Automatic Production Line System
Monitor and Quality Control for Automatic Production Line SystemMonitor and Quality Control for Automatic Production Line System
Monitor and Quality Control for Automatic Production Line SystemIRJET Journal
 
A Novel Method to Improve Measurement Results of Flame Photometry Using Image...
A Novel Method to Improve Measurement Results of Flame Photometry Using Image...A Novel Method to Improve Measurement Results of Flame Photometry Using Image...
A Novel Method to Improve Measurement Results of Flame Photometry Using Image...CSCJournals
 
IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...
IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...
IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...IRJET Journal
 
Automation of DMPS Manufacturing by using LabView & PLC
Automation of DMPS Manufacturing by using LabView & PLCAutomation of DMPS Manufacturing by using LabView & PLC
Automation of DMPS Manufacturing by using LabView & PLCIJAAS Team
 
Automation of DMPS Manufacturing by Using LabView and PLC
Automation of DMPS Manufacturing by Using LabView  and PLC Automation of DMPS Manufacturing by Using LabView  and PLC
Automation of DMPS Manufacturing by Using LabView and PLC IJECEIAES
 
Industrial application of machine vision
Industrial application of machine visionIndustrial application of machine vision
Industrial application of machine visioneSAT Publishing House
 
Image processing based girth monitoring and recording system for rubber plant...
Image processing based girth monitoring and recording system for rubber plant...Image processing based girth monitoring and recording system for rubber plant...
Image processing based girth monitoring and recording system for rubber plant...sipij
 
IRJET- Spatial Clustering Method for Satellite Image Segmentation
IRJET-  	  Spatial Clustering Method for Satellite Image SegmentationIRJET-  	  Spatial Clustering Method for Satellite Image Segmentation
IRJET- Spatial Clustering Method for Satellite Image SegmentationIRJET Journal
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...cscpconf
 
Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...csandit
 
Human Identification from Palm/Dorsal Veins Using Auto encoders
Human Identification from Palm/Dorsal Veins Using Auto encodersHuman Identification from Palm/Dorsal Veins Using Auto encoders
Human Identification from Palm/Dorsal Veins Using Auto encodersIRJET Journal
 
IRJET - Object Identification in Steel Container through Thermal Image Pi...
IRJET -  	  Object Identification in Steel Container through Thermal Image Pi...IRJET -  	  Object Identification in Steel Container through Thermal Image Pi...
IRJET - Object Identification in Steel Container through Thermal Image Pi...IRJET Journal
 
Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...
Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...
Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...IJCI JOURNAL
 
PC-based Vision System for Operating Parameter Identification on a CNC Machine
PC-based Vision System for Operating Parameter Identification on a CNC MachinePC-based Vision System for Operating Parameter Identification on a CNC Machine
PC-based Vision System for Operating Parameter Identification on a CNC MachineIDES Editor
 
IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...
IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...
IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...IRJET Journal
 
APPLICATIONS OF MACHINE VISION
APPLICATIONS OF MACHINE VISIONAPPLICATIONS OF MACHINE VISION
APPLICATIONS OF MACHINE VISIONanil badiger
 
I0333043049
I0333043049I0333043049
I0333043049theijes
 

Similar to Machine vision project (20)

Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...
Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...
Shape and Level Bottles Detection Using Local Standard Deviation and Hough Tr...
 
Identify Defects in Gears Using Digital Image Processing
Identify Defects in Gears Using Digital Image ProcessingIdentify Defects in Gears Using Digital Image Processing
Identify Defects in Gears Using Digital Image Processing
 
Monitor and Quality Control for Automatic Production Line System
Monitor and Quality Control for Automatic Production Line SystemMonitor and Quality Control for Automatic Production Line System
Monitor and Quality Control for Automatic Production Line System
 
A Novel Method to Improve Measurement Results of Flame Photometry Using Image...
A Novel Method to Improve Measurement Results of Flame Photometry Using Image...A Novel Method to Improve Measurement Results of Flame Photometry Using Image...
A Novel Method to Improve Measurement Results of Flame Photometry Using Image...
 
IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...
IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...
IRJET - Traffic Density Estimation by Counting Vehicles using Aggregate Chann...
 
Automation of DMPS Manufacturing by using LabView & PLC
Automation of DMPS Manufacturing by using LabView & PLCAutomation of DMPS Manufacturing by using LabView & PLC
Automation of DMPS Manufacturing by using LabView & PLC
 
Automation of DMPS Manufacturing by Using LabView and PLC
Automation of DMPS Manufacturing by Using LabView  and PLC Automation of DMPS Manufacturing by Using LabView  and PLC
Automation of DMPS Manufacturing by Using LabView and PLC
 
Industrial application of machine vision
Industrial application of machine visionIndustrial application of machine vision
Industrial application of machine vision
 
Image processing based girth monitoring and recording system for rubber plant...
Image processing based girth monitoring and recording system for rubber plant...Image processing based girth monitoring and recording system for rubber plant...
Image processing based girth monitoring and recording system for rubber plant...
 
IRJET- Spatial Clustering Method for Satellite Image Segmentation
IRJET-  	  Spatial Clustering Method for Satellite Image SegmentationIRJET-  	  Spatial Clustering Method for Satellite Image Segmentation
IRJET- Spatial Clustering Method for Satellite Image Segmentation
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
 
Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...
 
Human Identification from Palm/Dorsal Veins Using Auto encoders
Human Identification from Palm/Dorsal Veins Using Auto encodersHuman Identification from Palm/Dorsal Veins Using Auto encoders
Human Identification from Palm/Dorsal Veins Using Auto encoders
 
IRJET - Object Identification in Steel Container through Thermal Image Pi...
IRJET -  	  Object Identification in Steel Container through Thermal Image Pi...IRJET -  	  Object Identification in Steel Container through Thermal Image Pi...
IRJET - Object Identification in Steel Container through Thermal Image Pi...
 
Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...
Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...
Fast Automatized Parameter Adaption Process of CNC Milling Machines under use...
 
I0321050057
I0321050057I0321050057
I0321050057
 
PC-based Vision System for Operating Parameter Identification on a CNC Machine
PC-based Vision System for Operating Parameter Identification on a CNC MachinePC-based Vision System for Operating Parameter Identification on a CNC Machine
PC-based Vision System for Operating Parameter Identification on a CNC Machine
 
IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...
IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...
IRJET- Automatic Identification, Analysis and Investigation of Printed Circui...
 
APPLICATIONS OF MACHINE VISION
APPLICATIONS OF MACHINE VISIONAPPLICATIONS OF MACHINE VISION
APPLICATIONS OF MACHINE VISION
 
I0333043049
I0333043049I0333043049
I0333043049
 

Recently uploaded

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 

Recently uploaded (20)

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 

Machine vision project

  • 1. EPE 462 Industrial Machine Vision Group Assignment Title: Inspection System in Bottle of Medicine Liquid in Production Line Name : Ang Kok Wei (108467) Lecturer: Prof. Mani Maran a/l Ratnam Dr. Yen Kin Sam Date of Submission: 11th December 2013 School of Mechanical Engineering
  • 2. Inspection System in Bottle of Medicine Liquid in Production Line K.W.Ang School of Mechanical Engineering Univeristi Sains Malaysia, 14300 Nibong Tebal, Penang, Malaysia akw_90@hotmail.com ABSTRACT This paper presents the utilization of machine vision-based inspection system which is also known as Automatic Optical Inspection (AOI) in doing the quality inspection of the medical bottles. There are two inspections in this study, which are the water level of the medical liquid and the presence of the cap. Inspection results performed on the samples have proven the effectiveness & reliability of the algorithms in MATLAB software. With the aid of high resolution camera in terms of image capture, proper scene constraints applications & further image processing using MATLAB software, the quality & variety of the product can be easily determined. 1.0 Introduction In the medical industrial, the finish products are being inspected before packaging into the box. The machine vision is known as a cost-effective, high repeatability & reliability system which is suitable to be installed in this packaging line for inspection purposes. Nowadays, numerous applications of machine vision technology have been applied into the manufacturing environment. This paper shows a setup of inspection and classification system in the beverage bottle production line, which the main tasks of the system, are to inspect the water level and to inspect the bottle cap Hui Shi and Wenyong Yu [1], has stated that to implementing a machine vision system, several factors should be taken into consideration: I. Product material The texture of materials has to be carefully selected. Materials with high reflectivity will increase the challenges faced during inspection process & further image processing. II. Camera The object focusing area & resolution of the camera should be taken into account as well. This is to ensure that the image captured is clear enough during image acquisition & at the same time shortening the image pre-processing time required as well as to reduce the manufacturing lead time if possible. III. The background of object The background of the object being captured should be chosen properly to ensure that the captured images will be easily differentiated from the foreground. Duan et al. [2] present a machine vision based for beer bottle inspection. The method based on the histogram of edge points is applied for real- time determination of the inspection area. For the defect detection of bottle wall and bottle bottom, an algorithm based on local statistical characteristic is proposed. In bottle finish inspection, two artificial neutral networks are used for low- level inspection and high- level judgment, respectively. Inspection of beer bottle by human inspectors will result in a low speed and efficiency because the whole inspection process is subjective and very tedious. Therefore, as a replacement of human inspector, beer bottle inspector equipped with specific high speed image capture and processing system enable the inspection done automatically and in high speed and accuracy. Inspection algorithm presented in this paper is able to achieve high correct inspection rate both to
  • 3. defective bottled and good ones. In addition, artificial neutral networks are adopted in bottle finish inspection, which has proved to be very convenient for users to adjust the system for their specific applications. Ballard [3] mention that computer vision is the construction of explicit and meaningful descriptions of physical objects from images. Machine vision also recognized as the integrated use of devices for non- contact optical sensing and computing and decision processes to receive and interpret an image of a real scene automatically. According to Brosnan [4] computer vision is a rapid, economic, consistent and objective inspection technique, which has expected into many diverse industries. Its speed and accuracy satisfy ever- increasing production and quality requirements, hence aiding in the development of totally automated processes. The adaption of computer vision for quality evaluation of processed foods is the area for the greatest potential uptake of this technology, as analysis can be used on a standard requirement in already automated controlled conditions. Malamas [5], has state that they are two independent ways for classification are being proposed, one is according to the inspection features of the industrial product or process involved while another one is according to the inspection independent characteristic of the inspected product or process. 2.0 EXPERIMENTAL SETUP 2.1 Physical Setup of the Inspection and Classification System The system consists of a CCD camera, a light field and light sources. The light field which is made a white colour paper is used to provide a uniform light field as background for the system so that the image captured can be produced easily. The light sources consist of 2 pendaflour lights. The distance between the CCD camera and beverage is adjusted so that the beverage can be captured by the CCD camera. The overall system setup are shown as Figure 1 Figure 1: Overall system setup Light source Light field Specimen USB 2.0 Webcamera
  • 4. 2.2 System Integration In this experiment, the web camera is first used to capture the picture from a scene. The sensor inside the camera isused to convert the optical signals (light) from the scene to analog electrical signals. Then, the analog signal will convert to digital electrical signals and then store the data in the memory of the frame grabber. The computer will read the data from the frame grabber memory through bus line and store the data in computer memory. In this operation, light field illumination was used to capture the bottle. The bottle is placed between the light box and camera. After that, the system operation was controlled and integrated with a personal computer consist of MATLAB software. Input images from the camera were sent to a frame grabber and processed by the software to detect image focus. The operational schematic diagram of the system is shown in Figure 2. Figure 2 : the schematic system of the sytem 3.0 Inspection implementation 3.1 The standard for algorithm After the image had been capture, the image will be load into the personal computer. The Matlab program is used to process the image in order to do the image processing. The goal of this inspection system is to quality inspection of the water level and bottle cap. The system will reject either the water level is within in standard and the missing of the cap. The standard has been capture and processed to identify the specification of the specimen. Figure 3: The standard image Computer with Matlab WebcamSpecimenLight field Light source
  • 5. 3.2 Inspection Algorithm 3.2.1 Binarizing and filtering the image The image is firstly displayed in white plane, as shown in Figure 4(a). This process is to mitigate the effects of colour of the bottle on the gray values since the colours for the medecine are black in colour & the cap is red in colour. The image is then undergone a morphological operation to cancel out the noise, as shown as Figure 4(b). The white plane image is then being binarized. From Figure 4 (c), it is clearly shown that the suitable threshold value is set at 90 which are 0.353 in Matlab ,as shown as Figure 4(d). After that, the image is inverting so that the bottle is in colour and the different filtering process is used. This filtering process is used to remove the unwanted noise by removes binary image of connected components (objects) that have fewer than 8000 pixels, as shown as Figure 4(e). (a) (b) (c)
  • 6. (d) (e) Figure 4: (a) Image after using apply gray scale, (b) Image after noise cancelling, (c) Histogram of the white plane image, (d) Binary image with threshold value of 90, (e) Image after inverting and filtering. 3.2.2 Identify the water level The standard of this medicine liquid is 28ml. In this case, the white area of the binary image becomes an interest of study. The algorithm will identify white area correspond to the water level of the sample by remove the cap, as shown in Figure 5.After that, 3 samples are used to determine the average area of the white region in the binary image. The standard set is 8000 pixels which as shown at Table 1.Thus, the area measured should have more than 8000 pixels which correspond to the acceptable water level due to the noise. Figure 5: Image after remove the cap Sample Pixel number(pixel) Difference with the standard (pixel) Percentage of difference with the standard (%) 1 32476 476 1.4875 2 32331 331 1.034375 3 34021 2021 6.315625 4 32000 - - Table 1: Comparison with different sample of the medicine liquid level
  • 7. 3.2.3 Identifying Bottle Cap The inspection needs to make sure that the bottle cap is attached on the bottle. The similar algorithm that identifies the water level is applied to identify the bottle cap. However, the upper image is cropped initially so that only the bottle cap area is inspected, as shown in Figue 6(a). The algorithm will identify the bottle cap of the sample and compare it with the standard. 4 samples are used to determine the average area of the white region in the binary image, which is shown in Figure 4(b), 4(c) and 4(d). The standard set in this experiment is pixels which as shown at Table 2, with a tolerance of 5000 pixels to the standard. The tolerance is applied because some pixels of the image may be filtered when removing the noise. Figure 5 shows the acceptable bottle cap while Figure 6 shows the missing bottle cap. Since the comparison is done by comparing the area, the algorithm accepts the bottle with the area more than 5000 pixels. (a) (b) (c) (d) (e) Figure 6: (a) Image after cropping, (b) Image after filtering, (c) Histogram of the white plane image, (d)Image after binaries, (e) Image after inverting and remove noise
  • 8. The standard of this medicines’ bottle is 1cm in height and 2.5 cm for the diameter. In this case, the white area of the binary image becomes an interest of study. The algorithm will identify white area correspond to the front area of the bottle, as shown in Figure 8(a).After that, 3 samples are used to determine the average area of the white region in the binary image. The standard set is 5000 pixels which as shown at Table 2.Thus, the area measured should have more than 5000 pixels which correspond to the acceptable water level due to the noise., as shown in Figure 8. Sample Pixel number(pixel) Difference with the standard (pixel) Percentage of difference with the standard (%) 1 5103 103 2.06 2 5117 117 2.34 3 5034 34 0.68 4 5000 - - Table 1: Comparison with different sample area of the cap (a) (b) Figure 8: Binary images of (a) acceptable bottle cap, (b) rejected bottle cap. The white area of image corresponds to the bottle cap. 3.3 Flow of algorithm The algorithm undergoes 4 important processes: Image Acquisition, Identify medicine liquid Level, , Identify Bottle Cap and Display Inspection Result. The standard is set so that the unknown beverage bottle can be identified. An unknown beverage bottle will be identified at the end of the algorithm, whether it passes the inspection or is rejected at certain inspection. The flow chart of the algorithm is shown as Figure 9.
  • 9. Inspection of medicine Bottle Production Image Acquisition: The image of the water bottle is read into the program. Identify the Water Level: 1. Converting the image into green screen image 2. Thresholding the image into binary image 3. Removing noise on the object 4. Removing noise on the background 5. Measuring the water level of the bottle 6. Comparing the water level with standard Identify the Bottle Cap: 1. Cropping the image 2. Thresholding the image into binary image 3. Removing noise on the object 4. Removing noise on the background 5. Measuring the bottle 6. Comparing the bottle cap with standard Show Result of the Inspection: 1. Water Level (Passed, Failed) 2. Bottle Cap (Passed, Failed) 3. Overall QC (Passed, Failed) Water level > 32000 pixels Bottle cap > 5000 pixels Water level passed & Bottle cap passed Water level failed Water level passed Bottle cap passed Bottle cap failed End Yes No Yes No Figure 9 : Algorithm for the process
  • 10. 4. RESULTS AND DISCUSSION Computer vision has been widely used for inspection because it offer the potential to automate manual grading practices and thus to standardize techniques and eliminate tedious inspection task. The result presented hare demonstrate the ability of the integration of machine vision with MATLAB to detect water level, bottle cap and water color. At first, the MATLAB code will detect the water level then follow by the detection of the bottle cap. The MATLAB code was set in specific condition to detect whether the liquid level of medicine is in within the standard and then detect bottle cap. Liquid Level and bottle cap must fulfill the condition set at the MATLAB code, if not then the beverage bottle will be rejected from the production line. 4 samples are tested in this experiment and the results are shown in the Table 3. Only S1 is passed the inspection system. S2 failed the water level while S3 failed the bottle cap. S4 failed both the bottle cap and water level. The test shows 100% feasibility of the inspection system. Picture Result Picture Result Sample 1 Sample 2 Sample 3 Sample 4 Table 3: Result of the specimen test 5. CONCLUSION The experiments done are success due to its high reliability and high accuracy. The feasibility of the inspector is proved by inspecting the water level, presence of bottle cap and water colors. The inspector is also able to inspect and differentiate both Cola and Syrup. So, there will be no mixing in between these beverages. Furthermore, user can adjust the inspector to meet their requirements for specific application. The Table 4 below summarizes the system that inspects the water level and bottle cap.
  • 11. 6.0 Appendix %%%%%%preprocessing %%%%%%%%%%%% clc; clear all; close all; file='bottle.jpg'; % declare the file P1= imread(file); figure, imshow(P1) % show the picture I1=P1(:,:,3); figure, imshow(I1) I2=I1; %filtering strl=strel('diamond',5); I3=imopen(I2,strl); figure, imshow(I2) I4=I3; figure,imshow(I4) figure, imhist(I4) % histogram used to find the thresholding %%%%%% segmentation %%%%%%%%%%%%% %binarize I5=im2bw(I4,0.349); figure, imshow(I5); %remove noise F1=bwareaopen(I5, 500); figure,imshow(F1) F2=~F1; F3=bwareaopen(F2, 1700); figure, imshow(F3); %Identify water level F4 = bwareaopen(F3,8000); % removing the cap Data1 = regionprops(F4); % measure the properties of the white area Water_Level = Data1.Area; % showing the pixel area (by removing ;) disp(['Area for the water is : ',Water_Level]); %%%% feture extraction %%%%%% %to find area Water_Level = Data1.Area; %showing the pixel area (by removing ;) if(Water_Level>32000) % accept the water level if the area > 32000 water_level_qc = 'Passed'; else water_level_qc = 'Failed'; end; %identify bottle cap I6 = imcrop(I1,[130 10 420 120]); % cropping the image figure,imshow(I6) %filtering str2=strel('diamond',5); I7=imopen(I6,str2); figure, imshow(I7) figure, imhist(I7) % histogram used to find the thresholding %binarize I8 = im2bw(I6,0.349); % thresholding at 0.349 into binary image figure,imshow(I8) %remove noise F4=bwareaopen(I8, 500); figure,imshow(F4) F5=~F4; F6=bwareaopen(F5, 1700); figure, imshow(F6); %to find area Data2 = regionprops(F6); % measure properties of the white area Cap = Data2.Area; % showing the pixel area if(Cap>5000) % there is cap if area is > 5000 bottle_cap_qc = 'Passed'; else bottle_cap_qc = 'Missing'; end; %Display result if ((Water_Level>32000)&&(Cap>500)) % passed if correct water level & cap qc = 'Passed'; else qc = 'Rejected'; end; [pathstr, name, ext] = fileparts(file); % define the file parts disp(['Specimen number : ',name]); % display the specimen name disp(['Water Level : ',water_level_qc]);% display water level result disp(['Bottle Cap : ',bottle_cap_qc]); % display bottle cap result disp(['Overall : ',qc]); % show the result of inspection 7.0 References [1] Hui Shi and Wenyong Yu (2011), "High speed web printing inspection with multiple linear cameras", Proc. SPIE 8006, 800624; doi:10.1117/12.901868. [2] Duan, F, A machine vision inspector for beer bottle. Engineering Applications of Artificial Intelligence, 2007. 20(7): p. 1013-1021. [3] Ballard, D.A., & Brown, C.M. (1982). computer vision. Englewood cliffs, NJ, USA: Prentice-Hall [4] Brosnan, T. and D.-W. Sun, Inspection and grading of agricultural and food products by computer vision systems—a review. Computers and Electronics in Agriculture, 2002. 36(2-3): p.193-213. [5] Malamas, E.N, “A survey on industrial vision systems, applications and tools”, Image and Vision Computing, 2003. 21(2): p. 171-188.