All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class feature.OpticalFlow

java.lang.Object
   |
   +----feature.OpticalFlow

public class OpticalFlow
extends Object
Realization of Hierarchical block based optical flow estimation

Author:
Di Zhong (Columbia University)

Variable Index

 o flow
Optical flow data array
flow[i][j][0] - x-displacement of pixel(j,i), >99.0 means invalid ;
flow[i][j][1] - y-displacement of pixel(j,i), >99.0 means invalid ;
Note original point is the upper left corner of the bounding box given at constructor.
 o MIN_ERROR
minimum abserr between two matching blocks before stoping search
Default value is 1.0

Constructor Index

 o OpticalFlow(float[][], float[][], Rectangle, int, int, int)
Compute optical flow of the first image (inside bounding box if given) against the second one
Using 3 iteration hierarchical block based estimation algorithm

Method Index

 o saveNeedleMap(String, int)
Save optical flow as a PGM file showing motion vectors

Variables

 o flow
 public float flow[][][]
Optical flow data array
flow[i][j][0] - x-displacement of pixel(j,i), >99.0 means invalid ;
flow[i][j][1] - y-displacement of pixel(j,i), >99.0 means invalid ;
Note original point is the upper left corner of the bounding box given at constructor.

See Also:
OpticalFlow
 o MIN_ERROR
 public static float MIN_ERROR
minimum abserr between two matching blocks before stoping search
Default value is 1.0

Constructors

 o OpticalFlow
 public OpticalFlow(float img1[][],
                    float img2[][],
                    Rectangle bbox,
                    int step,
                    int srange,
                    int mrad)
Compute optical flow of the first image (inside bounding box if given) against the second one
Using 3 iteration hierarchical block based estimation algorithm

Parameters:
img1 - the first image (Note: it will be modified)
img2 - the second image (Note: it will be modified)
bbox - bounding box in img1 (null: whole frame)
step - step size at the first round (~8), has to be 2^n
srange - searching range at the first round (~7)
mrad - radius of matching block (~12)

Methods

 o saveNeedleMap
 public void saveNeedleMap(String fname,
                           int step)
Save optical flow as a PGM file showing motion vectors

Parameters:
fname - output file name
step - sampling step
See Also:
ImageData, ImageIO

All Packages  Class Hierarchy  This Package  Previous  Next  Index