In a machine-vision application, an electronic camera serves a simple purpose: It converts a pattern of photons to a pattern of electrons. Those electrons represent visual information that a computer can use to determine the quality of a product. Almost all cameras include three basic elements: a lens that gathers light, a detector that converts photons to electrons, and circuits that control timing and send image information to an external device.
 |
|
Figure 1 Standard lenses come with various characteristics such as focal lengths, magnification ranges, and depths of view. Courtesy of Linos Photonics. |
Light enters a camera through a lens chosen for a specific requirement such as magnification or large field of view (Figure 1). The lens gathers light reflected from a product undergoing inspection and focuses the light on a solid-state detector. In most cases, you choose the lens based on what you want to inspect and the type of detector the camera provides. Lens manufacturers can help you determine what type of lens you need for a specific vision task (Ref. 1).
Most machine-vision cameras accept either cine-mount (C-mount) or cine-short-mount (CS-mount) lenses. Both types use a 1-in.-diameter, 32-thread/in. screw-in mount, often noted in lens and camera specs as simply a 1x32 thread. Although both lenses use the same mount, you cannot simply interchange them. A C-mount lens produces a focal plane 17.52 mm behind the camera's flange, and a CS-mount lens produces a focal plane only 12.52 mm behind the lens flange.
You can use a C-mount lens with a camera that accepts a CS-mount lens, however, by using an adapter/extender ring supplied by lens manufacturers. This adapter extends the CS-mount lens an additional 5 mm from the camera body. You cannot adapt a CS-mount lens to a C-mount camera. Lens suppliers offer other types of lens mounts (Table 1 ), but the C- and CS-mount lenses have proven the most popular for machine-vision applications.
CCDs still rule
 |
|
Figure 2 A camera contains a solid-state image detector positioned so that the detector's surface resides at the focal plane for a compatible lens. Camera courtesy of Cohu. |
After passing through the lens, light reaches a solid-state image detector (Figure 2) that converts the photons in the image into electrical signals. Camera manufacturers can choose either charge-coupled devices (CCDs) or complementary metal-oxide semiconductor (CMOS) devices as image detectors. New CMOS devices offer some advantages, such as the need for fewer voltages and the capability to integrate more electronics on a detector chip, but for now, the older, highly capable CCDs predominate in industrial-grade and research-grade cameras (Ref. 2).
A detector provides an array of individual sensors arranged either in a rectangular matrix, used in an area camera, or arranged in a single line, used in a line-scan camera. Machine-vision applications can take advantage of both types of cameras.
Line-scan cameras "build" an image a line at a time as an object moves past the camera, much like a piece of paper moves past a line of sensors in a fax machine. A factory, for example, might use a line-scan camera to view continuous strips of metal. As the metal moves past the camera, a computer builds a continuous image and analyzes it in real time for defects. The number of individual sensors, usually called pixels (picture elements), in a line-scan detector can range from about 500 to more than 8000, depending on the detector model.
Area-scan detectors capture an entire image at one time. The horizontal and vertical dimensions approximate a standard 4:3 aspect ratio, and detectors come in standard physical sizes (Table 2). The names of the detector formats don't correspond to actual dimensions; their nomenclature was passed down from TV-camera characteristics. The detector areas range from 640x480 pixels to as many as 2000x2000 pixels. Cameras with more than 1 million pixels usually go by the generic name of "megapixel" cameras.
You might think that physical size would relate directly to the number of sensors on a detector, but a small detector format doesn't necessarily mean a small number of pixels. Manufacturers can scale their detectors to provide, for example, a 1024x1024-pixel detector on either a 2/3-in. detector or a 1-in detector.
Check pixel specs
You must carefully read camera specifications to determine how many active pixels a camera supplies. Although a camera may specify an x-by-y-pixel detector, the video output may not contain all those pixels. Look for the dimensions (in pixels) of the effective detector area!the part that will pick up an image. Also look in the specs for the "area" (in pixels) that will appear in the camera's video output. The effective area and video-output area aren't necessarily the same.
Manufacturers of solid-state image detectors use a variety of techniques, such as frame transfer, interline transfer, and multi-tap output, to obtain the charge or voltage produced by each sensor (Ref. 3). In every case, manufacturers aim to transfer image information out of a detector as quickly as possible. The longer image information stays in a detector, the longer it remains susceptible to noise and other detrimental electrical effects caused by the physics of the semiconductor device. Also, a speedy readout of data lets a detector acquire images in rapid succession.
Capture color images
 |
|
Figure 3 A color camera relies on optical components to split light into separate red, green, and blue images. In effect, the camera captures three images, one per color. |
Gray-scale (black-and-white) images work well in many machine-vision applications, but some applications require color. A color camera breaks the light from an image into its red, green, and blue wavelengths and uses an individual detector for each (Figure 3). The detectors require careful alignment to ensure the three color images overlap properly to form a complete color image. Although three-detector systems offer high resolution, they attenuate light significantly because of extra optics in the light paths.
To simplify color imaging, some detector manufacturers place tiny color filters on the sensor arrays. One configuration uses alternating rows (or columns) of red, green, and blue filters, while another configuration places color filters on a sensor array in a pixel-by-pixel checkerboard pattern (Figure 4). Because each sensor responds to light of only one color, a detector's output requires computer processing to approximate the original color image.
 |
|
Figure 4 A detector that acquires color images separates colors by placing a small color filter over individual sensors in an array. Pattern types include alternating color lines and checkerboard patterns. |
A new sensor technology from Foveon (Santa Clara, CA; www.foveon.com) may overcome the need to interpolate image data in which pixels can represent only one color. The Foveon X3 sensor takes advantage of silicon's ability to absorb light at different wavelengths, depending on the thickness of the silicon layer. By sandwiching layers of silicon-based sensors in an array, the company has produced a device that will detect red, green, and blue light at each pixel (Figure 5).How will you scan?
Some area cameras produce images!often called frames!in either an interlaced-scan or a progressive-scan format. Interlaced-scan cameras rely on an old TV standard that scans even-numbered horizontal lines and then odd-numbered horizontal lines across an image. A TV receiver, or a monitor, interlaces these repetitive even-odd scans to produce complete images. Each even- or odd-line scan requires 1/60 of a second, so an interlaced-scan system produces 30 images/s or 30 frames/s. (I've assumed NTSC timing!see Table 3.) In many machine-vision applications, an interlaced-scan camera will work well. But because the camera relies on successive scans, if a product moves between scans, the resulting image may appear blurred.
 |
|
Figure 5 The Foveon image sensor relies on the color absorption in thin layers of silicon to separate colors at three levels. Thus, each pixel provides complete red, green, and blue color information. |
A progressive-scan camera, on the other hand, acquires an image all at once, so it can acquire 60 frames/s, essentially doubling a production line's throughput. Progressive-scan cameras also offer the advantage of short exposure times, also called fast shutter times. The camera doesn't actually have a mechanical shutter, but electronics in the camera allow its CCD detector to accumulate light for very short periods, providing a shutter-like function. The short exposures let progressive-scan cameras capture high-speed events. Some progressive-scan cameras can operate with shutter speeds as short as 100 µs.
A few progressive-scan cameras offer another capability: They can scan just part of an image. This is a useful capability if you need to inspect only a portion of a product. By acquiring, say, half an image, the camera saves scanning time, and a smaller image reduces processing time in a host PC. Cameras that offer partial scans can image one half, one quarter, or one eighth of a full scan, depending on how you set them up.
Signals follow TV standards
To ease the task of getting image data into a computer or other controller, cameras provide a video signal that conforms to one of the TV standards noted in Table 3. A video signal comes out of a camera through a standard BNC or other connector and connects to a computer through a length of coaxial cable. The TV-type signals carry timing information as well as video information (Ref. 4). In addition to a video-output connector, a camera may include separate connections for a power supply and control signals.
A video signal from a camera doesn't simply connect to a spare I/O port on a PC. The PC requires a special add-in interface board, called a frame grabber, which converts the video signal into bits and bytes. A frame grabber provides low-noise circuits that extract timing information and digitize pixel information, usually with either an 8-bit or a 10-bit analog-to-digital converter (ADC).
Suppliers separate signals
Standard TV-video signals suffice in many machine-vision applications, but they limit camera manufacturers' ability to offer faster scanning speeds, higher pixel counts, and other benefits. Many camera manufacturers supply separate video and timing signals that require special types of frame grabbers. The manufacturers of cameras and frame grabbers work together to ensure buyers can choose compatible products and obtain ready-made cables to connect them.
A typical camera that provides separate video and timing signals could supply individual connections for power and ground, a video-output signal, horizontal and vertical timing signals, a pixel-clock signal, a trigger input, and so on. The camera also might furnish serial I/O lines and a trigger input. These signals simplify camera control and expand how a user can apply a camera. The availability of separate timing and video information, for example, removes the constraints of the TV-type image formats and lets camera vendors use megapixel detectors.
Many camera manufacturers have adopted standard Hirose Electric (Tokyo, Japan) connectors for video and control signals. It's unlikely you'll have to wire your own connectors and cables, but if you hear people mention a Hirose (pronounced hee-row-see) connector, you'll know what they're talking about.
Rather than relying on frame grabbers to perform analog-to-digital conversions, some suppliers build ADCs into their cameras. Moving the converter and timing circuitry from a PC into a camera can reduce noise and simplify the frame-grabber circuitry. The ADC and digital circuits add to the cost of "digital" cameras, but they lower the cost of the associated PC interface. Unfortunately, not all digital cameras provide compatible digital signals or standard connectors. Camera and frame-grabber vendors supply lists of compatible products, however.
Adopt a new standard
To help simplify the job of specifying and setting up machine-vision systems, many camera manufacturers have adopted the digital Camera Link standard. This standard specifies the use of low-voltage differential signaling (LVDS) between computers and cameras, and it specifies several data formats. Cameras that conform to the Camera Link standard carry a special logo and include a standard digital I/O connector. The Camera Link interface provides several standard configurations that transfer digital information over parallel LVDS lines. The spec also provides for control and timing signals and for a serial-communication port.
Several manufacturers also sell cameras that connect to a computer through an IEEE 1394 "Firewire" interface, a high-speed serial connection (Ref. 5). And because manufacturers have moved the boundary between analog video signals and digital communications into the camera body, soon you can expect to see image-processing tasks take place within cameras. The addition of processing tasks to a camera's capabilities will reduce the data-analysis load placed on the host computer in a machine-vision system. So, the interface between a PC and a camera may get even simpler and easier to specify and use.
For more information
See the Inspection section on the Test & Measurement World Web site: www.tmworld.com/ins.
Table 1 . Lens mount characteristics
| Lens-mount type |
Thread type |
Compatible detector format |
| C |
1 x 32 |
1/4 to 1 in. |
| CS |
1 x 32 |
1/5 to 2/3 in. |
| S |
M12 x 0.5* |
< 1/2 in |
| T |
M42 x 0.75* |
> 1/2 in. |
| X |
M10 x 0.5* |
> 1/2 in. |
Table 2. Detector formats
| Detector format (in.) |
Approximate diagonal (mm) |
Actual dimensions, horizontal x vertical (mm) |
| 1/7 |
2.3 |
1.9 x 1.5 |
| 1/6 |
2.7 |
2.2 x 1.6 |
| 1/5 |
3.2 |
2.6 x 2.2 |
| 1/4 |
4 |
3.2 x 2.4 |
| 1/3 |
6 |
4.8 x 3.6 |
| 1/2 |
8 |
6.4 x 4.8 |
| 2/3 |
11 |
8.8 x 6.6 |
| 1 |
16 |
12.8 x 9.6 |
Table 3. Standard television signals and formats
| Format |
Mode |
Signal name |
Frame rate (frames/s) |
Vertical Lines |
Image size |
Geographic USE1 |
| NTSC |
B/W |
RS-170 |
30 |
525 |
640 x 480 |
USA, Japan |
|
Color |
NTSC |
29.97 |
525 |
|
|
| PAL |
B/W |
CCIR |
25 |
405 |
768 x 576 |
Europe (not France) |
|
Color |
PAL color |
25 |
625 |
|
|
| SECAM |
B/W |
|
25 |
819 |
N/A |
France, Eastern Europe |
|
Color |
|
25 |
625 |
|
|