Global TMW:
Login  |  Register          Free Newsletter Subscription
Subscribe
Email
Print
Reprint
Learn RSS

Match Camera Triggering To Your Application

Triggering your camera properly helps you get the right images for inspection.

Pierantonio Boroero and Robert Rochon, Matrox, Dorval, QC, Canada -- Test & Measurement World, 8/1/1998

You decide to set up a basic inspection system with just a camera, a frame-grabber board, a PC, and some software. That arrangement will work, but the camera will only produce 25 or 30 images per second, many of which you won’t want or won’t use. You can tailor an inspection system to better meet your needs by learning about the various methods for triggering a camera. Triggering lets you control a camera so you obtain just the right exposure and only the image or images you need, when you need them.

You can apply triggering techniques to many types of cameras, but we’ll describe triggering for area-scan cameras, the ones found in the majority of inspection systems. An area-scan camera acquires a complete two-dimensional (2-D) image all at once. After it acquires an image, the camera transfers the analog or digital data that represent the image to a frame-grabber board that resides in a PC or other computer system. The frame grabber “reassembles” the information into a matrix of pixels that the computer can process. You can choose cameras and frame grabbers from many manufacturers, but you must consult with the manufacturers to find combinations that offer the trigger mode you deem suitable for your application.

Cameras can operate in one of several different modes, including continuous, pseudo-continuous, trigger, asynchronous reset, and control modes. Not all combinations of frame grabbers and cameras provide for all the operating modes, though. (Although this article does not cover software, you should realize that not all camera-control software supports all modes, either. You’ll need to ensure that your software supports the operating mode you choose.) The terms that manufacturers use to describe modes and signals may vary. Unfortunately, no standard exists, so for consistency and clarity, we have used the naming conventions our company uses.

Cameras Operate Continuously
Most common video cameras operate in a continuous mode, in which the camera continuously produces image data at a fixed frame rate. In North America, we adhere to a standard rate of 30 images/s (60 fields/s), while European cameras are standardized on 25 images/s (50 fields/s). You probably recall that general-purpose video cameras interlace odd and even fields to produce a complete image. Progressive scan cameras scan an image just once. Such cameras produce noninterlaced images. This article covers progressive-scan area cameras. You can purchase cameras that acquire frames at rates greater than 60 images/s as well as cameras that acquire images at slower rates.

During continuous-mode operation, exposure time—the time during which the camera picks up light from the subject—can be as great as the reciprocal of the frame rate. Thus, a 30 images/s rate equals a 33.3-ms exposure time per image. Some cameras let you adjust the exposure to a shorter time, on the order of milliseconds, but the frame rate remains constant. Exposure of the current frame and transfer of the previous frame occur concurrently in continuous mode. Therefore, an exposure time cannot exceed the frame transfer time.

Many continuous-mode cameras produce an analog video signal (Fig. 1), which incorporates both a horizontal synchronization signal (horizontal sync or hsync) and a vertical synchronization signal (vertical sync or vsync). When you have such a composite signal, a frame-grabber board can acquire and digitize video frames without requiring any other timing or synchronizing signals.

0898F3FIG1.gif (21478 bytes)
Figure 1. When a camera operates in its continuous mode, it produces noninterlaced images regularly, without the need for external triggering.

Such an arrangement—a simple frame grabber and a continuous-mode camera—proves adequate for inspection tasks that do not require rapid image processing and, thus, do not tax the host computer. You would use this mode in off-line quality-control applications. For example, a manufacturer of lead frames for ICs produces millions per day, which may make it difficult to do a complete in-line inspection of each lead frame. Instead, a technician cuts out a strip of lead frames from the production line and inspects them using a microscope and a camera.

You could also use a camera in continuous mode operation to inspect modules, sockets, discrete components, and other products. During production you don’t need to inspect every item. Instead, you gather a sample and run inspection off line.

Some Cameras Separate Sync Signals
Although not typical, some cameras produce a composite analog video signal that includes only the hsync timing signal. These cameras must supply a vsync signal to the frame-grabber board, or the frame-grabber board must supply a vsync signal to the camera. Some camera manufacturers may call the vsync signal a frame-enable signal or a trigger signal.

Some combinations of frame grabbers and cameras may use separate sync signals even though the camera produces a composite video output that includes the sync signals. In such cases, the frame grabber simply ignores the sync signals included in the video output.

When you use a camera that produces a digital output (see “For Further Reading,” below), you’ll need separate vsync and hsync signals to properly synchronize the camera and the frame grabber. Depending on the equipment you choose, the camera or the frame grabber will provide these signals.

Get More Control
You can gain more control over how you obtain images by using a camera that operates in pseudo-continuous mode. In this mode, the exposure and the transfer of a frame occur sequentially (Fig. 2). The camera continuously outputs images at a rate determined by the exposure time plus the frame transfer time. After the camera puts out the signal for a frame, it starts the next “exposure,” which will acquire the next image. Thus, the image rate is the reciprocal of the exposure time plus the image-transfer time.

0898F3FIG2.gif (20599 bytes)
Figure 2. A camera operating in pseudo-continuous mode lets you acquire images regularly but with a controlled exposure period between images.

In the pseudo-continuous mode, you can adjust the exposure time at the camera to gather the optimum amount of light for your inspection application. A camera’s manufacturer sets an upper limit on the exposure time, depending on the type of image sensor the camera employs. Typically, you’ll find cameras that offer exposure times from a few milliseconds up to hundreds of milliseconds, which can exceed the frame-transfer time. You cannot adjust the transfer time—it’s preset by the camera manufacturer. For typical cameras used to inspect electronic products, this time can vary from a few milliseconds up to hundreds of milliseconds, depending on the camera model.

You would use the pseudo-continuous mode when you need to obtain images at a continuous and regular rate or when you need to expose an image for a longer-than-normal time. Such a situation could occur when you’re inspecting a range of products for which the contrast levels vary. Or, you may have light-colored products that require short exposures as well as dark-colored products that require a longer exposure. Applications that use the pseudo-continuous mode are similar to those that use continuous mode operation.

Trigger a Camera
When you need an inspection system that can acquire an image at a given time, choose a frame grabber and a camera that operate in trigger mode. The camera still puts out images at a fixed frame rate just as it does when it operates in continuous mode, but the frame grabber responds to an external trigger pulse (Fig. 3). The pulse sets the frame grabber to acquire only the image that follows the next vsync pulse. Note that the frame grabber does not start to acquire an image coincident with the trigger signal. As a result, a timing uncertainty of up to one frame period can exist between the trigger pulse and the capture of an image.

0898F3FIG3.gif (23983 bytes)
Figure 3. The trigger mode of camera operation lets you decide when the camera will acquire an image. This mode puts out the next complete image after the frame grabber receives a trigger pulse.

When you operate a camera and frame grabber in trigger mode, the frame grabber should ignore any trigger pulses that occur as it acquires an image. To ensure the camera captures an image properly, set the trigger pulses to occur no more frequently than the sum of the camera’s exposure time and its frame-transfer time.

You should operate a camera in the trigger mode when you need to capture a single image or a timed sequence of images. Suppose PCBs or other products move down a production line. You want to capture and process an image only when you have something to view. An external sensor on the production line could trigger a camera only when a product comes into the proper position to have its image acquired. The computer then will process the image. Processing images only as necessary leaves computer time for other tasks. The computer might control several other cameras and frame grabbers to handle several production lines simultaneously, processing images only as products move into position for inspection on each line.

Trigger Asynchronously
You can also operate a camera in an asynchronous reset mode that relies on a trigger signal from the frame grabber. The signal arises from either an internal frame-grabber timing circuit, which you set up under software control, or from an external trigger signal (Fig. 4). Note that you can program the frame grabber to introduce a delay between the time it receives an external trigger signal and the time it sends the trigger signal to the camera.

0898F3FIG4.gif (22053 bytes)
Figure 4. You can set a delay and an exposure time (internal to the camera) when you use a camera in the asynchronous-reset mode.

You might need to insert a delay time to properly synchronize or fine tune the image capture. For example, on a PCB production line, the sensor that triggers the frame grabber might not be aligned precisely. Without a programmable delay, the triggered camera might miss seeing an edge of the board, or it might capture only a portion of the board. The delay lets you quickly adjust the timing so you acquire the image you need. Often, it’s easier to adjust a value in software than to realign a sensor. Delay times can be a milliseconds or longer, depending on the capabilities of the frame grabber.

When the camera receives the trigger signal from the frame grabber, it acquires an image during the exposure period preset in the camera. Then, it immediately puts out the image information. Unlike the trigger mode, the asynchronous-reset mode operates without any timing uncertainty. In effect, the trigger signal resynchronizes the camera.

Cameras offer three types of asynchronous-reset operation, but you must check your user’s manual to find out which type or types your camera provides:

  • vertically asynchronously resettable—the camera resets only the vsync timing when it receives the exposure pulse,
  • vertically and horizontally asynchronously resettable—the camera resets the vsync and hsync timing on the exposure pulse, and
  • fully asynchronously resettable—the camera resets the vsync, hsync, and pixel clock on the exposure pulse.

Of the three types of operation, the first one introduces the most delay between trigger and image capture. The last one introduces the shortest such delay.

If you plan to trigger the camera rapidly, you can avoid losing images by ensuring that the shortest period between external trigger pulses exceeds the sum of the exposure signal width, the exposure time, and the frame transfer time.

Program Exposure Times
If you need to capture an image at a specific time and you also must have control over a camera’s exposure time, consider using a camera that operates in control mode. This mode operates much like the asynchronous-reset mode except the frame grabber rather than the camera controls the exposure time (Fig. 5). You use software that comes with the frame grabber to set the exposure time. The exposure times range from a few milliseconds to a few hundred milliseconds. To avoid losing an image, ensure that the shortest time between external trigger pulses is greater than the sum of the exposure signal width, the frame transfer time, and the camera’s delay.

0898F3FIG5.gif (23816 bytes)
Figure 5. Operating a camera in the control mode lets you program both the delay time and the exposure time at the frame grabber. This mode gives you the most control over acquired images.

In the control mode, the frame grabber’s exposure signal resynchronizes the camera and the width of the exposure signal determines the exposure time. Note that the camera may introduce a short delay between the end of the exposure signal and the start of the video signal. This delay is preset in the camera and cannot be adjusted. Delays are typically a few hundred milliseconds.

You can take advantage of the control mode to adjust the exposure in your application. You may wonder why you might need this capability. Bulb intensity can change with time, so you’ll need to adjust the exposure time to compensate for changing light levels. Also, some parts of objects have different reflective properties. For example, the black body of an IC reflects little light while the shiny leads reflect a lot of light. When you inspect the body and the leads, you can control the exposure to best image each section. T&MW

FOR FURTHER READING
1.  Titus, J., “Frame Grabbers Focus on the PCI Bus,” Test & Measurement World, Newton, MA, August 1997, pp. 73–75.

2.  Titus, J., “Take a Careful Look at Cameras,” Test & Measurement World, Newton, MA, March 1995, pp. 36–42.

Acknowledgement
Portions of the material in this article were taken from, “Camera Interface Guide,” Matrox Imaging Products, Dorval, QC, Canada, 1996.

Pierantonio Boroero is the product manager of Matrox’s Imaging Div. Prior to holding this position, he worked at Matrox as an application engineer. He holds a Bachelor of Electrical Engineering degree from McGill University.

Robert Rochon is a senior application engineer at Matrox’s Imaging Div. He worked as a project manager at Modular Vision Systems. Robert obtained his Bachelor of Electrical Engineering degree from McGill University.

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

There are no other articles written by this author.

Sponsored Links



 
Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Podcasts

Blogs

  • Martin Rowe
    Rowe's and Columns

    July 8, 2008
    Introducing...Test ideas
    Beginning in the T&MW August print issue, we’ll replace the “Project Profile” ...
    More
  • Martin Rowe
    Rowe's and Columns

    May 28, 2008
    More on Bill and Dave
    In my January 11 posting, "Tell your Bill and Dave Stories," I asked if the HP Way still e...
    More
  • » VIEW ALL BLOGS RSS

Podcasts

Advertisements





NEWSLETTERS

Click on a title below to learn more.

Test Industry News (3 Times Per Month)
Machine-Vision & Inspection (Monthly)
Communications Test (Monthly)
Design, Test & Yield (Monthly)
Automotive, Aerospace & Defense (Monthly)
Instrumentation (Monthly)
Resource Center E-Alert (Monthly)
About Us | Advertising Info | Site Map | Contact Us | FREE Subscription | Editorial Calendar
©2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy
Please visit these other Reed Business sites