tracks Class Reference
[Sparse point track structures]

A structure for storing sparse tracks of points. More...

#include <tracks.h>

Inheritance diagram for tracks:

Inheritance graph
[legend]
Collaboration diagram for tracks:

Collaboration graph
[legend]

List of all members.

Classes

struct  frame_iterator
 Frame iterator. More...
struct  keypoint_match_iterator
 Temporal iterator for keypoints with a track. More...

Public Types

typedef bucket2d< tkeypoint >
::iterator 
keypoint_frame_iterator
 Spacial iterator for keypoints within a frame.

Public Member Functions

 tracks (tkeypoint::factory_t *kf=0, tframe::factory_t *ff=0, ttrack::factory_t *tf=0)
 tracks constructor.
 ~tracks ()
void set_match (tkeypoint *prev, tkeypoint *next)
 Connects "prev" with "next". Both points must be on consecutive frames.
void unset_match (tkeypoint *k)
 Disconnects k and k->matches.prev.
frame_iterator get_nth_frame_it (int n)
 Get a frame iterator for the Nth last frame. n=0 returns the most recent frame.
tframeget_nth_frame (int n)
 returns a pointer to the Nth last frame. 0 returns the most recent frame.
void remove_point_track (tkeypoint *point)
 Delete all the keypoints stored in the linked list 'prev_frame'.
void remove_track_tail (tkeypoint *point)
 removes "point" and all its previous correspondences.
void remove_unmatched_tracks (frame_iterator frame_it)
 removes all tracks that do not have a valid point->matches.next pointer.
void remove_empty_frames ()
 Removes all frames that do not contain any keypoint.
void remove_frame (frame_iterator &f)
 Removes the frame pointed by frame iterator f.
void remove_frame (tframe *frame)
 Removes the frame pointed by frame.

Public Attributes

tframeframes
ttrackall_tracks
tkeypoint::factory_tkeypoint_factory
tframe::factory_ttframe_factory
ttrack::factory_tttrack_factory


Detailed Description

A structure for storing sparse tracks of points.

The tracks class can be viewed as a sparse matrix whose columns are made of frame and whose rows are tracks of points. The matrix is stored in a sparse manner. Access to elements is done through iterators. Point access can be achieved by:

This class provides only storage. The actual tracking is the user's responsability.

Definition at line 187 of file tracks.h.


Member Typedef Documentation

Spacial iterator for keypoints within a frame.

Examples:
simpletrack.cpp.

Definition at line 220 of file tracks.h.


Constructor & Destructor Documentation

tracks::tracks ( tkeypoint::factory_t kf = 0,
tframe::factory_t ff = 0,
ttrack::factory_t tf = 0 
)

tracks constructor.

Takes factories for tkeypoint, tframe and ttrack as arguments. This way, the user can use derived classes.

Definition at line 116 of file tracks.cpp.

References keypoint_factory, tframe_factory, and ttrack_factory.

tracks::~tracks (  ) 

Definition at line 128 of file tracks.cpp.

References frames, and remove_frame().


Member Function Documentation

tframe * tracks::get_nth_frame ( int  n  ) 

tracks::frame_iterator tracks::get_nth_frame_it ( int  n  ) 

Get a frame iterator for the Nth last frame. n=0 returns the most recent frame.

Definition at line 135 of file tracks.cpp.

References tracks::frame_iterator::end().

Referenced by get_nth_frame(), VSView::segment_scene(), vobj_tracker_view::timerEvent(), and VSView::timerEvent().

void tracks::remove_empty_frames (  ) 

Removes all frames that do not contain any keypoint.

Definition at line 192 of file tracks.cpp.

References tracks::frame_iterator::end(), tracks::frame_iterator::frame, tframe::points, remove_frame(), and bucket2d< T >::size().

Referenced by remove_unmatched_tracks().

void tracks::remove_frame ( tframe frame  ) 

Removes the frame pointed by frame.

Definition at line 211 of file tracks.cpp.

References bucket2d< T >::begin(), tframe::factory_t::destroy(), frames, MLIST_RM, tframe::points, remove_track_tail(), bucket2d< T >::size(), and tframe_factory.

void tracks::remove_frame ( frame_iterator f  ) 

void tracks::remove_point_track ( tkeypoint point  ) 

Delete all the keypoints stored in the linked list 'prev_frame'.

Fixes prev_in_frame/next_in_frame linked list.

Definition at line 149 of file tracks.cpp.

References tkeypoint::dispose(), tkeypoint::matches, mlist_elem< T >::next, and mlist_elem< T >::prev.

Referenced by remove_track_tail(), and remove_unmatched_tracks().

void tracks::remove_track_tail ( tkeypoint point  ) 

removes "point" and all its previous correspondences.

Definition at line 165 of file tracks.cpp.

References tkeypoint::dispose(), tkeypoint::matches, mlist_elem< T >::prev, and remove_point_track().

Referenced by remove_frame().

void tracks::remove_unmatched_tracks ( frame_iterator  frame_it  ) 

void tracks::set_match ( tkeypoint prev,
tkeypoint next 
)

Connects "prev" with "next". Both points must be on consecutive frames.

Definition at line 37 of file tracks.cpp.

References all_tracks, ttrack::factory_t::create(), ttrack::keypoints, tkeypoint::matches, MLIST_INSERT, mlist_elem< T >::next, ttrack::point_added(), mlist_elem< T >::prev, tkeypoint::track, and ttrack_factory.

Referenced by kpt_tracker::track_ncclk().

void tracks::unset_match ( tkeypoint k  ) 


Member Data Documentation

Definition at line 257 of file tracks.h.

Referenced by tracks().

Definition at line 258 of file tracks.h.

Referenced by kpt_tracker::create_frame(), remove_frame(), and tracks().

Definition at line 259 of file tracks.h.

Referenced by set_match(), tracks(), tkeypoint::unlink(), and unset_match().


The documentation for this class was generated from the following files:

Generated on Tue Mar 30 15:53:26 2010 for Polyora by  doxygen 1.5.9