                      OPTIC FLOW MEASUREMENT PACKAGE

                       (c) Christophe BERNARD
                   Christophe.Bernard@polytechnique.fr

LICENSE: This package is provided to you without any guarantee of any kind.
You may use it for non commercial purposes only. If published work makes use
of it, proper acknowledgements are appreciated. Redistribution of the
package is allowed in its original form only, and in its entirety. For other
uses, please contact the author.

DESCRIPTION

This package of matlab files allows to measure optic flow between two
pictures.


OVERVIEW

The two matlab functions provided to the user are OpticFlow and ShowMap,
that are described in the files OpticFlow.m and ShowMap.m. They use lower
level functions that are described in the files Conv.m, Conv2.m, MakeSF.m,
MakeWa.m, OneofTwo.m, OpticFlow.m, ShowMap.m and SubSample1.m. All those
M-files should be in your matlab path. 


USE

Lines starting with ">>" indicate commands you should type at matlab's
prompt.

1 - Measuring a flow

Load the video frames in memory

>> i = imread('yos.02.pcx');
>> j = imread('yos.03.pcx');

Then, you have to measure the optic flow. For this, type

>> OpticFlow(i,j,<e>)

<e> is the number of scales on which you want to measure the flow: 3 or 4
is usually OK. If this number is too small, your measurement will be
subject to time aliasing, while if it is too large, border effects will
be overwhelming.

The results of the estimation are stored in a global variable called 'wt'.
To access its contents, type first

>> global wt

2 - To view the flow

You can view the flow with the function  "ShowMap". Type

>> ShowMap(<n>)

to see the flow map obtained at scale <n>. The accessible scale run from
2 to 2+<e>-1. So if you took <e>=3, you have access to maps at scales 2, 3
and 4.

The measures are stored in arrays wt(1,<n>).vx (x coordinate of the velocity)
and wt(1,<n>).vy (y coordinate).

WARNING: the coordinate system for these maps is peculiar. The origin is at
the upper left corner of the picture. The first coordinate is the row number
and the second the column number (matrix like coordinates).

Look at the ShowMap.m source to see how the map has to be modified in order
to be properly displayed.

Christophe BERNARD.
cole Polytechnique
91128 Palaiseau cedex
FRANCE

Christophe.Bernard@Polytechnique.FR
