0% found this document useful (0 votes)
75 views4 pages

Oe Article Machine Vision

Modern machine-vision systems typically contain faster and more powerful PC platforms, robust 32- bit operating systems, and easy-to-use integrated software applications, making machine-vision systems more powerful, easier to program, and less expensive to use than ever before. To take full advantage of these powerful systems and painlessly integrate them into your manufacturing line, it is best to take some time to learn the basics about what makes up a vision system, how it is implemented, and the importance of proper planning.

Uploaded by

vikrant03
Copyright
© Attribution Non-Commercial (BY-NC)
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)
75 views4 pages

Oe Article Machine Vision

Modern machine-vision systems typically contain faster and more powerful PC platforms, robust 32- bit operating systems, and easy-to-use integrated software applications, making machine-vision systems more powerful, easier to program, and less expensive to use than ever before. To take full advantage of these powerful systems and painlessly integrate them into your manufacturing line, it is best to take some time to learn the basics about what makes up a vision system, how it is implemented, and the importance of proper planning.

Uploaded by

vikrant03
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 4

tutorial

DESIGNING A

SYSTEM

ILLUSTRATION BY BRYAN LEISTER

By Christopher Poling, Data Translation

odern machine-vision systems typically contain software, digital I/O and a network connection, and an X-Y

M faster and more powerful PC platforms, robust 32-


bit operating systems, and easy-to-use integrated
software applications, making machine-vision systems more
positioning table (see figure).
The input sources and optics usually consist of one or more
cameras and optical systems that take one or more images of
powerful, easier to program, and less expensive to use than ever the part being inspected. Depending on the application, the
before. To take full advantage of these powerful systems and cameras can be standard monochrome RS-170/CCIR, compos-
painlessly integrate them into your manufacturing line, it is ite color (Y/C), RGB color, non-standard monochrome
best to take some time to learn the basics about what makes up (variable-scan), progressive-scan, line-scan, or custom CCD
a vision system, how it is implemented, and the importance of arrays (used for x-ray).
proper planning. Illuminating the part for optimal data acquisition requires out-
Machine vision can be used in a wide variety of manufac- side lighting. These assemblies come in various shapes and sizes
turing operations for repetitive inspection tasks in which and are available in a variety of intensities. The most common
accuracy and reliability are important (e.g., verifying date lighting types are high-frequency fluorescent, LED, incandes-
codes on food packaging, inspecting automotive parts for cent, and quartz-halogen fiber-optic.
proper assembly, and performing robotic guidance for pick For maximum efficiency, the system must be triggered by a
and place operations). part sensor to acquire an image when the part under test is in the
correct position. Often in the form of a light barrier or sensor,
building the system the part sensor sends a trigger signal when it senses that a part is
Because the uses of machine vision are so diverse, specific in close proximity.
components can vary from system to system. However, most The frame grabber, or video capture card, interfaces the imag-
systems generally include an input source, optics, lighting, a ing units to the host computer. The frame grabber takes the
part sensor, a frame grabber, a PC platform, inspection image data provided by the camera(s) in either analog or digital

34 s p i e ’s oe m a g a z i n e | may 2002
form and converts it to information for use by the host PC. This your goals is perhaps the most important step in the process.
component is usually in the form of a plug-in board installed in Inspection operations fall into several categories: performing
the PC. A frame grabber can also provide signals to control cam- measurements or gauging, recognizing and identifying specific
era parameters such as triggering, exposure/integration time, and features (pattern matching), reading characters or encoded (bar
shutter speed. Frame grabbers come in various configurations to code) information, detecting the presence of an object or mark-
support different camera types as well as different computer bus ing, comparing objects or matching an object to a template,
platforms (PCI, compact PCI, PC104, ISA, etc.) and guiding a machine or robot.
A computer is a necessary part of a machine-vision system. The inspection process can contain one operation or many
Inspection applications generally require a Pentium III or depending on the requirements and goals. First, you should
equivalent. In general, the faster the PC, the less time the visionidentify what tests you need to adequately inspect the part
system will need to process each image. The vibration, dust, (measurement, presence verification, or optical character
and heat often found in manufacturing environments fre- recognition), as well as what type of defects you expect to
quently require the use of an industrial-grade or ruggedized PC. occur. To help identify which are most important, create a
Software processes incoming image data and makes pass/fail weighted list of required and optional tests. Build a list that
decisions. Machine-vision software can come in many different satisfies the main inspection criteria. You can add additional
forms and can be single function (designed only for one pur- tests later, but keep in mind that more tests means more
pose like LCD inspection, ball grid array inspection, alignment inspection time.
tasks, etc.) or multi-function (designed with a suite of capabili- Knowing your speed requirements for testing is critical.
ties including gauging, bar code reading, robot guidance, Knowing the amount of time the system will have to inspect
presence verification, and so on). each component or part will not only determine the minimum
Once the system has acquired an image, that image and the clock speed of the PC but may also affect the speed of the line.
resulting data may need to be accessed by other users/systems Many machine-vision software packages incorporate a
to control the manufacturing process, communicate pass/fail clock/timer so that each step of the inspection operation can be
information to a database, or both. Usually, a digital I/O inter- closely monitored. From this data, you can modify the program
face board and/or network card makes up the interfacing and/or the motion process of the part to fit within the required
through which the machine-vision system communicates with timing window. Often, PC-based machine-vision systems can
other machines, systems, and databases. inspect 20 to 25 components per second, depending on the
The X-Y positioning table automates the process of acquiring number of measurements or operations required and the speed
images of multiple samples. The table moves a predetermined of the PC used.
distance after each image is acquired to properly position the A machine-vision system is only as strong as its individual
next object or specimen in relation to the camera. The majority components. Any shortcuts made during the selection
of X-Y tables have rapid smooth movement that minimizes process—especially those involved in the optics and imaging
image distortion and virtually guarantees a clean image without path—can greatly reduce the effectiveness of a system. The fol-
the need for using a progressive scan frame grabber. lowing are a few basics you should keep in mind when
choosing components involved in the image path.
choosing your hardware Camera selection is directly tied to the application require-
Careful planning and attention to detail will help ensure that ments and usually involves three main criteria: whether the test
your inspection system meets your application needs. Knowing involves a color-specific imager, whether the parts will be in
motion, and what resolution
will be required. Monochrome
cameras are used for a majority
of inspection applications
because monochrome images
provide 90% of the available
visual data and are less expen-
sive than their color
counterparts. Color cameras
are used when inspection appli-
cations require color-specific
image data to be analyzed.
Whether the part being
inspected is stationary or in
motion will dictate the expo-
Figure A typical machine-vision system generally includes an input source, optics,
sure time and whether a
lighting, a part sensor, a frame grabber, a PC platform, inspection software, digital
standard interlaced camera can
I/O and a network connection, and an X-Y positioning table.
be used or if a progressive-scan
camera is required to ensure a
sharp image. In addition, the
camera’s resolution should be

may 2002 | s p i e ’s oe m a g a z i n e 35
high enough to ensure that it can capture the proper amount choosing your software
of information needed for the inspection task. Finally, cam- The machine-vision software is the centerpiece of the
eras should be high quality and rugged enough to withstand inspection system. The software selected will determine the
vibration, dirt, and heat present in an industrial environment. length of time required to generate and debug inspection
Optics and lighting are often overlooked. When poor optics programs, what inspection operations can be performed,
or lighting is used, even the best machine-vision system will not how well those operations can be performed, as well as
perform as well as a less capable system with good optics and many other important factors (see sidebar).
adequate lighting. Design properly from the beginning, and Machine-vision software packages that provide a graphi-
don’t depend on software to overcome design flaws. The typi- cal user interface are usually easier to program than their
cal goal for optics is to use lenses that produce the sharpest code (Visual BASIC or Visual C++) counterparts but can
clarity and largest usable image, thus providing the best image sometimes be limited when specialized features or func-
resolution. The goal for lighting is to illuminate the key fea- tions are required. Although they require programming
tures being measured or inspected. The type of light used often expertise, code-based packages can be more flexible if
will be dictated by those features, which include the color, tex- you’re developing complex application-specific inspection
ture, size, shape, and reflectivity of the object. algorithms. Some machine-vision software packages offer
Although the frame grabber is only one part of a complete both graphical and code-level development environments,
machine-vision system, it plays a very important role. The providing the best of both worlds and giving users the
choice of frame grabber is defined by the characteristics of the additional flexibility of selecting the environment needed
camera it must interface to—for example, is it monochrome, to match the application requirements as well as the pro-
color, digital, analog, and so on. With digital frame grabbers, gramming expertise available.
the goal is to ensure that the digital image data from the cam- The overall objective for a machine-vision system is to
era is formatted properly prior to passing it onto the PC for perform a quality assurance role by separating the good
processing. With analog frame grabbers, the goal is to acquire parts from the bad ones. To do this, the system needs to
the image data from the camera and convert it to digital data communicate to the manufacturing line that a part is bad
with as little alteration to the image data as possible. so that action can be taken. Usually this information is
Using the wrong frame grabber can introduce errors in the conveyed via the digital I/O board, which is connected to
image data. Industrial frame grabbers are typically used for the manufacturing line’s programmable logic controller
inspection tasks, for example, while multimedia frame grabbers (PLC). The bad part is then separated from the good parts.
should be avoided. Multimedia boards can alter the image data In addition, the machine-vision system may be connected
with automatic gain controls, edge sharpening, and color- to a network to allow data to be transferred to a database
enhancement circuits. Although the images look more for data logging purposes. Data can then be analyzed by
appealing to the eye, when processed by the system’s software quality-control personnel to determine why the fault
they can result in errors that directly affect the accuracy of the occurred.
inspection process. Careful planning at this stage will ensure smooth inte-
Removing as many variables as possible is key. The human gration of the machine-vision system into the line. Many
eye and brain can identify objects in a wide variety of condi- companies would like to network their vision systems so
tions. A machine-vision system is not as versatile; it can only do that remote access is available. Transferring images and
what it has been programmed to do. Knowing what the system data can be very beneficial to the customer to prove total
can and cannot see will help you avoid false failures (wrongly quality control. This information/requirement is very
identifying good parts as bad) or other inspection errors. strategic to the design of a machine-vision system. You
Common variables to consider include ambient lighting, back- must know what PLC will be used and how is it interfaced,
ground color, requirement for image focus, and large changes what types of output signals you’ll require, what kind of
in part color, finish, orientation, or position. Proper camera network is currently used or required, and what kind of
mounting, secure lighting positions, constant and repeatable file formats will be transferred on the network. Typically,
part/component positioning, and blocking of external or sur- communication to a database is done via an RS-232 line
rounding lighting can eliminate many common set-up and connected to the manufacturer’s network to track failure
false-failure problems. information.
New advanced algorithm technologies for dynamic machine- When selecting components for a machine-vision system,
vision applications are emerging that can perform inspection consider future production requirements and changes. This
applications without the need for strict control of operating can directly impact which features will be needed in the
parameters. These algorithms are designed to allow the system machine-vision software/hardware, as well as how easily the
to function efficiently in environments that dynamically system can be altered to meet changing requirements and
change. Machine-vision systems that use these new algorithms different tasks. Planning ahead will not only save time but
are no longer hindered by changes in part orientation, rotation, will help reduce the overall cost of the system if it can be
scaling, lighting, image quality, and so on. A machine-vision used for other inspection tasks in the future. oe
package with dynamic algorithms, such as our DT Vision
Foundry package, can cope with changing parameters. For
example, a search tool based on this technology is well suited to Christopher Poling is senior machine vision applications engineer at Data
applications in which lighting variations, such as poor contrast, Translation, Marlboro, MA. Phone: 508-481-3700; e-mail:
glare, reflection, and inversion, are problematic. [email protected].

36 s p i e ’s o e m a g a z i n e | may 2002
software engineering: Lust
It is an engineer’s nature to anticipate needs and to provide for
THE SEVEN DEADLY SINS them. When developing software, we often believe that more
is better—we can always find a way to use these features
By Phillip Laplante, Penn State University later. “Gold plating,”or lusting for unnecessary features, can
lead to memory and time overloading problems and should be

P erhaps because many imaging engineers are not trained


in software engineering, or because of pressures to com-
plete the project, basic software engineering practices are
avoided.

Greed
often not followed or followed poorly during imaging systems Perhaps the greatest of these sins, greed, is committed
software development. Typical problems include lack of soft- because of our eagerness to bring the software to market. And
ware requirements, poorly written requirements, failure to of all the sins, this is the one that management is most likely to
design for test, poor design of software, and improper or insuf- condone. Yet study after study and years of practical experi-
ficient testing and documentation. Managers, engineers, and ence have shown that investing a modest amount of time early
even customers often excuse these practices by citing pres- in development to focus on specifications, design, and docu-
sures to market, high cost-to-benefit ratio, and (unfulfilled) mentation can save millions in life-cycle costs later.
promises to go back and fix things later.
Poor software-engineering practices early in the project can Gluttony
plague the system long after it is commercialized, costing time, Excess code and over-engineering of algorithms is the bane of
money, and reputation. Therefore, making an early commit- most engineers. We want things not only to work but to be a
ment to good software-engineering practices can pay huge monument of ingenuity. Remember that parsimony and ele-
dividends throughout the software life cycle. gance, without sacrificing clarity, are essential for the
maintenance of a software system through personnel changes
the sins over a long period of time.
My experiences in developing systems and consulting with
other software engineers over the years have caused me to Sloth
realize that there are several thematic problems that occur Perhaps the worst example of software sloth is failure to test
during the course of software development. Whether this situa- the software sufficiently or to test without documentation.
tion exists because of poor training of the engineers, Insufficient testing can foster problems that will emerge later in
management, and customer pressures or simply a culture of the life of the system when sections of the code are stressed by
malaise is unclear. It could be that because everyone is doing expert users. Failure to document testing procedures or to
it, everyone goes along. In any case, these poor software develop a coherent test plan can make it difficult or even
engineering practices can be roughly organized into what I call impossible to test a system as new features are added later.
“The Seven Deadly Sins of Software Development.”
Anger
Pride Believe it or not, engineering can get personal. Team mem-
Failure to document code is one form of excessive pride that is bers stop talking to one another or set about outright
manifest throughout the industry. “My code is self-document- sabotage. This is a management problem, but after all, much
ing” is a familiar protest, along with “I had to work hard to of software engineering falls more rightly into the realm of
develop the algorithm; therefore, others should work just as management than engineering. Team imbalances or personal-
hard to understand it.” The reality is that it simply isn’t possible ity issues need to be identified and fixed immediately.
to make a nontrivial algorithm (such as those we find in imag-
ing applications) easily understandable to every reader of the Phillip LaPlante is an associate professor of software engi-
code. Documentation is a must. neering at Penn State University, West Chester, PA. Phone:
610-725-5314; fax: 610-889-1334;
SPIE
Envy e-mail: [email protected]. member
Every engineer has his/her idol and favorite code written by
that person. Certainly, code reuse is a wonderful and economi-
cal practice when followed correctly. No one wants to rewrite a
My colleagues and I are continuing research into the prac-
module that is thought to work perfectly, and many of us feel ill
tices of imaging engineers in software requirements
equipped to challenge the assumptions or the reputations of
specification. To learn more and to participate in a survey
others. When software is reused indiscriminately and without
assessing the state of affairs, please visit
proper testing and documentation, numerous problems can www.personal.psu.edu/cjn6/survey.html. Participants in
occur, and these are very hard to detect. the survey can request the study results; we hope to pub-
lish these results in an appropriate journal soon.

may 2002 | s p i e ’s oe m a g a z i n e 37

You might also like