Analog cameras dominated the early years of machine vision systems, offering adequate performance, a simple interface, and a moderate price. Technology advances, however, are now tipping the scales in favor of digital cameras for most new and many legacy applications. Dropping prices, standardized interfaces, and opportunities for customized preprocessing are making the analog to digital transition painless and profitable.

Figure 1. Analog camera machine vision systems have a simple camera interface, but require a signal digitizer, a frame grabber for image storage, and a specialized interface card within the host PC.

In the earliest years of machine vision systems, the only video cameras available were those developed for television. These early cameras produced an analog signal at a fixed 30 frames per second with limited resolution. They were neither intended for direct connection to a computer nor for use in a control loop of any kind. To utilize them, machine vision systems needed to incorporate an integrated digitizer and frame grabber to convert and store the video information for processing.

The structure of an image processing system that uses an analog camera has three elements, as shown in Figure 1. The camera provides a simple analog signal, typically conforming to the RS-170 standard, carried on a conventional coaxial cable to the frame grabber. The frame grabber uses an internal digitizer to convert the analog signal to pixels and stores the data in memory. An image processing element, typically a PC, takes data from the frame grabber for processing and display. Because the frame grabber and the image processor are independent system elements, their programming is not automatically coordinated.

Using an external digitizer with an analog camera creates some side effects that complicate image processing. One is ambiguity in the relationship between the physical location that a digital sample represents and the corresponding pixel’s location in the digital image. The digitizer’s sample clock and the camera’s line signal sweep must be coordinated and repeatable for the resulting pixels to produce a spatially correct image. Synchronization errors, as well as timing jitter in the sampling clock, will result in image pixels that are offset from their true location (see Figure 2).

Another side effect of external digitization is that the horizontal and vertical resolution of the image can differ. The analog camera’s line rate determines the image’s vertical resolution and the digitizer’s sample rate determines the horizontal resolution. Without careful matching of the digitizer to the line rate, the image pixels will not represent the square area samples that image processing algorithms assume. Matching to achieve square pixels, however, locks the system data rate to the camera’s line resolution.

Digital cameras behave quite differently. Each light-gathering region on a digital sensor receives independent digitization that does not depend on clock timing, so synchronization is not needed and timing jitter does not introduce spatial distortion. This timing independence means that sensor physical design alone determines both horizontal and vertical resolution, so image pixels are inherently square. Further, the clocking speed for digital camera image transfers becomes, essentially, independent of the image resolution. The only clocking requirement is that the system’s pixel clocking rate must be fast enough to transfer the entire image within the frame time. Even that is not a hard and fast rule. Digital cameras can be configured to transfer out only an area of interest within the image, reducing the requirements on the pixel clock.

Digital Interfaces Simplify

Because the data coming from the camera is digital, the interface to the rest of the machine vision system is somewhat more complex than for analog cameras. Early digital camera designs used proprietary, high-speed interfaces with low-voltage differential signaling (LVDS). This required large, bulky, and expensive cables that could only run for a limited distance before connecting to the frame grabber or processor. Further, because the camera interfaces were proprietary, system developers needed to ensure that the frame grabber or processor interface they used would match the camera’s interface. In practice, this often meant obtaining both elements from the same manufacturer to ensure compatibility.

The situation has been changing over the last decade. Today’s digital cameras now offer improved interfaces to simplify system assembly. They also offer improved image sensors, capable of much higher speeds and resolutions than analog cameras. The digital nature of the sensors has also opened an opportunity for cameras to incorporate functions beyond image capture, increasing system design flexibility.

One of the first changes seen in digital cameras was the development of standard system interfaces. The proprietary digital interfaces limited developers to specific camera/system combinations. The rise of standard interfaces freed developers to mix and match components from different vendors as needed to meet their application requirements

Figure 2. Because analog camera vision systems use an external digitizer, the correspondence between pixels and physical locations depends on synchronized and consistent timing in order to avoid spatial distortion in the image.

CameraLink was one of the first standard digital camera interfaces. Developed in 2000, CameraLink standardized connector pinout and signal electrical characteristics for the interface cable. The cable was still bulky and expensive, however, comprising 26 strands that carry parallel digital bit and control signals. The cable was also still relatively short, with a 10-m length limit as compared to the 100-m length allowable under analog’s RS-170.

More recently, high-speed serial digital camera interfaces have arisen, including FireWire and Gigabit Ethernet (GigE). The move to a high-speed serial interface brought several advantages that addressed CameraLink’s limitations. One advantage was a reduction in cable complexity and cost. A 10-m CameraLink cable has a large, multi-pin connector and costs about $250. A GigE cable, on the other hand, is category 5 coax and costs around $15.

Of the two serial interfaces, GigE may be the most advantageous. The electronics industry’s extensive use of Ethernet ensures that expertise in and support for the GigE interface in machine vision systems is widely available, compared to the more limited availability of FireWire expertise and support. One indicator of the difference in support levels is that FireWire remains a specialty interface, while Ethernet is now a standard interface on almost all new PCs.

A second advantage of GigE over FireWire is the cable length supported. FireWire remains limited to a 10-m length, but GigE is virtually unlimited because it is the interface standard for networking. A camera with a GigE interface can be part of a machine vision system located on the far side of the world. The use of GigE also provides electrical isolation between camera and system and benefits from continuing innovation and technology developments that arise in the networking industry.

The development of standardized camera hardware interfaces has recently led to standardization in the software and control interface as well. Within the last three years, considerable progress has been made toward creating a common set of command options for digital cameras so that applications programs can become independent of the camera choice. Applications simply make standard calls to drivers that handle any data format or other hardware-specific differences.

Camera Capabilities Expand

In addition to improving system interfaces, modern digital cameras have expanded the capabilities of their image sensors. The best analog cameras today have a resolution limit of about 1 Mpixel with 30 to 60 frames per second (fps) image capture speed, for a data rate of about 40 MHz. Digital cameras, on the other hand, can easily achieve 100 to 200 fps with digitization speeds up to 160 MHz and resolutions that can go beyond 10 Mpixel.

Digital cameras also provide a much simpler and cheaper approach to color than analog cameras. In digital cameras, the three color signals (red-green-blue) are all automatically synchronized and use the same serial interface as monochrome cameras. Analog cameras, on the other hand, must provide three independent signals and synchronization of the digitization process requires careful handling in the frame grabber. A composite color video signal that needs only a single cable is possible, but at the cost of reduced resolution and color fidelity.

One of the latest innovations in digital cameras for machine vision is the availability of image preprocessing in the camera. A preprocessed video signal still has the data structure of an image, but has undergone some changes in the data content. The range of possibilities for the kind of changes a camera can introduce is wide open. For instance, a digital camera can readily put a time stamp on each image frame by selectively replacing data with white or black pixels to form numeric characters in the displayed image. Other possibilities include flipping the image vertically or horizontally, passing data through a threshold filter, or adjusting gain to increase contrasts. Many of these tasks are difficult or impossible to implement in an analog format.

A side benefit of in-camera preprocessing is that it does not affect the system interfaces or hardware design. The camera can achieve its preprocessing by routing the sensor data through an FPGA for manipulation before passing it on to the rest of the system. From a system design standpoint, all that changes is the interpretation of the data coming in. In many cases, preprocessing can eliminate tasks that would otherwise be handled in the image processor, reducing processing demands and increasing system performance.

As a result of these innovations and the inherently digital nature of the image data, digital cameras provide vastly greater design flexibility and simpler system design than analog cameras. By ensuring that pixels are automatically square and reliably represent the same point on the image every frame, digital cameras eliminate the calibration that analog cameras require for their digitizers. Similarly, digital cameras can handle white balance calibration automatically while analog systems require manual calibration in both the camera and frame grabber.

The use of digital cameras also simplifies system design by supporting the easy implementation of configuration options. Changing the image resolution of an analog camera machine vision system, for instance, also forces timing changes in the frame grabber and alters the digitizer clock speed. To recalibrate and resynchronize the system to the new camera requires considerable frame grabber expertise. Changing digital system resolution, on the other hand, involves only replacing the camera and altering the data clocking rate, with perhaps some software modification to handle the new data structure.

Digital camera systems are also easier to set-up and maintain. While analog systems require coordination between camera and frame grabber, both of which are have independent controls, all elements of a digital camera system can be controlled from the PC used for image processing.

Adopting Digital Reduces Costs

All the advantages that digital cameras with GigE interfaces offer machine vision systems makes them a logical choice for new designs, despite their price premium of about 20% over comparable analog cameras when such analog cameras of sufficient performance are available. But digital cameras also make sense as an upgrade step for existing vision systems. While many legacy analog camera vision system applications will never require the high performance obtainable only with digital cameras, performance is not the only reason to upgrade.

There are several triggering events that can justify making the investment to replace analog camera machine vision systems with digital ones. One is a change in system performance requirements that analog systems cannot readily handle. A desire to increase the throughput of a visual inspection system, which is set by the camera frame rate, may require performance beyond the range of analog cameras. A new need for color vision can also prompt movement to a digital camera for its greater simplicity and minimal calibration requirements.

The need to replace failing components or ones that have become obsolete can be another triggering event. Most of the new development in electronics concentrates on digital systems, so a replacement for an obsolete analog camera that offers equivalent or better performance may be difficult to find.

It may also be appropriate to replace an analog camera vision system in order to reduce the cost and complexity of system maintenance. Analog systems require frame grabbers and specialized interface cards on the host PC to allow transfer of data out of the frame grabber. Digital systems no longer require frame grabbers. Data storage occurs either in the camera or in the host PC. Further, with GigE, the camera interface is already built into an off-the-shelf PC so no specialized hardware is needed.

This article was written by Yvon Bouchard, Director of Systems Architecture at DALSA, Montreal, QE, Canada.