Studio Capture and File Storage

Run Grab Programs

You can use either CSH scripts or executable tools to run grab programs. Note that please copy the scripts into your own directory, or directly use the binary tools located in this directory: "/vol/vssp/localsoft/RavlBin/linux-suse9.3/30Jul06/".

The useful CSH scripts can be downloaded: cameras.csh, grab2.csh, grab.csh, graball.csh, mvgrab.csh, extractall.csh, rextractall.csh.

For example if you want to grab data from adjacent cameras, you can use the grab2 script, to grab 10 frames at 5 second intervals, starting in 15 seconds, capture number (the session number) 0 for cameras 0+1, then 2+3, then 3+4, use:
 grab2.csh 00:50:00 00:15:00 125 0 1 0
 grab2.csh 00:50:00 00:15:00 125 2 3 0
 grab2.csh 00:50:00 00:15:00 125 3 4 0


Typical Setup for File Storage

Of course, you can define a directory structure in advance for you data to store and extract the images, for example for a VBPA (Video Based People Animation) capture with capture sessions performed on a daily basis you might use:
 /vol/v/capture1/vba/calibration/chart
 /vol/v/capture1/vba/2006-02-13/calibration/floor
 /vol/v/capture1/vba/2006-02-13/calibration/wand

Actually, VBPA (Video Based People Animation) is specifically assigned with disc-arry "capture5" so you might use:
 /vol/v/capture5/Studio/VBPA/calibration/chart
 /vol/v/capture5/Studio/VBPA/2006-02-13/calibration/floor
 /vol/v/capture5/Studio/VBPA/2006-02-13/calibration/wand


Extract Imges from the Grab Buffers

Move the capture to the storage array and extract the images, using the captuer number (session number) and the directory you setup in the above step.
 moveall.csh 0 /vol/v/capture1/2006-02-13/calibration/chart
 extractall.csh 0 /vol/v/capture1/2006-02-13/calibration/chart

For example if you would like to furtherly run the intrinsics calibration tool on the extracted images. The binary can be used directly in the directory: "/vol/vssp/cvssp3d/Users/ees1js/ProjectOut/lib/RAVL/linux/bin/CalibrateIntrinics". The chart image "chart/Chart.png" and coordinate file "chart/Chart.coords" needed by the application can be found at CVSSP3D SW Repository under "Applications/StudioTools". (PS: you need to contact with Simon Alcott for the access permission) The binary can also be built by downloading the original source from CVSSP SW Repository and compiled using "qm" command in RAVL.
From the location where the chart images are extracted use:
 CalibrateIntrinsics -i grab.%d.%05d.png -c Chart.png -co Chart.coords -n # -v (where # is the number of cameras)


Example1

To grab 180 frames from all cameras at 2 second intervals starting after a 15 second delay as capture 0, use:
 graball.csh 06:00:00 00:15:00 50 0

Move the images to the storage array and extract all.
 moveall.csh 0 /vol/v/capture1/2006-02-13/calibration/wand
 extractall.csh 0 /vol/v/capture1/2006-02-13/calibration/wand

Then you will need to extract all the wand markers in the images to perform the calibration. Use the ExtractWandMarkers tool downloaded from the Cvssp3D repository under Applications/StudioTools/ExtractWandMarkers and compiled using "qm" command in RAVL. From the directory where the images are extracted use:
 ExtractWandMarkers -i grab.%d.%05d.png -n # -v (where # is the number of cameras)

Of course, you can use the binary directory located at "/vol/vssp/cvssp3d/Users/ees1js/ProjectOut/lib/RAVL/linux/bin/". However, you might need to give the full parth of the command "ExtractWandMarkers".

Calibrate the extrinsics using the extracted wand marker positions. From your wand directory use the CalibrateWand command line tool, source code available from Applications/StudioTools/CalibrateWand and binary available from "/vol/vssp/cvssp3d/Users/ees1js/ProjectOut/lib/RAVL/linux/bin/". You will have to provide the intrinsics generated by CalibrateIntrinsics and the wandlength, the distance between the markers on the wand e.g 0.4m.
/vol/vssp/cvssp3d/Users/ees1js/ProjectOut/lib/RAVL/linux/bin/CalibrateWand -intrinsics intrinsics.txt -wandlength 0.4 -files


Example2

The wand calibration places the world coordinate frame at the first camera. To create a useful coordinate frame positioned in the capture volume use RotateCalibration in the Cvssp3D repository under Applications/StudioTools/RotateCalibration, source code available from Applications/StudioTools/CalibrateWand and binary available from "/vol/vssp/cvssp3d/Users/ees1js/ProjectOut/lib/RAVL/linux/bin/". You will need to grab a single frame from all cameras with 3 floor markers to define the origin, x-axis and z-axis of the world coordinate frame, the y-axis will point vertically. Make sure it is easy to tell the difference between the x-axis and z-axis.  

Grab a single frame, move to the storage array and extract the images:
 graball.csh 00:00:01 00:15:00 1 0
 moveall.csh 0 /vol/v/capture1/2006-02-13/calibration/floor
 extractall.csh 0 /vol/v/capture1/2006-02-13/calibration/floor

You will need to pass the floor marker images and the calibration to RotateCalibration:
/vol/vssp/cvssp3d/Users/ees1js/ProjectOut/lib/RAVL/linux/bin/RotateCalibration -c calibration1.txt -i grab.%d.00000.png -v

If you want to know the details about the commandline parameters of the commands, use "--help" option directly, for instance, "grabber --help".