You are on page 1of 3

2013 Third International Conference on Intelligent System Design and Engineering Applications

The Detection System for Pharmaceutical Bottle-packaging Constructed by


Machine Vision Technology
Sun Huaiyuan1,2 , Sun Chenjie1, Liao Yuehua2
1.University of ShangHai for Science and Technology, Shanghai, 200093, China
2.Shanghai Medical Instrumentation College,Shanghai, 200093,China
shy62123@163.com
technology,digital image processing technology, mechanical
engineering technology, test and control technology,
simulation and digital video technology, computer
technology, man-machine interface technology and other
related technology[4]. It is basic technology to realize
integrated computer system. Therefore, to development
design type of mechanical product as the premise, we
combined the design innovation with technological
innovation[5], tried to apply the machine vision technology
in the online testing for pharmaceutical packaging bottle
quality, labels, liquid medicine volume, packaging batch
number etc.The detection system for pharmaceutical bottlepackaging was constructed,in order to realize the rapid and
automatic detection as well as control in the pharmaceutical
production, to solve the technical problems brought by the
use of artificial light inspection and visual method.

AbstractDuring the pharmaceutical production process, the


quality detection is a very important part. Intelligent detection
based on machine vision technology is a rapid and automatic
means of drug production quality detection and control of
drug production. A method is proposed for the packaging
detection of pharmaceutical glass bottle which is based on
machine vision technology. It is suitable for real-time detection
and control. That is,through the computer vision system,
collecting glass bottles image and using the mechanical vision
software for detection, and the final decision to make
judgments can be concluded. Based on the machine vision
software HALCON, this article describes the software
platforms and structural levels of pharmaceutical bottle
packaging line detection systems, as well as the detection and
control process. It is pointed out that the detection system
features and application prospects.
Keywords-Machine Vision;Pharmaceutical;Bottle-Packaging;
Detection System

I.

II.
DETECTION PRINCIPLE AND SYSTEM ANALYSIS
The theory structure logic of the detection system based
on machine vision technology can be summed up as "image
acquisitionimage processingdecision and judgment
executing operation".It is the general principle and running
basis of all visual sensing system.Image collection device
can take the target's optical properties into two-dimensional
information electric signal by trigger collection or
continuous collection. And then with the help of the
sampling and quantization functions of the data collection
card or collection equipment itself, electric signal can be
transformed into digital image[6]. The computer process to
digital image, including image preprocessing, image
enhancement, image segmentation, feature extraction and so
on,at last,to finish the measure and judgment through image
analysis.From this, the detection system for pharmaceutical
bottle-packaging based on the system theory structure
should include light source, image collection unit,sensing
unit, image processing and intelligent operation platform,
and elimination unit,etc.The system constitution is as shown
in figure 1.
Image collection is completed by using CMOS digital
camera(DH- HV1302UM-T and match lens M3Z1228-mp)
that acquires the image of packing bottle on conveyor belt
of production line. According to the specifications of
pharmaceutical packing bottle, 200h200 LED backlighting
red light source is adopted. Trigger collection way is used
for image acquisition.Detecting element(OMORN E3Z-B61
+E39RES) is a reflection type trigger composed of
photoelectric trigger and reflection board.Image acquired by

INTRODUCTION

During the pharmaceutical production process, there are


many testing parts, such as liquid medicine volume, label
detection, batch number monitoring, etc. Long-term since,
our country's pharmaceutical factories usually used the
artificial detection, result in the production efficiency low,
the worker labor strong, and very easy to cause the test
results instability, or even not accurate. In recent years, with
the development of computer technology, digital image
processing theory and method continuous improvement, the
automatic detection technology to product without contact
using has gradually become feasible.
Machine vision also be called computer vision.It is to
use computer to realize man's visual function, or to use
machine to replace the human eye to do measurement and
judgment[1].Using photoelectric imaging system to gather
target image processed by the computer or special image
processing module,machine vision can identify the target's
size, shape, color and so on according to the image pixel
distribution, brightness and color information[2-3] . In this
way,rapidity and repeatability of computer were combined
with the human visual highly intelligent and abstract
ability,to improve greatly the flexibility and automation
degree of production process detection,to save a lot of
manpower, to improve the test efficiency and to ensure the
quality of products. Machine vision technology include
lighting technology, optical imaging technology, sensor

978-0-7695-4923-1/12 $26.00 2012 IEEE


DOI 10.1109/ISDEA.2012.339

1423

secondary developments in order to achieve different target


detection.
B. The software structure of detection system
The detection and control system for Pharmaceutical
Bottle-packaging including the recognition algorithm,user
interface and communication three subsystems that
respectively complete the inspection identification,
mechanical control and communication function. The system
software is based on windows platform,takes graphic
processing by using HALCON software, and its program is
designed by adopting the object-oriented VB language for
real-time, coordinated planning process[7]. The structure of
detection and control system is as shown in figure 2, divided
into seven modules: parameter setting, pretreating, image
processing, intelligent judging, eliminating, communicating
and user interface.


Figure 1. Composition of the detecting system for pharmaceutical bottlepackaging

image collection unit is transmitted to image processing


platform through the camera interface. Machine vision
software have a processing operation to it and output a
result according to the calculation,comparison and judgment
to some related parameters. System process is as follows
When a glass packaging bottle transmitted by conveyor
belt is passing by the sensor, it output a pulse signal to
control the image collection unit and capturing a image,then
the image is transmitted to monitoring operating system and
haven analysis and operation. After "comparison",a
judgment can be concluded: normally, the glass packaging
bottle moves on with belt and into the next station; as the
problems are discovered, the elimination unit executing
commands from monitoring operating system will eliminate
"unqualified" bottle, so as to realize the detection and
sorting work for bottle packaging products and defective.
III.

CONSTRUCTING

Figure 2. The structure of detection and control system

Parameter setting provides data file setting and storage


operation in database; pretreating module completes
initialization operation according to the set value; digital
image processing module completes digital processing to
real-time collecting images; intelligent judging module
compares and judges image data; eliminating module
completes controlling to works eliminated; communication
module completes two-way communication and statistical
data report between the epistatic machine and the database;
the user interface provides users with convenient operation
and statistics show by using graphics mode, and it is
convenient for users to replace the parameter setting in time
and modify database as the detecting product changed.

DETECTION SYSTEM

A. The software platform of detection system


The software platform of test system consists of
machine vision software and intelligent operation platform,
and its main tasks are to control respectively the every
hardware part as well as integrate all parts of hardware. At
present the machine vision software extensively used are
mainly HALCON, EVISION and XCALIPER,etc. This
system uses the HALCON8.0 of German MVTec that is a
powerful machine vision software. It has a comprehensive
visual processing library including all standards and
advanced image processing method, different image
collection and advanced pattern matching algorithm. It
provides some tools and algorithms normally required in
machine vision applications, such as blob analysis,
morphology, pattern recognition, measurement and data
analysis,etc. In addition, it also has the important
characteristics in rapid prototyping and the open structure,
machine vision applications are developed rapidly through
the interactive programming environment, or personalized
visual function is to fusion into it by joining a new operator.
So, our research and developing core is that, according to
the needs,the powerful functions of HALCON are using to

C. The process of detection system


The automatic detection of pharmaceutical bottlepackaging should be provided with the high real-time and
accuracy. Through the analysis of the front, it is known that
bottle-packaging detection and control can be divided into
two process on-line detection and judgment decisionmaking as well as implementation. And the two process are
realized by running the program of detection system.
The detection and control process of the system is as
shown in figure 3: start system, first initialized,according to
the requirements of pharmaceutical bottle-packaging
detection, relevant parameters of camera shooting and
detection are configurated, and then start conveyor belt into
the running state. Among them, each detection cycle
including image collection, image processing, target

1424

detection and judgment as well as decision.

REFERENCES
[1]

Xu chi, Wang zhiping, Ling yongxiang,et al..Beverage bottle defect


detection technology based on intelligent vision system. Automation
Instrumentation, 2011,(5):163-167.(in Chinese)

[2]

Xiong guangjie, Ma shuyuan, Nie xuejun,et al..Defects inspection


system of HID PCB based on machine vision.Computer
Measurement Control, 2011,19(8):1824-1826.(in Chinese)

[3]

Luo lu, Hu yueming. Embedded inspection system for FPC based on


machine vision. Computer Measurement Control, 2011,19(2):303305,311.(in Chinese)
Gao chao,Ren ke,Guo yongcai.Surface crack examination technology
based on machine vision. Aviation Precision Manufacturing Technology,
2007,43(5):23-25.(in Chinese)
Xu ronghua, Tang dunbing, Zhu renmiao,et al.. Research on re-creative
design strategy based on function ontology. Journal of Engineering
Design,2009,16(6):395-400.(in Chinese)
Zhang xuewu, Ding yanqiong, Yan ping. Vision inspection of metal
surface defects based on infrared imaging. Acta Optica Sinica,
2011,31(3):104-112.(in Chinese)
Li ting, Liu ning. Study on circle locating technology based on
machine vision. Computer Engineering and Applications,2012,48 (9):
153-156.(in Chinese)

[4]

[5]

[6]

[7]

Author introduction:
Sun huaiyuan(1962.12), man, Jiangsu Xinghua, master's,
associate professor, research direction: mechatronics and detecting
technology.
Address: Shanghai yangpu yingkou road 101
Postal code:200093
Tel: +86-021-65485551-3420; +86-13641753546
E-mail: shy62123@163.com

Figure 3. The detection and control process of system

IV.

CONCLUSIONS

The machine vision technology is applied to the


detection of pharmaceutical bottle-packaging, the inspection
and classification work are completed by the machine
instead of artificial,and it is conform to the requirements of
Good Manufacturing Practice(GMP). The detection system
realizes contact detection, with some characteristics of high
accuracy, speed and objective detection results, etc. It is
significant improvement and breakthrough in the drug safety
and detecting precision relative to the traditional artificial
detection, and that a kind of method suitable for online
detection and control is set up, it can greatly reduce detection
cost, improve labor productivity, and create a comfortable
working environment for the operator.
The application technology embodied in this detection
system is the supporting technology for pharmaceutical
production enterprises to realize computer integrated control
and digital management. So,with the popularization and
promotion of China's GMP, the rise ceaselessly in
automation degree and scale of production, and more
attention to quality problems for users, machine vision
technology will be applied more extensively in drug
production.

1425