SIX (6) CRITICAL FACTORS FOR SELECTING A MACHINE VISION SYSTEM

February 26, 2015


For those who might be a little bit unsure as to the definition of machine vision (MV), let’s now define the term as follows:

“ Machine vision (MV) is the technology and methods used to provide imaging-based automatic inspection and analysis for such applications as automatic inspection, process control, and robot guidance in industry.”

There are non-industrial uses for MV also, such as 1.) Law enforcement,  2.) Security,  3) Facial recognition and 4.)  Robotic surgery.  With this being the case, there must be several critical, if not very critical, aspects to the technology that must be considered prior to purchasing an MV system or even discussing MV with a vendor.  We will now take a closer look as to those critical factors.

CRITICAL FACTORS:

As with any technology, there are certain elements critical to success. MV is no different.  There are six (6) basic and critical factors for choosing an imaging system.  These are as follows:

  • Resolution–A higher resolution camera will undoubtedly help increase accuracy by yielding a clearer, more precise image for analysis.   The downside to higher resolution is slower speed. The resolution of the image required for an inspection is determined by two factors: 1.) the field of view required and 2.) minimal dimension that must be resolved by the imaging system. Of course, lenses, lighting, mechanical placement and other factors come into play, but, if we confine our discussion to pixels, we can avoid having to entertain these topics.  This allows us to focus on the camera characteristics. Using an example, if a beverage packaging system requires verification that a case is full prior to sealing, it is necessary for the camera to image the contents from above and verify that twenty-four (24) bottle caps are present. It is understood that since the bottles and caps fit within the case, the caps are then the smallest feature within the scene that must be resolved. Once the application parameters and smallest features have been determined, the required camera resolution can be roughly defined. It is anticipated that, when the case is imaged, the bottle caps will stand out as light objects within a dark background. With the bottle caps being round, the image will appear as circles bounded by two edges with a span between the edges. The edges are defined as points where the image makes a transition from dark to light or light to dark. The span is the diametrical distance between the edges. At this point, it is necessary to define the number of pixels that will represent each of these points. In this application, it would be sufficient to allow three pixels to define each of the two edges and four pixels to define the span. Therefore, a minimum of ten pixels should be used to define the 25mm bottle cap in the image. From this, we can determine that one pixel will represent 2.5mm of the object itself. Now we can determine the overall camera resolution. Choosing 400mm of the object to represent the horizontal resolution of the camera, the camera then needs a minimum of 400/2.5 = 160 pixels of horizontal resolution. Vertically, the camera then needs 250/2.5 = 100 pixels vertical resolution. Adding a further 10% to each resolution to account for variations in the object location within the field of view will result in the absolute minimum camera resolution. There are pros and cons to image resolution as follows.

Pros and cons of increasing resolution

Digital cameras transmit image data as a series of digital numbers that represent pixel values. A camera with a resolution of 200 x 100 pixels will have a total of 20,000 pixels, and, therefore, 20,000 digital values must be sent to the acquisition system. If the camera is operating at a data rate of 25MHz, it takes 40 nanoseconds to send each value. This results in a total time of approximately .0008 seconds, which equates to 1,250 frames per second. Increasing the camera resolution to 640 x 480 results in a total of 307,200 pixels, which is approximately 15 times greater. Using the same data rate of 25MHz, a total time of 0.012288 seconds, or 81.4 frames per second, is achieved. These values are approximations and actual camera frame rates will be somewhat slower because we have to add exposure and setup times, but it is apparent that an increase in camera resolution will result in a proportional decrease in camera frame rate. While a variety of camera output configurations will enable increased camera resolution without a sacrifice in frame rate, these are accompanied by additional complexity and associated higher costs.

  • Speed of Exposure—Products rapidly moving down a conveyor line will require much faster exposure speed from vision systems.  Such applications might be candy or bottled products moving at extremely fast rates. When selecting a digital camera, the speed of the object being imaged must be considered as well.   Objects not moving during exposure would be perfectly fine with relatively simple and an inexpensive camera or cameras.  These could be used and provide perfectly satisfactory results. Objects moving continuously require other considerations. For other cases, objects may be stationary only for very short periods of time then move rapidly.  If this is the case, inspection during the stationary period would be the most desirable.

Stationary or slow-moving objects: Area array cameras are well suited to imaging objects that are stationary or slow moving. Because the entire area array must be exposed at once, any movement during the exposure time will result in a blurring of the image. Motion blurring can; however, be controlled by reducing exposure times or using strobe lights.

Fast-moving objects: When using an area array camera for objects in motion, some consideration must be taken for the amount of movement with respect to the exposure time of the camera and object resolution where it is defined as the smallest feature of the object represented by one pixel. A rule of thumb when acquiring images of a moving object is that the exposure must occur in less time than it takes for the object to move beyond one pixel. If you are grabbing images of an object that is moving steadily at 1cm/second and the object resolution is already set at 1 pixel/mm, then the absolute maximum exposure time required is 1/10 per second. There will be some amount of blur when using the maximum amount of exposure time since the object will have moved by an amount equal to 1 pixel on the camera sensor. In this case, it is preferable to set the exposure time to something faster than the maximum, possibly 1/20 per second, to keep the object within half a pixel. If the same object moving at 1cm/second has an object resolution of 1 pixel/micrometer, then a maximum exposure of 1/10,000 of a second would be required. How fast the exposure can be set will be dependent on what is available in the camera and whether you can get enough light on the object to obtain a good image. Additional tricks of the trade can be employed when attempting to obtain short exposure times of moving objects. In cases where a very short exposure time is required from a camera that does not have this capability, an application may make use of shutters or strobed illumination. Cameras that employ multiple outputs can also be considered if an application requires speeds beyond the capabilities of a single output camera.

  • Frame Rate–The frame rate of a camera is the number of complete frames a camera can send to an acquisition system within a predefined time period.  This period is usually stated as a specific number of frames per second.  As an example, a camera with a sensor resolution of 640 x 480 is specified with a maximum frame rate of 50 frames per second. Therefore, the camera needs 20 milliseconds to send one frame following an exposure. Some cameras are unable to take a subsequent exposure while the current exposure is being read, so they will require a fixed amount of time between exposures when no imaging takes place. Other types of cameras, however, are capable of reading one image while concurrently taking the next exposure. Therefore, the readout time and method of the camera must be considered when imaging moving objects. Further consideration must be given to the amount of time between frames when exposure may not be possible.
  • Spectral Response and Responsiveness–All digital cameras that employ electronic sensors are sensitive to light energy. The wavelength of light energy that cameras are sensitive to typically ranges from approximately 400 nanometers to a little beyond 1000 nanometers. There may be instances in imaging when it is desirable to isolate certain wavelengths of light that emanate from an object, and where characteristics of a camera at the desired wavelength may need to be defined.  A matching and selection process must be undertaken by application engineers to insure proper usage of equipment relative to the needs at hand. There may be instances in imaging when it is desirable to isolate certain wavelengths of light that emanate from an object, and where characteristics of a camera at the desired wavelength may need to be defined. Filters may be incorporated into the application to tune out the unwanted wavelengths, but it will still be necessary to know how well the camera will respond to the desired wavelength. The responsiveness of a camera defines how sensitive the camera is to a fixed amount of exposure. The responsiveness of a camera can be defined in LUX or DN/(nJ/cm^2). “LUX” is a common term among imaging engineers that is used to define the sensitivity in photometric units over the range of visible light, where DN/ (nJ/ cm^2) is a radiometric expression that does not limit the response to visible light. In general, both terms state how the camera will respond to light. The radiometric expression of x DN/ (nJ/cm^2) indicates that, for a known exposure of 1 nJ/cm^2, the camera will output pixel data of x DN (digital numbers, also known as grayscale). Gain is another feature available within some cameras that can provide various levels of responsiveness. The responsiveness of a camera should be stated at a defined gain setting. Be aware, however, that a camera may be said to have high responsiveness at a high gain setting, but increased noise level can lead to reduced dynamic range.
  • Bit Depth–Digital cameras produce digital data, or pixel values. Being digital, this data has a specific number of bits per pixel, known as the pixel bit depth.  Each application should be considered carefully to determine whether fine or coarse steps in grayscale are necessary. Machine vision systems commonly use 8-bit pixels, and going to 10 or 12 bits instantly doubles data quantity, as another byte is required to transmit the data. This also results in decreased system speed because two bytes per pixel are used, but not all of the bits are significant. Higher bit depths can also increase the complexity of system integration since higher bit depths necessitate larger cable sizes, especially if a camera has multiple outputs. Digital cameras produce digital data, or pixel values. Being digital, this data has a specific number of bits per pixel, known as the pixel bit depth. This bit depth typically ranges from 8 to 16-bits. In monochrome cameras, the bit depth defines the quantity of gray levels from dark to light, where a pixel value of 0 is %100 dark and 255 (for 8-bit cameras) is %100 white. Values between 0 and 255 will be shades of gray, where near 0 values are dark gray and near 255 values are almost white. 10-bit data will produce 1024 distinct levels of gray, while 12-bit data will produce 4096 levels. Each application should be considered carefully to determine whether fine or coarse steps in grayscale are necessary. Machine vision systems commonly use 8-bit pixels, and going to 10 or 12 bits instantly doubles data quantity, as another byte is required to transmit the data. This also results in decreased system speed because two bytes per pixel are used, but not all of the bits are significant. Higher bit depths can also increase the complexity of system integration since higher bit depths necessitate larger cable sizes, especially if a camera has multiple outputs.
  • Lighting— Perhaps no other aspect of vision system design and implementation consistently has caused more delay, cost-overruns, and general consternation than lighting. Historically, lighting often was the last aspect specified, developed, and or funded, if at all. And this approach was not entirely unwarranted, as until recently there was no real vision-specific lighting on the market, meaning lighting solutions typically consisted of standard incandescent or fluorescent consumer products, with various amounts of ambient contribution.  The following lighting sources are now commonly used in machine vision:
  • Fluorescent
  • Quartz Halogen – Fiber Optics
  • LED – Light Emitting Diode • Metal Halide (Mercury)
  • Xenon
  • High Pressure Sodium

Fluorescent, quartz-halogen, and LED are by far the most widely used lighting types in machine vision, particularly for small to medium scale inspection stations, whereas metal halide, xenon, and high pressure sodium are more typically used in large scale applications, or in areas requiring a very bright source. Metal halide, also known as mercury, is often used in microscopy because it has many discrete wavelength peaks, which complements the use of filters for fluorescence studies. A xenon source is useful for applications requiring a very bright, strobed light.

Historically, fluorescent and quartz halogen lighting sources have been used most commonly. In recent years, LED technology has improved in stability, intensity, and cost-effectiveness; however, it is still not as cost-effective for large area lighting deployment, particularly compared with fluorescent sources. However, on the other hand, if application flexibility, output stability, and longevity are important parameters, then LED lighting might be more appropriate. Depending on the exact lighting requirements, oftentimes more than one source type may be used for a specific implementation, and most vision experts agree that one source type cannot adequately solve all lighting issues. It is important to consider not only a source’s brightness, but also its spectral content.  Microscopy applications, for example often use a full spectrum quartz halogen, xenon, or mercury source, particularly when imaging in color; however a monochrome LED source is also useful for B&W CCD camera, and also now for color applications, with the advent of “all color – RGB” and white LED light heads. In those applications requiring high light intensity, such as high-speed inspections, it may be useful to match the source’s spectral output with the spectral sensitivity of your particular vision camera. For example, CMOS sensor based cameras are more IR sensitive than their CCD counterparts, imparting a significant sensitivity advantage in light-starved inspection settings when using IR LED or IR-rich Tungsten sources.

Vendors must be contacted to recommend proper lighting relative to the job to be accomplished.

Advertisements

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: