What is machine vision?

Interelationship of machine v ision, image processing and computational visionMachine vision encompasses computer science, optics, mechanical engineering, and industrial automation. Unlike computer vision which is mainly focused on machine-based image processing, machine vision integrates image capture systems with digital input/output devices and computer networks to control manufacturing equipment such as robotic arms. Manufacturers favour machine vision systems for visual inspections that require high-speed, high-magnification, 24-hour operation, and/or repeatability of measurements.
 

Components of a machine vision system

Links: image capture  |  lighting  |  cameras and lenses   |  image processing

A typical machine vision system will consist of most of the following components:

  • One or more digital or analogue cameras (black-and-white or colour) with suitable optics for acquiring images, such as lenses to focus the desired field of view onto the image sensor and suitable, often very specialized, light sources
  • Input/Output hardware (e.g. digital I/O) or communication links (e.g. network connection or RS-232) to report results
  • A synchronizing sensor for part detection (often an optical or magnetic sensor) to trigger image acquisition and processing and some form of actuators to sort, route or reject defective parts
  • A program to process images and detect relevant features.

The aim of a machine vision inspection system is typically to check the compliance of a test piece with certain requirements, such as prescribed dimensions, serial numbers, presence of components, etc. The complete task can frequently be subdivided into independent stages, each checking a specific criterion. These individual checks typically run according to the following model:

  1. Image Capture
  2. Image Preprocessing
  3. Definition of one or more (manual) regions of interest
  4. Segmentation of the objects
  5. Computation of object features
  6. Decision as to the correctness of the segmented objects

Naturally, capturing an image, possible several for moving processes, is a pre-requisite for analysing a scene. In many cases these images are not suited for immediate examination and require pre-processing to change certain sizing specific structures etc. In most cases it is at least approximately known which image areas have to be analysed, i.e. the location of a mark to be read or a component to be verified. These are called Regions of Interest (ROIs) (sometimes Area of Interest or AOIs). Of course, such a region can also comprise the entire image if required.

A process called segmentation is used to isolate these objects. Because of the essential role of this step, various segmentation methods are used in machine vision. Once the objects have been segmented, characteristic properties can be computed, such as area, perimeter, position, orientation, distance from each other, similarity to predefined patterns (e.g. for character recognition). Finally, these properties are checked for compliance with the nominal values of the inspection task.

Let's look at the image capture and image processing in a bit more detail.

Image capture

 

white lighting of printed circuit boards

Consider items for visual analysis traveling on a fast-moving conveyor belt; the image capture system must know when they are in the right place, light the scene, capture the image and transmit the result for processing before the next sample arrives. Selection of trigger sensors is no problem; the next consideration is lighting.

Lighting
 
red lighting pistons
directional lighting of a sprocket

There are two basic lighting set-ups, front lighting and back lighting. The choice depends on the inspection required, front lighting is good for highlighting surface items such as print, etched numbers, etc whereas back lighting provides better contrast for, for example, gauging and positioning tasks.

Front or back sorted - but what type of light? Directional lighting is great for picking out surface effects, just as human tilts an object to view it from different angles to help identify surface structures but shadows may be a problem. Diffused lighting helps eliminate shadows and reflections making it better for positional checking. Another way to eliminate reflections - and improve contrast on transparent pieces is to polarise the light source and use a polarising filter on the camera (polarised back lighting can even render surface tensions visible). Ring lights provide intense shadow-free lighting along the optical axis and are often combined with polarising filters to remove troublesome reflections.

It is also worth remembering that infra-red and ultra-violet can be used - with a suitable camera - as light sources to achieve the required illumination.

Cameras and lenses
 
camera inspecting cog wheels
selection of camera lenses

Historically, a video camera produces an analogue signal that is digitised for processing using a frame grabber. Today, rapid market acceptance of digital cameras, fuelled by the development of compact, high performance CCD imaging technology, has eliminated the frame grabber as the digital image is immediately available for transfer by FireWire, USB or Gigabit Ethernet (GigE).

Some applications will require more than one camera, depending on the speed of a production line, the size of the object to be inspected and the type of image analysis required. Similarly, area scan cameras are inappropriate for some applications such as scanning a continuously moving sheet. For these applications a linescan camera is a better solution.

Regardless of the camera technology, correct choice of lens is paramount. Telecentric lenses offer high accuracy images of small objects, making them ideal for a variety of gauging and character recognition applications. Fisheye lenses allow images of larger objects to be captured but with significant barrel distortion, making them better for presence and positional verification.

Image processing
 
Typical machine graphical interface
Software screen for programming camera control
Screen grab from piston inspection line
Production line go/nogo decision
Typical software training environment

By their very nature, machine vision image processing applications are extremely diverse and application developers need easy to use software offering a flexible programming environment and simple custom vision tools and applications creation. It is the software that drives the image acquisition, processing and analysis functions and controls the hardware - and so should provide.

  • A camera-centric easy to use drag and drop graphical user interface
  • Highly flexible camera control
  • Live grab and display windows for real-time parameter tweaking
  • High performance tools to optimize signal inter-relationships and precise setting

It needs to be supported by software that deliver a comprehensive pallet of image filters, such as:

  • Point-to-point operators for averaging, subtraction, etc
  • Neighbourhood filters with variable and flexible kernel sizes
  • Morphological tools, both grey scale and binary
  • Basic and locally adaptive threshold techniques
  • Geometry tools that allow the image to be cropped, flipped, rotated, or sheared
  • Measurement tools that perform horizontal and vertical projections and calculate vector differences
  • Segmentation to separate foreground objects from the background

While the image processing software gets the data into a useable state, it’s the analysis functions that actually extracts the information upon which accept/reject decisions are made. Common analysis functions include:

  • Gauging or measurement
  • Pattern matching
  • Blob analysis
  • Optical character recognition (OCR) and barcode decoding
  • Surface inspection
  • Colour analysis
latest rss feeds
downloads
Digital Imaging Technology
download The principles of CCDs (charge-coupled devices) used in modern digital cameras
A software approach to integrated machine vision
download The performance of dedicated libraries combined with graphical rapid prototyping tools and extensible components
User interface design for machine vision software
download The best machine vision algorithms are useless if the user is unable to operate the system properly
Neural networks in machine vision
download A printing case study explains how neural networks work to aid character recognition
splash image

Machine vision inspection system

Two smart cameras combine with synchronising sensors and routing actuators to inspect components on a moving production line.