LTILIB tricks

[ Retour ][ LTI-Lib tricks ]

Some tricks and hints for using LTI-Lib at Montefiore. LTI-Lib is an object oriented library with algorithms and data structures frequently used in image processing and computer vision. It was developed at the RWTH-Aachen University as a part of many research projects on computer vision dealing with robotics, object recognition, sign language, and gesture recognition. It provides an object oriented C++ library that includes fast algorithms, which can be used in real applications.

Very Useful Links
Whenever you are facing a problem, you have a lot of solutions to help you :

How to use svideotools within LTI-Lib ?
First of all, get the Svideotools library (at Pr. Piater's webpage). Then, it is very easy :
#include "VideoClient.h"

/* Declare the videoClient */
VideoClient vc(true);
/* Open it */,0);

/* Define a LTI-Lib image*/
image img;

/* Loop over the frames */
for (;;) {

        /* Get the pointer to the image data in shared memory */
        image_ptr = (rgbPixel *)vc.getFrameBuffer();
        /* Associates img to the data from image_ptr */
        * Your processing goes here
        * ...
        /* Asks for next frame and blocks it */

Can I use several svideo demons at the same time ?
Yes, by specifying the shm keys for each svideod.
 svideod-mpeg_play -k 0 -a toto.mpeg &
 svideod-mpeg_play -k 1 -a tata.mpeg &
Then the code that reads the images could be:
lti::image img1, img2;
lti::rgbPixel *image_ptr1,*image_ptr2;
// Declare the videoClients
VideoClient vc1(true),vc2(true);
// Open them, second argument is the shm key,0);,1);
viewer v1,v2;

for  (;;){

        // Get the pointer to the image data in shared memory
        image_ptr1 = (lti::rgbPixel *)vc1.getFrameBuffer();
        image_ptr2 = (lti::rgbPixel *)vc2.getFrameBuffer();

        // Associates img to the data from image_ptr

        // Visualize;;

        // Asks for next frame and blocks it

How to make videos on-the-fly in your code ?
Use libavcodec/libavformat from the ffmpeg API !
I made a small class that do that and which is very easy to use. Mail me if interested.

Using BFL with LTILIB
First, install the Bayesian Filtering Library .
Here is a small program that implements a very naive color histogram tracker with particle filter.

For those developping applications under Windows...
For users who work with the LTI-Lib on Windows platforms might like to take a look at Impresario . This is a small Rapid Prototyping System which supports the development and evaluation of simple image processing systems and incorporates the LTI-Lib into an extendable graphical user interface.It has been developped at RTWH.

Last update on 21/07/2006