Image Tearing Causes and Solutions 1.1 Subject 1.2 Applicable

Image Tearing Causes and Solutions
Technical Application Note TAN2010003
Revised February 23, 2016
1.1 Subject
Technical Application Note (TAN2010003): Image Tearing Causes and Solutions
1.2 Applicable Product(s)
All FireWire and USB 2.0 imaging cameras
1.3 Application Note Description
This application note explains image tearing, how to detect it, its causes, and recommended
1.4 What is Image Tearing?
Image tearing refers to the display of images that appear broken or misaligned. Image tearing is seen
on both laptop and desktop systems, and across a variety of hardware platforms and operating
systems. It is not specific to any particular system configuration, and has been known to occur with
FireWire and USB 2.0 devices.
There is a difference between horizontal image tearing where the image appears torn due to a
problem with the video display, and the broken or torn images resulting from corrupt data. The
following sections explain some common causes of image tearing and suggest solutions.
The following images show examples of image tearing.
Point Grey logo, Spinnaker, FlyCapture, Digiclops, Blackfly, Dragonfly, Dragonfly Express, Chameleon, Firefly, Flea, Grasshopper,
Ladybug, Scorpion, Zebra and Triclops are trademarks or registered trademarks of Point Grey in Canada and other countries.
© 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
Figure 1
This example shows an offset between the top and bottom halves of the image.
Figure 2
This example shows a broken image with the bottom portion containing data from another image.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
Figure 3
This example shows an image that appears torn both horizontally and vertically,
and includes data from more than one image.
1.4.1 Detecting Torn Images with FlyCapture
With FlyCapture SDK version and newer, you can detect when the camera transmits a torn
image. To use this feature, the following additional components are required:
 Firmware version (or later) for the Chameleon or Firefly MV or FMVU cameras. This
version of firmware provides a mechanism for cameras to re-synchronize after a FIFO
overflow, so that subsequent image transmissions are not torn.
 Version (or later) of the pgrUSB driver. This version allows torn images to be
detected in RetrieveBuffer() calls. On versions earlier than 2.1, a
PGRERROR_ISOCH_RETRIEVE_BUFFER_FAILED error is returned, along with the string, "There
was an image consistency issue with this image." On versions 2.1 or later, the error is
To get the necessary software and firmware updates, visit the Point Grey downloads page.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
1.4.2 Why does my USB 2.0 camera experience torn images more often than my FireWire
Image tearing can happen on both FireWire and USB 2.0 cameras, but has different causes.
FireWire transfers a complete image to the PC at one time. Image data feeds into the FIFO buffer on
the host adapter, where it is picked up. If the PC cannot keep up with grabbing the data from the
controller’s FIFO, the FIFO overflows and data is dropped.
USB 2.0 transfers data differently. Data is stored in a FIFO on the USB 2.0 camera, and polled by the
PC directly. The data is sent in 512-byte packets. The PC polls the device every time it wants to
receive the next packet. If the PC does not grab the data from the camera’s FIFO quickly enough, the
FIFO overflows and data is dropped.
The main limitation of USB 2.0, and the reason it may tear more often than FireWire, is the limited
amount of resources on the camera, which keeps the FIFO buffer relatively small. USB 2.0 cameras
depend on the PC to ask for data, so if the PC is too busy, the camera’s FIFO can overflow quickly.
FireWire cameras do not depend on the PC to ask for data; it is sent to the host adapter at the proper
rate, and the camera’s FIFO does not overflow. Since there are more resources on the host adapter,
FIFO buffers are larger, reducing the chance for overflow.
1.4.3 Why do only some USB 2.0 cameras experience torn images?
The FIFO buffers on Point Grey USB 2.0 cameras are the same size. However, different cameras may
be filling their FIFOs at different data rates, so one camera may fill up quicker than another. Any
property that affects the data rate can contribute to overflowing, such as pixel clock, frame rate, line
rate, and valid pixels in a line. In general, the slower the data rate, the less likelihood of a FIFO
overflow, even if the PC does not poll as quickly as it should. For example, a Firefly MV-03MT may
have fewer torn images than a Chameleon because it runs at a slower pixel clock and lower
resolution (assuming the Chameleon is running at full resolution). However, a Firefly MV 13S2 may
have more torn images than a Chameleon, since it runs at a higher pixel clock, assuming the same
1.5 Video Display Issues
Horizontal tearing, such as the example shown in Figure 1, is often a video display issue, rather than a
problem with the actual image data. To verify that the image data is not corrupted, run the
SaveToAVI example available with the FlyCapture SDK, and analyze each frame of the AVI.
If the image data is not corrupt, the most likely reason for image tearing is that the frame rate of the
image display is not synchronized with the refresh rate of the monitor. The monitor video display
buffer fills with data, which is then displayed. Sometimes the display buffer only partially fills before
the monitor grabs it and displays it to the screen. This causes the tearing effect and is more
noticeable if the camera is being panned and there is a significant difference in image content
between frames. For recommendations on how to reduce this type of image tearing, contact our
Technical Support team.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
If the image data is corrupt, review the following sections to find the likely causes and solutions.
1.6 Hardware Issues
Hardware issues may contribute to torn images on both FireWire and USB. 2.0 cameras. Some
problems are specific to the interface, while others are more general.
1.6.1 General Hardware Issues
Here are some common hardware issues that may contribute to torn images with both FireWire and
USB 2.0 cameras:
 Inadequate power supply: Ensure adequate power is provided to the camera. Power
consumption specifications can be found in the camera's Technical Reference or Getting
Started manual, available on the Point Grey downloads site. For more information, see KB
10303 Providing power to Point Grey cameras.
 Slow CPU speed: Ensure the host system has a fast CPU. A fast processor should help with
the speed at which data can be pulled off the PCI bus.
 Cables that exceed the maximum recommended length: For cable recommendations, see the
camera’s Technical References, available on the Point Grey downloads site.
 Older motherboards that use integrated graphics controllers: Integrated graphics controllers
usually allocate a portion of available physical memory for moving image data, which reduces
the amount of memory available for other operations. Use a PCIe video card with dedicated
video memory. This applies to most other on-board devices, such as audio cards.
Note: Disabling onboard devices may reduce image tearing.
1.6.2 FireWire Hardware Issues
PCMCIA 1394 or CardBus controllers on laptop systems often have difficulty keeping up with
required data transfer rates. Here are some possible solutions:
 If the laptop supports a 4-pin built-in 1394 connector, use this together with a powered hub.
See KB 10313 My laptop's IEEE-1394 port or PCMCAI doesn't supply power to my camera for
information on powering 1394 devices connected to laptops.
 Try a different 1394 card that provides larger FIFO buffers. See KB 10199 Differences to
consider when selecting an IEEE-1394 PCI/PCMCIA host adapter card.
 If using a 64-bit 1394 PCI card, connect the card to a 64-bit 66 MHz PCI or PCI-X bus. This will
allow you to take full advantage of the wider bus bandwidth, and has been known to
significantly reduce torn images. Alternatively, use a 1394 PCI Express card, which provides
far greater data bandwidth than a conventional PCI card.
 If using a PCIe card, performance can also be improved by lowering the bit depth of the
display monitor.
1.7 Power-Saving Features on Host Systems
Power-saving features added to the chipsets of more recent CPUs can interfere with data
transmission. Adjusting the settings of some of these features may address image tearing when
running Point Grey cameras at higher data rates.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
1.7.1 Sleep State
Torn images may result from the CPU entering a sleep state. Point Grey provides a command prompt
utility to disable CPU sleep states.
Download Point Grey Research PGRIdleStateFix utility (.zip)
For information about usage and parameters, run PGRIdleStateFix from the command prompt.
The parameters are:
 Disable — disables all processor sleep states
 enable — enables processor sleep states
 print — prints the current status of processor sleep states
1.7.2 Power Management of USB Root Hubs
Follow these steps to turn off the power-saving features of USB root hubs on your system:
1. Open Device Manager.
2. Expand the Universal Serial Bus Controllers group.
3. Right-click USB Root Hub and choose Properties.
4. Select Power Management.
5. Uncheck Allow the computer to turn off this device to save power.
6. Repeat these last 3 steps for each USB Root Hub.
1.7.3 Enhanced Halt State (FireWire)
Use of the C1E Enhanced Halt State can cause image tearing. This is primarily due to C1E slowing the
transfer of image data off the FireWire host adapter card, which results in FIFO overflows. In some
cases, it is possible to disable this feature in the host system's BIOS. If this is not possible, use the
following utility to adjust the CPU settings to turn off the C1E state:
Download Point Grey Research EnhancedHaltState utility (.zip)
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
1.8 Insufficient Bandwidth (FireWire)
With FireWire cameras, certain bandwidth issues may contribute to image tearing. For example, if
the host system or PC cannot keep up with data rates across the 1394 PCI or laptop PCMCIA bus,
corrupt images may occur. Reasons for these types of situations include:
The PCI bus becomes saturated.
The memory bus bandwidth becomes saturated.
The PC cannot keep up with the interrupts being generated.
PCI bus saturation is a common situation and can happen for a number of reasons, including:
Running multiple FireWire cameras at high frame rates that push bandwidth limits.
Large hard disk reads/writes.
Heavy network traffic.
When the PCI bus is saturated, the system cannot keep up with the data rates going across it. As a
result, images cannot be pulled off the 1394 PCI card fast enough. The isochronous FIFO buffers onboard the card gradually fill with image data from the camera, and eventually a general FIFO
overflow occurs. These overflows can result in:
Tears through the middle of an image due to data packets being dropped and the current
image being filled by data from the next image (Figure 2 above).
Broken images that are made up of many different images (Figure 3 above).
Images that are dropped completely (see KB 10189 Avoiding dropped or missed images using
Typically, synchronization packets prevent repeated image tearing. When data is dropped, the
current image is torn, but the image corrects itself for the next frame, unless data is dropped from
that image as well. Note that general FIFO overflows occur at the lowest level of the Windows
IEEE-1394 substructure, making them beyond the control of Point Grey drivers and software.
1.8.1 Laptop C3 Power State Transition (FireWire)
Corrupted data when using the IEEE 1394 port on a laptop computer can be caused by too much
latency in the C3 power state transition, which causes buffer overruns on the host adapter. The
interrupts associated with the processor's ability to dynamically change speeds conflict with the high
demand on the processor that is needed when streaming video or data across the IEEE 1394 port.
This is seen on laptops from various manufacturers.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
1.9 Troubleshooting Image Tearing
The following suggestions may help to avoid torn images, depending on system components and
configuration, speed and/or hardware:
To determine whether the problem is due to video display issues or corrupt data, run the
SaveToAVI example in FlyCapture and analyze each frame of the AVI.
Use FlyCapture’s torn image detecting features.
Ensure the camera is adequately powered.
Use compatible hardware, including PC, cables, and hubs.
Disable power-saving features.
If possible, lower the overall data rate by lowering the frame rate or using a Format_7 mode
that transmits lower-resolution images using region of interest and/or pixel binning.
A combination of solutions may be required to minimize occurrence of torn images.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Point Grey TAN2010003
Image Tearing Causes and Solutions
1.10 Additional Downloads and Support
Point Grey endeavors to provide the highest level of technical support possible to our customers.
Most support resources can be accessed through the Support section of our website.
Creating a Customer Login Account
The first step in accessing our technical support resources is to obtain a Customer Login Account. This
requires a valid name and email address. To apply for a Customer Login Account go to the Downloads
Knowledge Base
Our Knowledge Base contains answers to some of the most common support questions. It is
constantly updated, expanded, and refined to ensure that our customers have access to the latest
Product Downloads
Customers with a Customer Login Account can access the latest software and firmware for their
cameras from our Downloads page. We encourage our customers to keep their software and
firmware up-to-date by downloading and installing the latest versions.
Contacting Technical Support
Before contacting Technical Support, have you:
1. Read the product documentation and user manual?
2. Searched the Knowledge Base?
3. Downloaded and installed the latest version of software and/or firmware?
If you have done all the above and still can’t find an answer to your question, contact our Technical
Support team.
Revised 23-Feb-16
Copyright © 2010-2016 Point Grey. All rights reserved.
Download PDF
Similar pages