QuickTime Capture

Author: Wayne Rasband (wsr at nih.gov)
Requires:QuickTime, QuickTime for Java and a QuickTime compatible video source.
Limitations: Requires a VDIG wrapper on Windows. Does not work with 64-bit versions of Java.
Source: QuickTime_Capture.java
Installation: Download QuickTime_Plugins.jar to the plugins folder, or subfolder, restart ImageJ and there will be a new File/Import/Video command. This JAR file also installs three other QuickTime plugins: Note that this JAR file is included with the Mac OS X version of ImageJ, version 1.34 and later.
Description: Previews and captures video frames from a QuickTime compatable camera. Press the space bar to stop previewing. Press the option (alt) key to capture a frame and continue previewing. While previewing, type "+" to zoom in, "-" to zoom out, and "h" to display a histogram.

On the Macintosh, most USB and Firewire cameras are QuickTime compatible. Analog cameras can be used with an analog video to Firewire/DV converter.

You can use an external USB or Firewire camera on a Macintosh with a built in iSight camera by running iSight Disabler, an AppleScript that automates the process of disabling and enabling the iSight driver.

This plugin requires both QuickTime and QuickTime for Java, which are preinstalled on Macs. Windows users can use it by installing QuickTime 7 and using the WinVDIG video digitizer wrapper.

This plugin has been tested with the following Firewire cameras: Apple iSight, Canon Optura DV camcorder, Canon XL-1 DV camcorder and Orange Micro iBot. It has been tested with the following USB cameras: Philips ToUCam Pro (PCVC740K) with drivers from Macam and Multi-Cam. It also works with analog cameras using video to Firewire adapters such as the Canopus ADVC 55.

This plugin is based on the LiveCam example by Jochen Broz, posted to the QuickTime for Java mailing list with the title "Live camera picture from SequenceGrabber using awt or OpenGL", and archived at lists.apple.com/archives/quicktime-java/2005/Feb/msg00062.html.

Note: NTSB Digital Video (DV) images have 720x480 rectangular pixels with a pixel aspect ratio of 0.9. This causes, for example, circles to appear as ovals on a computer screen. To create square pixels, use Image->Adjust->Size... and choose New width = 720 pixels, New height = 533 pixels, uncheck "Constrain Aspect Ratio", and check "Interpolate". PAL DV images are 720x576 pixels, with pixel aspect ratios of 1.067 for "standard" and 1.422 for "wide screen."

Additional note: The Pixel Aspect Ratio for NTSB DV is under investigation. Various authorities say it should be about 0.91081, 0.91139, 0.91158, or 0.9091, instead of 0.9. It may be that the 720x480 image should be rescaled to 720x527, instead of 720x533. For critical applications, direct calibration of a particular DV camera may be in order.

This plugin can be called from a macro to capture and display a single frame or a sequence of frames. Refer to the Time-lapse_Capture macro and the Time-Lapse Video Macros for examples.

History: 2000/10/25: First version
2001/06/07: Press any key to capture
2001/11/21: Fixed bug that could cause ImageJ to crash
2002/02/13: Fixed bug that prevented operation on Mac OS X
2002/07/22: Dimensions no longer fixed at 640x480
2003/09/19: Updated to work with iSight camera
2003/10/09: Captures and quits when called using run("QuickTime Capture","grab")
2005/03/06: Rewritten to work with Java 1.4.2 on Mac OS X;
    capture multiple frames by pressing alt/option
2006/09/20: Works correctly on Intel Macs thanks to fix by Jeff Hardin
2007/05/22: Works with batch mode macros (example1, example2)
See Also: Macam - USB webcam support for Mac OS X
Multi-Cam - OS X 10.3 patch for Macam driver
iSight Disabler - Disable/enable internal iSight camera
WinVDIG - Capture video using QuickTime on Windows
Apple - QuickTime for Java mailing list
O'REILLY - "QuickTime for Java: A Developer's Notebook"
QuickTime Movie Opener
QuickTime Movie Writer
QuickTime Movie Player

|Plugins | Home |