Format presentation

Let’s introduce our Aldebaran Robotics Video format (.arv), light and integrated into the VIM for grabbing transparently video stream from any desired GVM.

  • In the past, you probably wished to know afterwards why an algorithm in a GVM didn't work on a particular frame, or you wanted to grab a sequence for offline processing. Now, it's possible.
  • Let's take for example two GVMs, face detection and landmark detection, running respectively at 2 fps and 5 fps. You can ask at any time to record the images processed by face detection by calling the bound method recordVideo. Native images from the video source (YUV422 VGA or QVGA for NaoCam) will be recorded in an arv file, and there will be only the images processed by face detection. By calling later the bound method stopVideo you can stop the acquisition. Now, while grabbing images passing through face detection, you can ask to grab in another file the images processed by landmark detection. There is an option you can set to record one every n images processed by this GVM, so you can set it to 5 in order to get a 1 fps frame rate for the file. In addition, you can ask for a maximum number of frames that, once reached, will stop the video automatically.
Note:

Changing some inner parameters of the video device, like the resolution or color space, will automatically close the file.

  • Now, with several replay modes based on its time stamped data, you can work offline on your vision algorithms and so compare the improvements on reproducible inputs.
  • Activate FileCam in VideoInput.xml preference file and set which file you want to replay with setVideo bound method. You can provide an interval of images you want to display and choose to loop. In addition, you can either use mode 1 to replay the file at the frame rate used for acquisition (exactly like if we were using the original video device, like NaoCam for instance), or using mode 0 at a desired frame rate (e.g. 0.2 fps) or frame per frame (set 0 fps) with nextImage and previousImage bound methods (available through GUI buttons in Telepathe) to go to next and preceding images (note that for keeping NaoCam's driver emulation, timestamps will continue to increase when using FileCam).

For detailed examples, you can refer to the Tutorial section.

Note:

This is a beta version, code is not protected from bad manipulations like, for instance, not setting a correct file path or forgetting to call setVideo before registering a GVM. Replay modes 2 and 3 are not implemented yet.

The following tools are available as command prompt software in the bin directory of your Aldebaran SDK

  • arv2avi: convert an arv video sequence into the more common (but not timestamped and using a lossy compression) avi format.
  • imgFiles2arv : takes all images in the folder indicated by the user and converts them into an arv file, using dummy timestamps. Currently you have to check by yourself that all image files are either in VGA or QVGA resolution before conversion.

In addition, the getImageLocal_and_recordArv.py python script is available in the python examples for easily recording an arv sequence by creating a dummy vision module.





Copyright © 2010 Aldebaran-Robotics - All rights reserved