LandmarkDB Class Reference

LandmarkDB class. More...

#include <Beobot/LandmarkDB.H>

Collaboration diagram for LandmarkDB:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Constructors, assignment, and Destructors

 LandmarkDB (uint nSegment=0)
 Constructor.
 ~LandmarkDB ()
 Destructor.
void setWindow (rutz::shared_ptr< XWinManaged > win)
 set the window to debug
void resize (uint nSegment)
 clear and resize the DB to the passed in number
void addLandmark (uint snum, rutz::shared_ptr< Landmark > lmk)
 add landmark to segment snum
access functions

uint getNumSegment ()
 get the number of segments
uint getNumSegLandmark (uint segNum)
 get the number of landmark in segNum
rutz::shared_ptr< LandmarkgetLandmark (uint segNum, uint lmkNum)
 get the requested landmark
float getLenTrav (uint snum, uint lnum, uint index)
 get the length traveled given the object index in the database
std::pair< float, float > getLocationRange (uint snum, uint lnum)
 get the location range of a landmark
void display ()
 get the session length (in frame numbers) of a session
member functions

void build (std::vector< rutz::shared_ptr< VisualObject > > &inputVO, std::vector< Point2D< int > > &objOffset, uint fNum, uint currSegNum, rutz::shared_ptr< VisualObject > scene)
 build the landmarkDB by inputting the Visual Object, etc information
void finishBuild (uint rframe)
 wrap up the building process by pruning small landmarks
void setSession (std::string sessionFName, bool sort=true)
void sortLandmarks ()
 sort landmarks according to the session names order

Detailed Description

LandmarkDB class.

Definition at line 50 of file LandmarkDB.H.


Constructor & Destructor Documentation

LandmarkDB::LandmarkDB ( uint  nSegment = 0  ) 

Constructor.

Definition at line 46 of file LandmarkDB.C.

References resize().

LandmarkDB::~LandmarkDB (  ) 

Destructor.

Definition at line 58 of file LandmarkDB.C.


Member Function Documentation

void LandmarkDB::addLandmark ( uint  snum,
rutz::shared_ptr< Landmark lmk 
) [inline]

add landmark to segment snum

Definition at line 242 of file LandmarkDB.H.

References ASSERT.

void LandmarkDB::build ( std::vector< rutz::shared_ptr< VisualObject > > &  inputVO,
std::vector< Point2D< int > > &  objOffset,
uint  fNum,
uint  currSegNum,
rutz::shared_ptr< VisualObject scene 
)

build the landmarkDB by inputting the Visual Object, etc information

build and finishBuild are 2 functions that needs to be called to create landmarks. build is called repeatedly every time new evidence comes in. finishBuild is called at the end to wrap up the process. It prunes all the ephemeral landmarks.

Usually build and actual use are done on seperate session.

Before use, need to call setSession function to get the landmarks sorted and all the session related info reset

Definition at line 63 of file LandmarkDB.C.

References ASSERT, Point2D< T >::distance(), Timer::get(), Point2D< T >::i, NFDIFF, Timer::reset(), sformat(), sqrt(), SIFTaffine::transform(), and SIFTaffine::ty.

void LandmarkDB::display (  ) 

get the session length (in frame numbers) of a session

print and display the database

Definition at line 754 of file LandmarkDB.C.

References drawDisk(), Dims::h(), inplacePaste(), rutz::shared_ptr< T >::is_invalid(), Dims::w(), Raster::waitForKey(), and ZEROS.

void LandmarkDB::finishBuild ( uint  rframe  ) 

wrap up the building process by pruning small landmarks

Definition at line 689 of file LandmarkDB.C.

rutz::shared_ptr< Landmark > LandmarkDB::getLandmark ( uint  segNum,
uint  lmkNum 
) [inline]

get the requested landmark

Definition at line 261 of file LandmarkDB.H.

References ASSERT.

float LandmarkDB::getLenTrav ( uint  snum,
uint  lnum,
uint  index 
)

get the length traveled given the object index in the database

Definition at line 963 of file LandmarkDB.C.

std::pair< float, float > LandmarkDB::getLocationRange ( uint  snum,
uint  lnum 
) [inline]

get the location range of a landmark

Definition at line 269 of file LandmarkDB.H.

References ASSERT.

uint LandmarkDB::getNumSegLandmark ( uint  segNum  )  [inline]

get the number of landmark in segNum

Definition at line 254 of file LandmarkDB.H.

References ASSERT.

uint LandmarkDB::getNumSegment (  )  [inline]

get the number of segments

Definition at line 249 of file LandmarkDB.H.

void LandmarkDB::resize ( uint  nSegment  )  [inline]

clear and resize the DB to the passed in number

Definition at line 233 of file LandmarkDB.H.

Referenced by LandmarkDB().

void LandmarkDB::setSession ( std::string  sessionFName,
bool  sort = true 
)

set the session information must call this after finished building a landmark db to sort and then set session related information

Definition at line 822 of file LandmarkDB.C.

References sortLandmarks().

void LandmarkDB::setWindow ( rutz::shared_ptr< XWinManaged win  )  [inline]

set the window to debug

Definition at line 223 of file LandmarkDB.H.

void LandmarkDB::sortLandmarks (  ) 

sort landmarks according to the session names order

Definition at line 854 of file LandmarkDB.C.

Referenced by setSession().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:33 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3