0% found this document useful (0 votes)
95 views5 pages

IJIVP V6 I2 Paper 3 1122 1126

1) The document describes an automated visual inspection system for empty and filled bottles. 2) It detects defects in empty bottle shape using edge detection and circular Hough transform to analyze the top and bottom radius. 3) For filled bottles, it uses edge detection and horizontal line detection to check the fill level and ensure proper cap placement.

Uploaded by

Bernardo Jaime
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views5 pages

IJIVP V6 I2 Paper 3 1122 1126

1) The document describes an automated visual inspection system for empty and filled bottles. 2) It detects defects in empty bottle shape using edge detection and circular Hough transform to analyze the top and bottom radius. 3) For filled bottles, it uses edge detection and horizontal line detection to check the fill level and ensure proper cap placement.

Uploaded by

Bernardo Jaime
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SHUBHI SHARMA et al.

: EMPTY AND FILLED BOTTLE INSPECTION SYSTEM


DOI: 10.21917/ijivp.2015.0163

EMPTY AND FILLED BOTTLE INSPECTION SYSTEM


Shubhi Sharma1, K. Vinaya Krupa2, Roshni Gandhi3, Aditi Jain4 and Nehal Shah5
Department of Electronics and Communication Engineering, Sarvajanik College of Engineering and Technology, India
E-mail: 1shubhi.sharmaj1993@gmail.com, 2vinay.krupa10@gmail.com, 3roshnigandhi93@gmail.com, 4aditijn28@gmail.com,
5
nehal.shah@scet.ac.in

Abstract the reference line and fill level line. The study of Hough
Automated Visual Inspection System (AVIS) have a strong ability for transform where the method includes standard Hough transform
quality control in manufacturing industries by inspecting products (SHT), Gerig and Klien Hough transform (GKHT), modified
automatically instead of manual inspections. This paper gives fast Hough transform (MFHT), 2-1 Hough transform, Gerig
methods for bottle inspection in manufacturing industries. The paper Hough transform with gradient (GHTG) etc are presented in [4].
describes mechanism for the defect detection, top and bottom SHT requires large storage requirement for images of different
detection, cap placement and fill level inspection. For empty bottle sizes, while GHTG performs better than 2-1HT in the sense of
inspection the image is processed by contrast enhancement and then robustness.
circular Hough transform is used. The location and radius of top and
bottom of bottle is analyzed. After filling the bottle with liquid and
placing the cap, edge detection method is used which is followed by 3. BOTTLE INSPECTION
horizontal line detection to identify whether fill level and cap closure
is appropriate or not. Presented bottle inspection system works with In bottle inspection system there are four stages as indicated
100% accuracy in proper illumination condition. in Fig.1. First empty bottle is checked for shape and top as well
as bottom alignment. If it is found proper then liquid is filled and
Keywords: fill level is checked. Finally, cap placement is verified before
Bottle Shape Inspection, Circular Hough Transform, Liquid Fill final dispatch.
Level Detection, Cap Closure Identification, Boundary Extraction
Empty bottle Top and
Fill level Cap placement
1. INTRODUCTION inspection for bottom radius
detection inspection
shape inspection
Machine vision system provides computer desirable
understanding of objects from single image or array of images. Fig.1. Stages for bottle inspection system
Application of machine vision systems in industries improves
productivity as well as the quality of the product manufactured.
Visual inspection by humans has many flaws. It is quite tedious
3.1 EMPTY BOTTLE SHAPE INSPECTION
and time consuming. Automated Visual Inspection (AVI) is In industries there is a possibility of deformation of shape
handy tool in PCB manufacturing, textile production, food and during transportation of bottle from one section to another. So
beverages packaging, in metal industry and many others for after the fabrication of bottle and before filling it with liquid, it is
recognition of defects encountered during making. Bottles are necessary to inspect the shape.
major packaging methods in major industries, like beverages,
milk, medicine and other chemical products. Automated bottle
inspection includes, recognition between glass bottle and pet
bottles, defects in shape of pet bottles, inspection for over-fill,
under-fill or appropriate fill of liquid, cap placement,
verification of label, detection of quality and defect in products
etc. For various parameters, requirements are different hence,
diverse techniques are essential. In this paper, a work on defect
detection, inspecting top and bottom detection of bottle, fill level
and cap placement of filled bottle is reported.

2. PREVIOUS WORK
In reference [1] for bottle top and bottom inspection, first
image is processed by applying denoising, contrast enhancement
and edge detection. For bottle top and bottom inspection, least
square method followed by chain code tracing for the
(a) (b)
circumference and randomized Hough transform for location of
the center is used. Reference [2] use Sobel operator for edge
detection. Cap condition and fill level inspection is done by
defining two region of interest to determine the distance between

1122
ISSN: 0976-9102(ONLINE) ICTACT JOURNAL ON IMAGE AND VIDEO PROCESSING, NOVEMBER 2015, VOLUME: 06, ISSUE: 02

(c) (d) (c) (d)

Fig.2. (a) Original image (b) Binary image (c) Image after noise Fig.3. (a) Points of interest on boundary of reference bottle (b)
removal (d) Boundary extracted image Distances between points of interest (c) Defected bottle (d)
Actual defective area detected
As shown in Fig.2(a) original image of bottle is captured
with dark (preferably black) background. Using thresholding 3.2 TOP AND BOTTOM INSPECTION
binary image is generated such that the bottle can be highlighted
which is our foreground (white) and the background is black. If the shape of the bottle is proper, the radius of the top and
Morphological opening process is used in order to remove the bottom have to be examined using edge detection and circular
small protrusions around the bottle and the result of this Hough transform. By using Canny or Sobel operator edges of the
procedure is shown in Fig.2(c). After getting the seamless object is detected as shown in Fig.4. First step in process is to
image, boundary of the bottle is extracted using boundary apply Gaussian filter to smooth the image. Intensity gradient of
extraction process as shown in Fig.2(d). each pixel is computed using Eq.(1) and direction of the gradient
is given by Eq.(2).
The boundary extracted image is scanned and the horizontal
distance between the boundary points is found as indicated in G  Gx 2  Gy 2 (1)
Fig.3(a). For selecting boundary points, vertical interval of 25
pixels is considered which results in a matrix of horizontal Gy
distances. Bottles with such horizontal lines are shown in   arc tan (2)
Gx
Fig.3(b) and Fig.3(c) for reference and defective bottle
respectively. Such matrix is calculated for each bottle and its To get rid of spurious response to edge detection non-
absolute difference from the reference bottle matrix is computed. maximal suppression is applied which results in thin edges.
If any deformity is present then large difference is found in There are still some edge pixels at this point caused by noise and
computation. Detected defective area is shown in Fig.4(d). These color variation. To remove them and to determine potential
same steps can be used to detect the deformity at the base of the edges double thresholding is applied. After that all the other
bottle also. edges that are weak and not connected to strong edges are
suppressed.

(a) Original image (b) Canny edge Detection


Fig.4. (a) Original bottom of bottle (b) Applying canny edge
detection
Circle detection method is used to find the centre and radius
of circle. In this paper circular Hough transform technique
(CHT) is applied for finding circles in images. This approach has
(a) (b) been adopted because of its robustness in the presence of noise,

1123
SHUBHI SHARMA et al.: EMPTY AND FILLED BOTTLE INSPECTION SYSTEM

occlusion and varying illumination. The parametric equation of


the circle can be written as Eq.(3).
x  a 2   y  b2  r 2 (3)
here, (a, i) are center of circle and r is its radius. (xi, yi) are
arbitrary edge points transformed into right circular cone in the
(a, b, r) parameter space. Point of intersection of cones is a
single point in (a, b, r) if image points lie on circle.
The classical Hough transform requires a 3-D array for
storing votes for multiple radii, which results in large storage
requirements and long processing times. The phase coding
solves this problem by using a single 2-D accumulator array for
all the radii. The basic steps involved in the computation are:
Accumulator array computation
Fig.6. Steps to retain horizontal lines
The pixels with high gradient are considered as candidate
pixel, which are allowed to cast ‘votes' in the accumulator array.
The pixels vote in pattern around them form a full circle of fixed 4. EXPERIMENTAL SETUP
radius as shown in Fig.5.
In the experimental setup 3 cameras are used as shown in
Fig.7. Camera 1 and Camera 3 are used to capture the images of
top and bottom respectively. They are positioned above and
below the bottle such that focus of camera 1 and camera 3 lie on
the same axis. Camera 2 is placed exactly in front of bottle such
that it captures the cap and the fill level of the bottle. The images
captured by the cameras are given as input to the inspection
system which processes the image and generates the required
output. Setup details for bottle are shown in Table.1.

Fig.5. Classical CHT voting pattern [6]

Center Estimation
The votes of candidate pixels belonging to the circle tend to
accumulate at the accumulator array bin corresponding to the
circle's center. Therefore, the circle centres are estimated by
detecting the peaks in the accumulator array.
Radius Estimation
In phase coding method, it makes use of complex values in
the accumulator array with the radius information encoded in the
phase of the array entries. The votes cast by the edge pixels
contain information not only about the possible center locations
but also about the radius of the circle associated with the center Fig.7. Camera positions in experimental setup
location. The radius can be estimated by simply decoding the
phase information from the estimated center location in the Table.1. Video details
accumulator array.
Frame rate 30 fps
3.3 FILL LEVEL AND CAP PLACEMENT
Size of each frame (in pixels) 480 x 640
After top and bottom inspection of empty bottle the liquid is
filled and cap is placed on the bottle. Then the bottle enters the Total number of frames for each
750-800
fill level and cap inspection system. bottle
The captured image is first converted to gray scale image to Optimum frames Between 375-400
reduce the computational complexity. The main aim is to detect Distance of camera from bottle Approx. 30-35 cm
horizontal lines so edge detection algorithm like Sobel or Canny
can be applied. To acquire sharp edges Canny edge detection Background for shape inspection Black
algorithm is used where it convolves the image with the
horizontal mask as shown in Fig.6. After extraction of horizontal Background for fill level, cap
White
lines, morphological opening is applied to remove noise placement inspection
reaching to the edges and lines more noticeably.

1124
ISSN: 0976-9102(ONLINE) ICTACT JOURNAL ON IMAGE AND VIDEO PROCESSING, NOVEMBER 2015, VOLUME: 06, ISSUE: 02

In this experimental setup, bottles are moving on conveyer


belt and depending on speed of belt; number of frames for each
bottle are variable. It is necessary to detect optimum frame for
processing bottle inspection such that bottle is at the centre of
the frame. To serve the purpose, vertical line detection is applied
and if the vertical edge of the bottle lies in the specified range,
the frame is extracted and further processing is done.

(a) (b)
Fig.10. (a) Defected bottle (b) Defect detected where the
horizontal distance was less

After verifying bottle for shape deformity and defect at top or


bottom, radius of bottle bottom is measured and alignment of top
and bottom is checked. The Fig.11 indicates top and bottom
circles of bottle and their centre as well as radius is computed.
The Fig.12 shows various cases of inspection for glass bottle like
cap not placed but fill level is proper, cap placed properly but fill
level is not proper, cap not placed properly as well as fill level is
Fig.8. Bottle image with reference line, Line1 for cap placement not proper. If fill level is not proper or bottle is not filled, both
and Line2 for fill level cases are showing error. Similar results for plastic bottle are
shown in Fig.13 and Fig.14 respectively.
All the distances in vertical direction will be measured from
the reference line as shown in Fig.8. The neck of the bottle is
taken as the reference. As shown in Fig.8, horizontal line
detected at the top of the cap is taken as Line1. To detect the
placement of the cap the distance between Line1 and reference
line is measured. Proper cap placement is identified if the
distance between these lines is equal to the height of the cap. If
the distance between the reference line and Line1 is not equal to
the cap height or no horizontal line is detected in red region then
cap is not placed properly. Fig.11. Top and bottle radius inspection (glass bottle)

(a) (b)

Fig.9. Proper fill level and cap placement

For standard fill level distance between reference and fill level
(Line2) is specified. If the distance between reference line and
Line2 is equal to the standard distance then fill level is proper. If
line is not detected in the range shown by the yellow box then fill
level is not proper. As shown in Fig.9 actual bottle is tested and
proper fill level and cap placement is detected. Bottle with
defective bottom is tested as per mechanism discussed in section
III and result for defect detected is shown in Fig.10. (c) (d)
Fig.12. (a) Cap not placed, fill level proper (b) Cap placed
properly, Fill level is not proper (c) Cap not placed properly, Fill
level is not proper (d) Cap placed properly, fill level is not
proper

1125
SHUBHI SHARMA et al.: EMPTY AND FILLED BOTTLE INSPECTION SYSTEM

Table.2. Result analysis


No. of
No. of bottle
correct Accuracy
tested
detections
Bottle shape
15 13 86%
inspection
Bottle bottom and
50 47 94%
top inspection
Fig.13. Top and bottle inspection (plastic bottle) Fill level and cap
placement detection
75 66 88%
with diverse
illumination
Fill level and cap
placement detection
75 75 100%
with proper
illumination

5. CONCLUSION
Bottle manufacturing and packaging industries are the key
areas which require inspection through machine vision. In this
paper, for shape inspection boundary extraction is used. For
bottle top and bottom inspection edge detection and CHT are
(a) (b) used. For cap closure and fill level inspection horizontal line
detection is applied. Experimental results are discussed in detail
for both the algorithm.

REFERENCES
[1] Sile Ma, Bin Huang, Huajie Wang and Junmei Guo,
“Algorithm Research on Location of Bottle Mouth and
Bottom in Intelligent Empty Bottle Inspection System”,
Proceedings of IEEE International Conference on
Automation and Logistics, pp. 819-824, 2009.
[2] Leila Yazdi, Anton Satria Prabuwono and Ehsan Golkar,
“Feature Extraction Algorithm for Fill Level and Cap
Inspection in Bottling Machine”, Proceedings of IEEE
International Conference on Pattern Analysis and
(c) (d)
Intelligent Robotics, Vol. 1, pp. 47-52, 2011.
Fig.14. (a) Cap placed properly, fill level proper (b) Cap not [3] John canny, “A Computational Approach to Edge
placed, Fill level is proper (c) Cap not placed properly, Fill level Detection”, IEEE Transactions on Pattern Analysis and
is proper (d) Cap placed properly, fill level is not proper Machine Intelligence, Vol. 8, No. 6, pp. 679-698, 1986.
[4] H. K. Yuen, J. Princen, J. Illingworth and J. Kitter. “A
With experimental setup described various bottles are tested Comparative Study of Hough Transform Methods for
in diverse lighting condition. If light is improper then edges are Circle Finding”, Proceedings 5th Alvey Vision Conference,
not detected as per requirement and false detection takes place. pp. 169-174, 1989.
Analysis for shape inspection, top and bottom inspection as well [5] Rafael C. Gonzalez, Richard E. Woods and Steve Proteus,
as fill level and cap placement are shown in Table.2. If light is “Digital Image Processing”, 2nd Edition, Pearson
proper and frame captured is having appropriate illumination Publications, 2006.
and contrast then system works with 100% accuracy. [6] “Image Processing Toolbox 6: Users Guide”, MATLAB,
The MathWorks, 1993-2008.
[7] Wenshuo Gao, Lei Yang, Xiaoguang Zhang and Huizhong
Liu, “An Improved Sobel Edge Detection”, Third IEEE
International Conference on Computer Science and
Information Technology, Vol. 5, pp. 67-71, 2010.

1126

You might also like