Video capture with jClamp. This is a replacement for Look! and now supports VFW as well as DirectShow compatible devices – web cams and other cameras with driver support. I have tested out Logitech C300 web cam and perhaps it can be modified for microscope use. The Hauppauge video capture boards continue to work fine.
If a video device is present clicking on the camera icon in CC will open a window which allows viewing and saving camera output in a scaleable window. Streaming video capture and playback; record video during data collections; control through script or via Look32X! video window. A stand-alone video capture program, also called Look32X!, is available in the jClamp directory – useful to check that cameras are working, etc. It is accessable in the jClamp start menu. Check script command section and check menu on the Look32X! Window. I suggest a Hauppauge video (see www.hauppauge.com) capture card - WinTV PCI - you can get them without the TV tuner for less than $100. The default capture driver is number 0, but you can provide other numbers in the jClamp ini file under the "misc" tab – if you have multiple boards. Setting the driver number to 999 causes jClamp to skip the check for a board, and no capture will be available
As before, video can be captured via script files (see Script file help for commands). In addition, video capture can be synced to protocol capture. In the command utility if a supported camera is attached, you may select the LX check box in the Analog Channels area. When selected the light will turn green and indicates that synchronous video capture will be made when the protocol is run. Video capture will use the settings made in the Controls window (acessable from the Options tab in Look32X! window. Gain, exposure can be set here is the video device supports these features. Under the Options tab additional controls for video and audio are avaible from the camera manufacturer. You can preallocate a disk file to save video so that disk access is faster. Size needed depends on the codec used and length of recording. Play around to see what is best. If video is captured simultaneously with a protocol, the Capture length value in the text box is ignored and capturing stops after the protocol is run. Otherwise, the length may be fixed if collection is made directly from the Look32X! window or limited by disk space if the fixed length checkbox is unchecked. You must then stop capture manusally by clicking Stop Capture in Look32X1. Filename (Fn) prepend puts those letters at the beginning of the captured video file. Filenameing and directory path are set frome jClamp. If run alone, default data directory is “C:\Look32x_data\”. Manual naming can be enabled. The capture rate (frames per second [fps]) can be set in Controls or under Options tab. Time lapse capture can be done for extended periods of time. Video size (W and H) can be set in the Controls window or under Options tab in Look32X!. All settings are dictated by the camera driver supplied by the camera manufacturer. Multiple devices (cameras) can be chosen from if attached to the system. Preview must be set to capture video. Overlay can be used to simply monitor in near real-time – for example to get patches.
You can zoom in (if Zoom is selected in the Controls window) by pressing left mouse button down while dragging a box. You can crop (if Crop is selected in the Controls window) by doing the same. With cropping only that portion of the image is saved to disk during video capture. Bitmaps of video images (either jpeg or BMP formats) can be made during preview or playback.
When loading data files, if a file has an associated video file it is listed. FastLook! Vda files are collected with Prosilica cameras (see FastLook! Help). If the check box near the video filename is unchecked then the video file is not loaded when the data file is loaded. Otherwise, data and video are loaded simultaneously (see below).
Video files, when loaded with associated data files are synchronized to the data. If you drag the data cursor in the Analysis Window the video will step through frames captured at the time denoted by the cursor. Alternately, you can step through frames in the Look32X Player and the cursor will move to the corresponding time. On either side of the stop button in the Player you can automatically step forward or backward. The rightmost button simply plays the video in real time. Synchronization can be turned on and off with the LX checkbox under Cursors area of the Analysis Window. If turned off the cursor no longer moves with the video, and all frames can be inspected (if synchronized, only frames within the data time frame are accessable). Rectangles can be drawn on the video image to monitor average gray level within the rectangle. Simply hold down the right mouse button and drag to size and release. Five areas can be set (red, green, blue, yellow, orange). Click once one the rectangle then move mouse to reposition; click again to dock. Double click on any rectangle to delete. The data are monitored in the X,Y Levels window. Position of upper left corner and value (0-255) are given for each rectangle and for mouse.
You can save data to disk if Export is set on in the Contols window (Measure tab). You can draw a line (or average a few lines) by holding shift down and dragging mouse with left button down. A plot of the intensity profile can be shown if Line Plot is checked. Below is a plot of the sinusoidal voltage (blue) that drove an LED (red), made in Excel (see below) from the text output during a Forward play. Whatever is plotted in the Analysis window is output (Im, Cm, Rm, Mag, Phase, etc.). Capture was a 30 FPS. You can see that there seems to be a delay between the two. It is not possible to get exact synchrony in Windows with DirectShow cameras. This is only possible with triggerable cameras like Prosilica’s (see FastLook help). You may try to better align video and data by using an alignment procedure posthoc in the Analysis window. Move the mouse over the LX checkbox and a window pops up. First place the cursor to a particular time where a fiduciary frame should be located. Enter the frame number to associate with that time and press set. Now the frame will be aligned to that time and all other frames appropriately shift in time. Check synchronization with an LED driven by voltage stimuli in a protocol. You may want to inset an LED into the periphery of the camera light path in the microscope in order to get fiduciary marks on video captures.
Look32x Ini File – these data can be set upon starting Look32X!
; semicolon is a comment
capture_length(15); set the capture length to equal time in seconds
capture_timed(on); set capture length on/off
audio(on); set capture audio on/off
frame_rate(20); set fixed frame rate
;video_codec(DV Video Encoder);
data_path:c:\look32x_data; set data path to c:\look32x_data ( the current date is automatically added as a subdirectory. e.g. c:\look32x_data\02-28-2010)
auto_save(on); auto or manual save -- manual asks for directory and filename