Grabbing an image - overview

General

To grab an image from a SD camera you need to route the SDI to a grabber in avrouter. There are 14 dedicated machines available named cvpsd01, cvpsd02 etc. Select an appropriate machine as the destination for the camera in avrouter.

The 8 HD cameras are hard wired to the corresponding grabber machines cvphd01, cvphd02 etc. . . . . . .
To grab the image you need to run the frame grab tool hgrab for HD and sgrab for SD on the appropriate machine. Create a remote shell (e.g. rsh cvpsd01) or terminal (e.g rxterm cvpsd01) on the relevant machine and change to the /video directory - this is the dedicated video array for the machine. Executing hgrab or sgrab will then grab a single image as a video buffer (by default to /video/grabfile) with an activity log (in this case /video/grabfile.log). There may currently be a problem if you are trying to grab from a source that does not have an embedded time code. Hopefully this will get sorted one day.

The video array is a temporary storage location. All recorded data should be moved to a storage array such as /vol/v/capture1. Move the captured buffer to an appropriate place then extract the image from the buffer using hextract for both HD and SD. This will extract the image as grab000.ppm.

NOTE: Options are available to record multiple frames at a given time offset and frame step in hgrab or sgrab and options are available to extract to different file formats in hextract. Use --help on the command line to see more info.


Grabbing from multiple cameras

To capture from multiple cameras, you first need to route each camera through to a grabber then you need to run a grab command to capture the images you want starting at the same time code on each machine. Here are some scripts that help automate this process.

cameras.csh - This defines the camera setup i.e the SD and HD grabber boxes.
grab.csh - This grabs from one numbered camera to /video on the grab machine.
grab2.csh - This grabs from two numbered camera.
graball.csh - This grabs from all cameras.
mvgrab.csh - This moves the video buffer from /video on the grab machines to a specified path.
extractall.csh - This extracts the video as an image sequence in a specified path.
rextractall.csh - This concurrently extracts the video as an image sequence in a specified path.

The default setup in cameras.csh has 8 HD and 8 SD cameras numbered 0-7 for the HD and 8-15 for the SD. The video is recorded to the /video directory on the grab machine as grab.[camera number].[capture number]. To capture a 10second sequence starting in 15seconds time as capture number 0 with a step between each frame of 1 (i.e continuous) use graball:

graball.csh 00:10:00 00:15:00 1 0

To move the buffers for capture 0 onto a storage array such as /vol/v/capture1 use mvgrab.

mvgrab.csh 0 /vol/v/capture1/2006-02-16/capture0

To extract the images from the buffers use extractall or rextractall.

extractall.csh 0 /vol/v/capture1/2006-02-16/capture0

NOTE: The extracted images do not use the capture number so you will need to place each capture in a separate directory. The images are extracted as grab.[camera number].[frame number].png.

NOTE: When grabbing from multiple cameras you will need a delay of up to 15 seconds before starting the capture to ensure that the remote shell is running on each grabber machine in time. i.e an offset of zero will leave insufficient time for the remote shell to execute and no machine will be able to grab at the starting time code. 


Last modified:  12th November 2008