kmeans::MultiscaleObjectTracker Class Reference

Inheritance diagram for kmeans::MultiscaleObjectTracker:

kmeans::OverlapTracker List of all members.

Detailed Description

Defines the interface for a multiscale image tracker that tracks based on segmented images.

Author:
Lakshman
Version:
Id
MultiscaleObjectTracker.h,v 1.5 2009/06/02 20:17:50 lakshman Exp


Public Types

typedef std::vector< int > Assignment
 For each label in the current image, the region number in the previous image that matches.
typedef std::vector< RegionPropertyRegionsProperties
 For each label in the previous image, the region properties including movement information.

Public Member Functions

void setIntermediateOutput (const std::string &toThisPrefix)
 An option that subclasses may want to provide is to write their intermediate outputs to the prefix provided here.
void track (const LImage< int > &originalImage, const std::vector< LImage< int > > &segmentedScales)
 Pass in the original image (needed for computing regions properties if needed to break ties, etc) and all the segmented scales that you would get by called Segmenter's getScale method.
virtual ~MultiscaleObjectTracker ()
const std::vector< Assignment > & getAssignments () const
 Returns the assigments at all the scales.
const AssignmentgetAssignment (size_t i) const
 Returns the assignment at the ith scale.
const std::vector< RegionsProperties > & getRegionsProperties () const
 Returns the properties of all the regions at all the scales.
const RegionsPropertiesgetRegionsProperties (size_t i) const
 Returns the properties of the regions at the ith scale.
size_t getNumScales () const
 The number of scales for which assignments are available.
void printAssignment (std::ostream &os, size_t scale) const
 Prints the assignment to the passed in stream.
void printRegions (std::ostream &os, size_t scale) const
 Prints the movement associated with each region to the input stream.
LImage< int > getMovementImage (size_t scale=0, bool useArrows=false) const
 Returns an image in which every 3x3 block contains the vector that represents the maximum movement in that block.

Static Public Member Functions

static LImage< int > advectImage (const LImage< int > &segimg, const RegionsProperties &regprop)
 Will advect the regions in the passed-in segmented image using the region properties specified.

Static Protected Member Functions

static LImage< int > advectImage (const LImage< int > &segimg, const RegionsProperties &regprop, const Assignment &mapping)
 Will advect the regions in the passed-in segmented image using the region properties specified.
static LImage< int > advectImage (const LImage< int > &coarseimg, const LImage< int > &detailimg, const RegionsProperties &regprop, const Assignment &mapping)
 Will advect the regions in the passed-in detail image using the region properties specified.

Protected Attributes

std::string prefix
 An option that subclasses may want to provide is to write their intermediate outputs to the prefix provided here.


Member Typedef Documentation

typedef std::vector<int> kmeans::MultiscaleObjectTracker::Assignment

For each label in the current image, the region number in the previous image that matches.

If zero or less than zero, there is no match.

typedef std::vector< RegionProperty > kmeans::MultiscaleObjectTracker::RegionsProperties

For each label in the previous image, the region properties including movement information.


Constructor & Destructor Documentation

virtual kmeans::MultiscaleObjectTracker::~MultiscaleObjectTracker (  )  [inline, virtual]


Member Function Documentation

static LImage<int> kmeans::MultiscaleObjectTracker::advectImage ( const LImage< int > &  coarseimg,
const LImage< int > &  detailimg,
const RegionsProperties regprop,
const Assignment mapping 
) [static, protected]

Will advect the regions in the passed-in detail image using the region properties specified.

A mapping of the labels in the coarse image which belongs to the previous frame to the actual region number in the current frame (and hence the regprop array) should be provided.

static LImage<int> kmeans::MultiscaleObjectTracker::advectImage ( const LImage< int > &  segimg,
const RegionsProperties regprop,
const Assignment mapping 
) [static, protected]

Will advect the regions in the passed-in segmented image using the region properties specified.

A mapping of the labels in the segmented image which belongs to the previous frame to the actual region number in the current frame (and hence the regprop array) should be provided.

static LImage<int> kmeans::MultiscaleObjectTracker::advectImage ( const LImage< int > &  segimg,
const RegionsProperties regprop 
) [static]

Will advect the regions in the passed-in segmented image using the region properties specified.

The movements encoded in the region props is used, so the region numbers in the segmented image should be the ones used to index the regprop array.

const Assignment& kmeans::MultiscaleObjectTracker::getAssignment ( size_t  i  )  const [inline]

Returns the assignment at the ith scale.

0 is the most detailed scale, and getNumScales()-1 is the most coarse. Results are undefined if i is passed outside of this range.

const std::vector<Assignment>& kmeans::MultiscaleObjectTracker::getAssignments (  )  const [inline]

Returns the assigments at all the scales.

See also:
getAssignment

LImage<int> kmeans::MultiscaleObjectTracker::getMovementImage ( size_t  scale = 0,
bool  useArrows = false 
) const

Returns an image in which every 3x3 block contains the vector that represents the maximum movement in that block.

The gray value represents the speed, while the direction of the arrow represents the direction.

There are two types of movement images possible -- using arrows to show the movement direction or to use a flow-effect. The flow effect is nicer, but may not be so clear-cut if there are too many small regions.

size_t kmeans::MultiscaleObjectTracker::getNumScales (  )  const

The number of scales for which assignments are available.

const RegionsProperties& kmeans::MultiscaleObjectTracker::getRegionsProperties ( size_t  i  )  const [inline]

Returns the properties of the regions at the ith scale.

0 is the most detailed scale, and getNumScales()-1 is the most coarse. Results are undefined if i is passed outside of this range.

const std::vector<RegionsProperties>& kmeans::MultiscaleObjectTracker::getRegionsProperties (  )  const [inline]

Returns the properties of all the regions at all the scales.

See also:
getRegionsProperties

void kmeans::MultiscaleObjectTracker::printAssignment ( std::ostream &  os,
size_t  scale 
) const

Prints the assignment to the passed in stream.

See also:
getAssignment for the meaning of the scale.

void kmeans::MultiscaleObjectTracker::printRegions ( std::ostream &  os,
size_t  scale 
) const

Prints the movement associated with each region to the input stream.

void kmeans::MultiscaleObjectTracker::setIntermediateOutput ( const std::string &  toThisPrefix  )  [inline]

An option that subclasses may want to provide is to write their intermediate outputs to the prefix provided here.

Normal usage is to add an extension to the prefix and write the file out there.

void kmeans::MultiscaleObjectTracker::track ( const LImage< int > &  originalImage,
const std::vector< LImage< int > > &  segmentedScales 
)

Pass in the original image (needed for computing regions properties if needed to break ties, etc) and all the segmented scales that you would get by called Segmenter's getScale method.


Member Data Documentation

std::string kmeans::MultiscaleObjectTracker::prefix [protected]

An option that subclasses may want to provide is to write their intermediate outputs to the prefix provided here.

Normal usage is to add an extension to the prefix and write the file out there.


Generated on Fri May 4 13:40:22 2012 for WDSS-IIw2algs by  doxygen 1.4.7