Landmark Class Reference

a Visual object-base Landmark class More...

#include <Beobot/Landmark.H>

Collaboration diagram for Landmark:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Constructor, assigment and destructor

 Landmark (rutz::shared_ptr< VisualObject > &obj, Point2D< int > objOffset, uint fNum, const std::string &name="")
 Constructor assuming precomputed Visual object.
 Landmark (const std::string &name="")
 blank constructor with an optional name entry
void init (rutz::shared_ptr< VisualObject > &obj, Point2D< int > objOffset, uint fNum)
 function to populate the initial landmark evidence
bool loadFrom (const std::string &fname)
 function to load an existing landmark file
bool saveTo (const std::string &fname)
 function to save the current landmark
 ~Landmark ()
 Destructor.
Access functions

const std::stringgetName () const
 name getter
void setName (const std::string name)
 name setter
void setMatchWin (rutz::shared_ptr< XWinManaged > matchWin)
 set the match window to view the matching
rutz::shared_ptr< XWinManagedgetMatchWin ()
 get the match window to view the matching
const uint numObjects () const
 number of visual objects in DB
const uint numTempObjects () const
 number of visual objects in Temp
const uint getLatestVisualObjectFNum () const
 latest frame number on DB list
const uint getLatestTempVisualObjectFNum () const
 latest frame number on temp list
const uint getLatestFNum () const
 latest frame number on either list (temp or DB)
const Point2D< int > getLatestOffsetCoords () const
 latest offset coordinates on either list (temp or DB)
const rutz::shared_ptr
< VisualObject > & 
getLatestObject (bool &indb, bool &intdb, int &tindex) const
 get the latest visualObject
const rutz::shared_ptr
< VisualObject > & 
getObject (const uint index) const
 object getter
const uint getVisualObjectFNum (uint index) const
 get the frame Number of object[index]
const Point2D< int > getOffsetCoords (uint index) const
 get the offset coordinates of object[index]
const bool isVisualObjectSal (uint index) const
 check whether object[index] is salient
const rutz::shared_ptr
< VisualObject > & 
getTempObject (const uint index) const
 temp object getter
const uint getTempVisualObjectFNum (uint index) const
 get the frame Number of temp object[index]
const Point2D< int > getTempOffsetCoords (uint index) const
 get the offset coordinates of temp object[index]
rutz::shared_ptr< VisualObjectDBgetVisualObjectDB () const
 get the visual object database
Rectangle getObjectRect (uint index)
 get the bounding box rectangle for the object[index]
bool haveSessionVO (std::string session)
 does the landmark have evidence VO from this session
uint getNumSession ()
 get the number of sessions it has
std::string getSession (const uint index)
 get a session name of the passed in index
std::pair< uint, uintgetSessionIndexRange (const uint index)
 get the session index range
Compute functions

const bool isSalVisualObject (uint index) const
 check if visual object(index) is salient
rutz::shared_ptr
< VisualObjectMatch
build (rutz::shared_ptr< VisualObject > obj, Point2D< int > objOffset, uint fNum)
 build the landmark by adding a new salient Visual Object
rutz::shared_ptr
< VisualObjectMatch
build (rutz::shared_ptr< VisualObject > obj, uint fNum)
rutz::shared_ptr
< VisualObjectMatch
buildCheck (rutz::shared_ptr< VisualObject > obj, Point2D< int > objOffset, uint fNum, bool &inDB, bool &inTDB, int &tIndex)
rutz::shared_ptr
< VisualObjectMatch
buildCheck (rutz::shared_ptr< VisualObject > obj, uint fNum, bool &inDB, bool &inTDB, int &tIndex)
 corresponding non salient object input
rutz::shared_ptr
< VisualObjectMatch
build (rutz::shared_ptr< VisualObject > obj, Point2D< int > objOffset, uint fNum, bool inDB, bool inTDB, int tIndex, rutz::shared_ptr< VisualObjectMatch > cmatch)
rutz::shared_ptr
< VisualObjectMatch
build (rutz::shared_ptr< VisualObject > obj, uint fNum, bool inDB, bool inTDB, int tIndex, rutz::shared_ptr< VisualObjectMatch > cmatch)
Point2D< int > getVelocity ()
 get the current velocity of the landmark
Point2D< int > getPosition ()
 get the position of the landmark
std::vector< rutz::shared_ptr
< Keypoint > > 
getActiveKeypoints ()
rutz::shared_ptr< KeypointTrackergetFittestKPtr ()
 get current active tracker with the longest chain
void setCameraIntrinsicParam (rutz::shared_ptr< CameraIntrinsicParam > cip)
 set the camera intrinsic param value
void moveLatestTempVisualObjectToDB ()
 move the last object on the temp DB to the store DB
uint numMatch (rutz::shared_ptr< Landmark > lmk, float maxPixDist=10.0F, float minfsim=.75F, float minscore=2.5F, uint minmatch=4)
 find number of object matches between the two landmarks
void combine (rutz::shared_ptr< Landmark > lmk1, rutz::shared_ptr< Landmark > lmk2)
 combine the two landmarks
void append (rutz::shared_ptr< Landmark > lmk)
 append the input landmark to the DB
int match (rutz::shared_ptr< VisualObject > obj, rutz::shared_ptr< VisualObjectMatch > &cmatch, int start=-1, int end=-1, float maxPixDist=10.0F, float minfsim=.75F, float minscore=2.5F, uint minmatch=4, float maxRotate=M_PI/4, float maxScale=5.0F, float maxShear=0.25F)
 match the visual object to the objects in the landmark
void transferEvidence (rutz::shared_ptr< Landmark > landmark2, bool indb2, bool intdb2, int tIndex2, rutz::shared_ptr< VisualObjectMatch > cmatch)
 transfer evidence from landmark2 to here
float matchSalientFeatures (rutz::shared_ptr< VisualObject > object)
void sort (std::vector< std::string > sessionNames)
 sort the objects in the landmark using the passed in session order
void setSessionInfo ()
 reset the session related information

Detailed Description

a Visual object-base Landmark class

Definition at line 51 of file Landmark.H.


Constructor & Destructor Documentation

Landmark::Landmark ( rutz::shared_ptr< VisualObject > &  obj,
Point2D< int >  objOffset,
uint  fNum,
const std::string name = "" 
)

Constructor assuming precomputed Visual object.

Parameters:
obj initial Visual object of landmark
objOffset the coordinate of the topleft corner of the image used by the visual object
fNum the initial frame number of the object it came from
name name of the landmark

Definition at line 76 of file Landmark.C.

References init().

Landmark::Landmark ( const std::string name = ""  ) 

blank constructor with an optional name entry

Definition at line 56 of file Landmark.C.

Landmark::~Landmark (  ) 

Destructor.

Definition at line 386 of file Landmark.C.


Member Function Documentation

void Landmark::append ( rutz::shared_ptr< Landmark lmk  ) 

append the input landmark to the DB

Definition at line 1564 of file Landmark.C.

rutz::shared_ptr< VisualObjectMatch > Landmark::build ( rutz::shared_ptr< VisualObject obj,
uint  fNum,
bool  inDB,
bool  inTDB,
int  tIndex,
rutz::shared_ptr< VisualObjectMatch cmatch 
)

build the landmark using non-salient object based on information passed by build check

Definition at line 467 of file Landmark.C.

References build().

rutz::shared_ptr< VisualObjectMatch > Landmark::build ( rutz::shared_ptr< VisualObject obj,
Point2D< int >  objOffset,
uint  fNum,
bool  inDB,
bool  inTDB,
int  tIndex,
rutz::shared_ptr< VisualObjectMatch cmatch 
)

build the landmark using salient object based on information passed by build check

Definition at line 448 of file Landmark.C.

References init(), and numObjects().

rutz::shared_ptr< VisualObjectMatch > Landmark::build ( rutz::shared_ptr< VisualObject obj,
uint  fNum 
)

build the landmark by adding visual object with no salient point (usually whole frame) -> will crop out the non-overlapping area

Definition at line 409 of file Landmark.C.

References build().

rutz::shared_ptr< VisualObjectMatch > Landmark::build ( rutz::shared_ptr< VisualObject obj,
Point2D< int >  objOffset,
uint  fNum 
)

build the landmark by adding a new salient Visual Object

Definition at line 392 of file Landmark.C.

References init(), and numObjects().

Referenced by build().

rutz::shared_ptr< VisualObjectMatch > Landmark::buildCheck ( rutz::shared_ptr< VisualObject obj,
uint  fNum,
bool &  inDB,
bool &  inTDB,
int &  tIndex 
)

corresponding non salient object input

Definition at line 437 of file Landmark.C.

References buildCheck().

rutz::shared_ptr< VisualObjectMatch > Landmark::buildCheck ( rutz::shared_ptr< VisualObject obj,
Point2D< int >  objOffset,
uint  fNum,
bool &  inDB,
bool &  inTDB,
int &  tIndex 
)

just like build except it does not add the object only return where it would have been placed (in DB or Temp DB) or if it is rejected altogether

Definition at line 419 of file Landmark.C.

References numObjects().

Referenced by buildCheck().

void Landmark::combine ( rutz::shared_ptr< Landmark lmk1,
rutz::shared_ptr< Landmark lmk2 
)

combine the two landmarks

Definition at line 1543 of file Landmark.C.

References numObjects().

std::vector< rutz::shared_ptr< Keypoint > > Landmark::getActiveKeypoints (  ) 

get the keypoints in the current frames that are likely to be as determined using the trackers

Definition at line 861 of file Landmark.C.

References drawDisk(), inplacePaste(), rutz::shared_ptr< T >::is_valid(), numObjects(), and ZEROS.

Referenced by getPosition().

rutz::shared_ptr< KeypointTracker > Landmark::getFittestKPtr (  ) 

get current active tracker with the longest chain

Definition at line 917 of file Landmark.C.

References numObjects().

Referenced by getPosition().

const uint Landmark::getLatestFNum (  )  const [inline]

latest frame number on either list (temp or DB)

Definition at line 470 of file Landmark.H.

const rutz::shared_ptr< VisualObject > & Landmark::getLatestObject ( bool &  indb,
bool &  intdb,
int &  tindex 
) const [inline]

get the latest visualObject

Definition at line 479 of file Landmark.H.

References numObjects(), and numTempObjects().

const Point2D< int > Landmark::getLatestOffsetCoords (  )  const [inline]

latest offset coordinates on either list (temp or DB)

Definition at line 513 of file Landmark.H.

References numObjects(), and numTempObjects().

const uint Landmark::getLatestTempVisualObjectFNum (  )  const [inline]

latest frame number on temp list

Definition at line 467 of file Landmark.H.

const uint Landmark::getLatestVisualObjectFNum (  )  const [inline]

latest frame number on DB list

Definition at line 464 of file Landmark.H.

rutz::shared_ptr< XWinManaged > Landmark::getMatchWin (  )  [inline]

get the match window to view the matching

Definition at line 455 of file Landmark.H.

const std::string & Landmark::getName (  )  const [inline]

name getter

Definition at line 446 of file Landmark.H.

uint Landmark::getNumSession (  )  [inline]

get the number of sessions it has

Definition at line 659 of file Landmark.H.

const rutz::shared_ptr< VisualObject > & Landmark::getObject ( const uint  index  )  const [inline]

object getter

Definition at line 534 of file Landmark.H.

References ASSERT, and numObjects().

Rectangle Landmark::getObjectRect ( uint  index  ) 

get the bounding box rectangle for the object[index]

Definition at line 1182 of file Landmark.C.

const Point2D< int > Landmark::getOffsetCoords ( uint  index  )  const [inline]

get the offset coordinates of object[index]

get offset coordinates of object[index]

Definition at line 548 of file Landmark.H.

References ASSERT.

Point2D< int > Landmark::getPosition (  ) 

get the position of the landmark

Definition at line 802 of file Landmark.C.

References drawDisk(), getActiveKeypoints(), getFittestKPtr(), Point2D< T >::i, inplacePaste(), rutz::shared_ptr< T >::is_valid(), numObjects(), and ZEROS.

std::string Landmark::getSession ( const uint  index  )  [inline]

get a session name of the passed in index

Definition at line 665 of file Landmark.H.

References ASSERT.

std::pair< uint, uint > Landmark::getSessionIndexRange ( const uint  index  )  [inline]

get the session index range

Definition at line 652 of file Landmark.H.

References ASSERT.

const rutz::shared_ptr< VisualObject > & Landmark::getTempObject ( const uint  index  )  const [inline]

temp object getter

Definition at line 563 of file Landmark.H.

References ASSERT, and numTempObjects().

const Point2D< int > Landmark::getTempOffsetCoords ( uint  index  )  const [inline]

get the offset coordinates of temp object[index]

get offset coordinates of temp object[index]

Definition at line 577 of file Landmark.H.

References ASSERT.

const uint Landmark::getTempVisualObjectFNum ( uint  index  )  const [inline]

get the frame Number of temp object[index]

Definition at line 570 of file Landmark.H.

References ASSERT.

Point2D< int > Landmark::getVelocity (  ) 

get the current velocity of the landmark

Definition at line 847 of file Landmark.C.

References numObjects().

rutz::shared_ptr< VisualObjectDB > Landmark::getVisualObjectDB (  )  const [inline]

get the visual object database

return a pointer to the visual object DB

Definition at line 585 of file Landmark.H.

const uint Landmark::getVisualObjectFNum ( uint  index  )  const [inline]

get the frame Number of object[index]

Definition at line 541 of file Landmark.H.

References ASSERT.

bool Landmark::haveSessionVO ( std::string  session  )  [inline]

does the landmark have evidence VO from this session

check whether it has the passed in session

Definition at line 644 of file Landmark.H.

void Landmark::init ( rutz::shared_ptr< VisualObject > &  obj,
Point2D< int >  objOffset,
uint  fNum 
)

function to populate the initial landmark evidence

Definition at line 97 of file Landmark.C.

References sformat().

Referenced by build(), and Landmark().

const bool Landmark::isSalVisualObject ( uint  index  )  const [inline]

check if visual object(index) is salient

check whether object[index] is salient

Definition at line 555 of file Landmark.H.

References ASSERT, and numObjects().

const bool Landmark::isVisualObjectSal ( uint  index  )  const [inline]

check whether object[index] is salient

bool Landmark::loadFrom ( const std::string fname  ) 

function to load an existing landmark file

Definition at line 117 of file Landmark.C.

References numObjects().

int Landmark::match ( rutz::shared_ptr< VisualObject obj,
rutz::shared_ptr< VisualObjectMatch > &  cmatch,
int  start = -1,
int  end = -1,
float  maxPixDist = 10.0F,
float  minfsim = .75F,
float  minscore = 2.5F,
uint  minmatch = 4,
float  maxRotate = M_PI/4,
float  maxScale = 5.0F,
float  maxShear = 0.25F 
)

match the visual object to the objects in the landmark

Definition at line 1339 of file Landmark.C.

References ASSERT.

Referenced by numMatch().

float Landmark::matchSalientFeatures ( rutz::shared_ptr< VisualObject object  ) 

match the salient features return a normalized [ 0.0 ... 1.0 ]

Definition at line 295 of file Landmark.C.

References sqrt().

void Landmark::moveLatestTempVisualObjectToDB (  ) 

move the last object on the temp DB to the store DB

Definition at line 1449 of file Landmark.C.

uint Landmark::numMatch ( rutz::shared_ptr< Landmark lmk,
float  maxPixDist = 10.0F,
float  minfsim = .75F,
float  minscore = 2.5F,
uint  minmatch = 4 
)

find number of object matches between the two landmarks

Definition at line 1492 of file Landmark.C.

References match(), and numObjects().

const uint Landmark::numObjects (  )  const [inline]
const uint Landmark::numTempObjects (  )  const [inline]

number of visual objects in Temp

Definition at line 461 of file Landmark.H.

Referenced by getLatestObject(), getLatestOffsetCoords(), and getTempObject().

bool Landmark::saveTo ( const std::string fname  ) 

function to save the current landmark

Definition at line 347 of file Landmark.C.

References sformat().

void Landmark::setCameraIntrinsicParam ( rutz::shared_ptr< CameraIntrinsicParam cip  )  [inline]

set the camera intrinsic param value

set the camera intrinsic parameters

Definition at line 640 of file Landmark.H.

void Landmark::setMatchWin ( rutz::shared_ptr< XWinManaged matchWin  )  [inline]

set the match window to view the matching

Definition at line 452 of file Landmark.H.

void Landmark::setName ( const std::string  name  )  [inline]

name setter

Definition at line 449 of file Landmark.H.

void Landmark::setSessionInfo (  ) 

reset the session related information

Definition at line 226 of file Landmark.C.

References ASSERT.

void Landmark::sort ( std::vector< std::string sessionNames  ) 

sort the objects in the landmark using the passed in session order

Definition at line 1603 of file Landmark.C.

References Point2D< T >::i, and numObjects().

void Landmark::transferEvidence ( rutz::shared_ptr< Landmark landmark2,
bool  indb2,
bool  intdb2,
int  tIndex2,
rutz::shared_ptr< VisualObjectMatch cmatch 
)

transfer evidence from landmark2 to here

Definition at line 679 of file Landmark.C.


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