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 ImageJ/plugins/Input-Output folder, 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, in the Image/plugins/Input-Output folder.
Description: Previews and captures video frames from a QuickTime compatable camera. Press esc or the space bar to stop previewing. Press the shift or 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 converter, such as the Canopus ADVC 55.

You can use an external USB or Firewire camera on a Macintosh with a built in iSight camera by holding down the option (alt) key when starting the plugin (requires 2009/01/02 version, or later). This causes a dialog to be displayed that allows you to select any QuickTime compatible camera installed on your system. You can also run 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. It will display a dialog that allows the user to choose the camera when called from a macro using run("Video","dialog").

OS X 10.10 (Yosemite) does not include key files required for running commands like File>Import>Using QuickTime and File>Save As>QuickTime Movie that use QuickTime for Java. You can work around this problem by copying the files QTJava.zip and libQTJNative.jnilib, available at imagej.nih.gov/ij/download/qt/ into ~/Library/Java/Extensions, where "~" is your home directory. Yosemite hides the Library folder by default, so you will need to open your home folder and check "Show Library Folder" in the View>Show View Options dialog. Before copying the files, you will need to create the ~/Library/Java and ~/Library/Java/Extensions folders.

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 from
    a macro using run("Video","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
    fixes by Jeff Hardin
2007/05/22: Works with batch mode macros
    (example1, example2)
2008/10/15: Displays a dialog the allows camera selection
    when called from a macro using run("Video","dialog")
2009/01/02: Displays a dialog the allows camera
    selection when run with option (alt) key down
2009/07/27: Fixes blank stack frames bug on Intel Macs
2011/02/14: No longer scales to 640x480; press shift or alt to add frame to stack; press esc or space bar to stop capturing
See Also: Gawker - Create time-lapse videos on Mac OS X
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 |