CAR – Scene context creation tool

Summary :

  1. Decompress depth and colour image
  2. Create the file sup_context.xml
  3. For previous versions of tools

Preparation :

Kreat-tool will help create the scene context in a xml file. You will draw important zone, used for event modelling.

WARNING: The calibration file calibration.yml has been changed on the 10th of Septembre 2013 due to two swapped values.
Unfortunately you have to re calibrate your scene using this new file before running the CAR component.

cd ~/demcare
wget https://team.inria.fr/stars/files/2013/07/calibration.yml_.zip
unzip calibration.yml_.zip

About the tools :

Kreat-tool

It’s functionalities are:

– Input: calibration.yml + colour.png + depth.raw (uncompressed using the ‘decompress’ executable)

– output: sup-context.xml

It’s available from the RPM package on the link above (see SUP library installation)

Decompress

This tool decompresses one video frame of your choice. This uncompressed frame will be the input frame for the Kreat tool.

1 – Decompress depth and colour image

If you had check all the requierements, you can follow the steps bellow.

Create a work folder (e.g. my_zones) :

mkdir ~/demcare/my_zones

Record a short video of the scene (e.g. ~2min) :

/usr/local/inria/sup/bin/sup-3DSensor_writer /home/inria/asusdata/

Chose a picture from your new recording (e.g. 2014-05-20T13-39-00.006000). You should chose one with a clear scene.

Then, go into my_zones folder to use decompress for the choosen picture :

cd ~/demcare/my_zones
/usr/local/inria/sup/bin/decompress /home/inria/asusdata/ 2014-05-20T13-39-00.006000

The reader takes as first input parameter the main folder location and as second parameter the timestamp of the frame you wish to decompress. This timestamp takes the following form:

‘2013-07-10’ if you want to decompress the first frame recorded from midnight of the 10th of July 2013..
‘2013-07-10T10’ if you want to decompress the first frame recorded from 10 am.
‘2013-07-10T10-20’ if you want to decompress the first frame recorded from 10 am  and 20 minutes
‘2013-07-10T10-20-30’ if you want to decompress the first frame recorded from 10 am  and 20 minutes and 30 seconds

‘2013-07-10T10-20-30.120’ if you want to decompress the frame recorded at exactly 10 am, 20 minutes, 30 seconds and 120 milliseconds

Copy the yml file into the work folder (e.g. my_zones) :

cp /home/inria/demcare/calibration.yml /home/inria/demcare/my_zones

2 – Create the file sup_context.xml

If you had following the previous steps, you should have all the requierements :

You can now, launch Kreat-tool to create your zones :

/usr/local/inria/sup/bin/Kreat-tool

Download this video describing how to use the Kreat tool: tuto_kreat_tool

3 – For previous versions of tools

If you have not installed the CAR package > or equal to version 30/07/2013 (on the CAR installation web page), install the Kreat tool as root (by using su or sudo) :

yum localinstall Kreat-tool*.rpm

This will install the Kreat-tool library into /usr/bin. If you are using the CAR package version 30/07/2013 or above, the Kreat tool and decompress tool will be installed in /usr/local/inria/sup/bin

You might need to install qt and gt gui (> yum install qt qt-devel) but you should the qt libraries installed when installing CAR (see CAR installation web page).

The Kreat tool takes as input an uncompressed colour png image and an uncompressed depth raw file.

To decompress one video frame of your choice follow these steps:

cd where/you/have/decompressed/the/decompress/tool/package
./decompress /path/to/where/you/saved/your/video/data/ timestamp

To use the Kreat tool:

cd where/you/have/decompressed/the/Kreattool/tool/package
./Kreat-tool

On top of the window, click on File, Open and select the color image inside /home/kreat-example. Make sure you have the calibration.yml and depth.raw files inside the same folder. The window now displays the image.

On top of the window, click on Draw new zone and type a name in the popup window. Make sure the name of the zone will have to be the same as in the event models definition (see related section in Event detection plugin).

Draw the zone. Click in the color image at each corner of the polygon representing the zone you want, and close the polygon by clicking on the middle button of the mouse. IMPORTANT: Choose corners on the floor and do not click on black pixels area zone, this means that there is no depth information. You can draw as many zones as you want.

On top of the window, click on finalize calibration file.

Your sup_context.xml file has been created, you can close the window without saving.

Leave a Reply