Next: cfdiff Up: Reference Previous: ofdraw   Contents   Index

#### ws_flow

Name

ws_flow Weickert and Schnoerr optical flow computation

Command Synopsis

ws_flow [-p percent] [-n n] [-t tau] [-l lambda] [-E eps] [-A alpha] [-R norm_movie] movie wsU wsV

-p percent : if set, stop when |  E(n)-E(n-1) |   <  E(1)*percent/100

-n n : maximum number of iterations, default 100

-t tau : time-step, default 0.166666

-l lambda : contrast parameter, default 1

-E eps : epsilon (may be arbitrary small), default 0.000001

-A alpha : weight of divergence term in pde, default 500.

-R norm_movie : optional output: optical flow norm

movie : Input Fmovie

wsU : Fmovie of OF_{1}(x,y)

wsV : Fmovie of OF_{2}(x,y)

Function Summary

void ws_flow (percent , n , tau , lambda , eps , alpha , norm , movie , wsU , wsV )

float *percent ;

int *n ;

float *tau , *lambda , *eps , *alpha ;

Fmovie norm ;

Fmovie movie , wsU , wsV ;

Description

ws_flow is an implementation of the Weickert and Schnörr optical flow computation by a semi-implicit scheme (in comparison of other schemes, it is quasi-explicit). In [WS01], they consider a functional where the gradients of the two components of the flow are 3D-gradients, i.e. f = (,,)T and they do not separate the 3D-gradients of the two components (,) of the velocity

E() = |u . + ut|2 dx dy dt + (||2 + ||2) dx dy dt

where u is the gray level at pixel (x, y) and time t, > 0 and (s2) = s2 + (1 - ). ( is required only for proving well-posedness and can be chosen as weak as possible, e.g. = 10-6). The steepest descent equations are

 = div3((||2 + ||2)) -  ux(u . + ut) = div3((||2 + ||2)) -  uy(u . + ut)

The semi-implicit scheme consists in approximating by an Euler-forward scheme , div3((||2 + ||2)) at time n by

w((i, j))(i, j)

( 6(x, y) is the 6-neighbourhood of pixel (x, y): 4 neighbours in space+2 neighbours in time); ux(u . + ut) by

ux(ux + uy + ut)

and the same way for the second equation.
The values w((i, j)) come from the Malik and Perona discretization of the divergence (approximation of the derivatives by a centered scheme at semi-nodes)

w((i, j))(i, j) = ((i, j) - (x, y))

where (i, j, n) approximates (||2 + ||2)(i, j).
This semi-implicit scheme is a median way between a completely explicit scheme and AOS schemes (see [WtHRV98]).
The iterations are performed until n is reached, unless the precision percent is attained. There is no default value for this last parameter, in order to do all the iterations until n in case the user does not want to use the option -p, in the opposite case a value must be chosen.

Exemple of use:

ws_flow cmovie /tmp/U /tmp/V
ofdraw /tmp/U /tmp/V /tmp/disp
cmview -l /tmp/disp &


fop.

Version 1.0

Last Modification date : Thu Apr 15 06:26:51 2004

Author

Florent Ranchin

Next: cfdiff Up: Reference Previous: ofdraw   Contents   Index
mw 2004-05-05