GSlocalizer Class Reference

#include <Beobot/GSlocalizer.H>

Inheritance diagram for GSlocalizer:
Inheritance graph
[legend]
Collaboration diagram for GSlocalizer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Constructors and Destructors

 GSlocalizer (OptionManager &mgr, const std::string &descrName="Gist and Saliency localizer", const std::string &tagName="GSlocalizer")
 Constructor.
virtual ~GSlocalizer ()
 Destructor.
void setSavePrefix (std::string prefix)
 set the prefix of file to save data - has to be done
void setEnvironment (rutz::shared_ptr< Environment > env)
 set the environment - has to be done
Access functions

uint getNumObjectSearch (uint index)
 get number of objects compared in the search
rutz::shared_ptr< EnvironmentgetEnvironment ()
 get the environment information
void setWindow (rutz::shared_ptr< XWinManaged > inputWin)
 set the window to display results
void setBeoWulf (nub::soft_ref< Beowulf > beo)
 set beowulf access
Image< PixRGB< byte > > getInputImage ()
 get the input image
uint getNumInputObject ()
 get the number of objects inputted
rutz::shared_ptr< VisualObjectgetInputVO (uint index)
 get the visual object that we try to match
Image< double > getInputGist ()
 get the input gist
rutz::shared_ptr
< VisualObjectMatch
getVOmatch (uint index)
 get the visual object match for the found object
uint getSegmentNumberMatch (uint index)
 get the segment number of the object match found
float getLengthTraveledMatch (uint index)
 get the length traveled of the object match found
Point2D< int > getInputObjOffset (uint index)
int getInputFnum ()
 get the last input frame number
int getSearchInputFnum ()
 get the last input frame number where search is started
rutz::shared_ptr< HistogramgetSegmentHistogram ()
 get the segment histogram from the segment classifier
Point2D< int > getLocation ()
 get our geographical location
uint getSegmentLocation ()
 get our segment location
float getSegmentLengthTraveled ()
 get the length traveled within the segment
void setGroundTruth (uint snum, float ltrav)
 set ground truth
void getGroundTruth (uint &snum, float &ltrav)
 get ground truth
member functions

void initParticles (std::string belFName=std::string(""))
 initialize the localization particles
std::vector< GSparticlegetBeliefParticles ()
 get the belief particles (usually for recovering crashes)
bool outputReady ()
 check if the serach is finished
bool isMatchFound (uint index)
 return the result of the matching search
void input (Image< PixRGB< byte > > ima, std::vector< rutz::shared_ptr< VisualObject > > inputVO, std::vector< Point2D< int > > inputObjOffset, int inputFnum, Image< double > cgist, float dx=-1.0F, float dy=-1.0F)
rutz::shared_ptr< HistogramgetSegmentBeliefHistogram ()
 the belief histogram for segment only localization
void threadCompute ()
 For internal thread use: Compute a conspicuity map from an image.
void stopSearch ()
void stopSearch2 ()
void updateBelief ()
void actionUpdateBelief ()
 move the object from the previous location
void segmentUpdateBelief ()
 update belief using the segment prediction
void objectUpdateBelief ()
 update belief using all the objects found
void objectUpdateBelief (uint index)
 update belief using object 'index'
void setLocation ()
 set the most likely location
Image< PixRGB< byte > > getBeliefImage (uint w, uint h, int &scale)
 get the belief image (it is put on top of a map)
Image< PixRGB< byte > > getMatchImage (uint index, Dims d)
 get the match image
Point2D< int > getMotorSignal ()
 get motor signal

Protected Member Functions

void start1 ()
 get started
void stop2 ()
 get stopped

Detailed Description

Thread with localizer, Object database, search priority list takes in salient object and gist vector as input

Definition at line 108 of file GSlocalizer.H.


Constructor & Destructor Documentation

GSlocalizer::GSlocalizer ( OptionManager mgr,
const std::string descrName = "Gist and Saliency localizer",
const std::string tagName = "GSlocalizer" 
)

Constructor.

Definition at line 71 of file GSlocalizer.C.

References rutz::shared_ptr< T >::reset().

GSlocalizer::~GSlocalizer (  )  [virtual]

Destructor.

Definition at line 169 of file GSlocalizer.C.


Member Function Documentation

void GSlocalizer::actionUpdateBelief (  ) 

move the object from the previous location

Definition at line 1034 of file GSlocalizer.C.

References getLocation(), log(), and sqrt().

Image< PixRGB< byte > > GSlocalizer::getBeliefImage ( uint  w,
uint  h,
int &  scale 
)
std::vector< GSparticle > GSlocalizer::getBeliefParticles (  ) 

get the belief particles (usually for recovering crashes)

Definition at line 236 of file GSlocalizer.C.

rutz::shared_ptr< Environment > GSlocalizer::getEnvironment (  ) 

get the environment information

Definition at line 114 of file GSlocalizer.C.

void GSlocalizer::getGroundTruth ( uint snum,
float &  ltrav 
)

get ground truth

Definition at line 524 of file GSlocalizer.C.

int GSlocalizer::getInputFnum (  ) 

get the last input frame number

Definition at line 372 of file GSlocalizer.C.

Referenced by threadCompute().

Image< double > GSlocalizer::getInputGist (  ) 

get the input gist

Definition at line 337 of file GSlocalizer.C.

Image< PixRGB< byte > > GSlocalizer::getInputImage (  ) 

get the input image

Definition at line 313 of file GSlocalizer.C.

Point2D< int > GSlocalizer::getInputObjOffset ( uint  index  ) 

get the object offset of the visual object that we try to match

Definition at line 348 of file GSlocalizer.C.

References ASSERT.

rutz::shared_ptr< VisualObject > GSlocalizer::getInputVO ( uint  index  ) 

get the visual object that we try to match

Definition at line 325 of file GSlocalizer.C.

References ASSERT.

float GSlocalizer::getLengthTraveledMatch ( uint  index  ) 

get the length traveled of the object match found

Definition at line 407 of file GSlocalizer.C.

References ASSERT.

Point2D< int > GSlocalizer::getLocation (  ) 

get our geographical location

Definition at line 1430 of file GSlocalizer.C.

Referenced by actionUpdateBelief(), objectUpdateBelief(), and segmentUpdateBelief().

Image< PixRGB< byte > > GSlocalizer::getMatchImage ( uint  index,
Dims  d 
)

get the match image

Definition at line 1500 of file GSlocalizer.C.

References ASSERT.

Point2D< int > GSlocalizer::getMotorSignal (  ) 

get motor signal

motor signal can be used (using PID, for example) to obtain motor command. Motor signal is a delta signal (in image coordinate) of where the robot should go to get to the goal state.

Definition at line 1531 of file GSlocalizer.C.

uint GSlocalizer::getNumInputObject (  ) 

get the number of objects inputted

Definition at line 319 of file GSlocalizer.C.

Referenced by threadCompute().

uint GSlocalizer::getNumObjectSearch ( uint  index  ) 

get number of objects compared in the search

Definition at line 414 of file GSlocalizer.C.

References ASSERT.

Referenced by threadCompute().

int GSlocalizer::getSearchInputFnum (  ) 

get the last input frame number where search is started

Definition at line 383 of file GSlocalizer.C.

Referenced by threadCompute().

rutz::shared_ptr< Histogram > GSlocalizer::getSegmentBeliefHistogram (  ) 

the belief histogram for segment only localization

print the histogram profile

Definition at line 253 of file GSlocalizer.C.

Referenced by getBeliefImage().

rutz::shared_ptr< Histogram > GSlocalizer::getSegmentHistogram (  ) 

get the segment histogram from the segment classifier

Definition at line 394 of file GSlocalizer.C.

float GSlocalizer::getSegmentLengthTraveled (  ) 

get the length traveled within the segment

Definition at line 1442 of file GSlocalizer.C.

uint GSlocalizer::getSegmentLocation (  ) 

get our segment location

Definition at line 1436 of file GSlocalizer.C.

uint GSlocalizer::getSegmentNumberMatch ( uint  index  ) 

get the segment number of the object match found

Definition at line 400 of file GSlocalizer.C.

References ASSERT.

rutz::shared_ptr< VisualObjectMatch > GSlocalizer::getVOmatch ( uint  index  ) 

get the visual object match for the found object

Definition at line 360 of file GSlocalizer.C.

References ASSERT.

void GSlocalizer::initParticles ( std::string  belFName = std::string("")  ) 

initialize the localization particles

Definition at line 179 of file GSlocalizer.C.

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

void GSlocalizer::input ( Image< PixRGB< byte > >  ima,
std::vector< rutz::shared_ptr< VisualObject > >  inputVO,
std::vector< Point2D< int > >  inputObjOffset,
int  inputFnum,
Image< double >  cgist,
float  dx = -1.0F,
float  dy = -1.0F 
)

input the image, visual object and gist feature for search also add the odometry change

Definition at line 427 of file GSlocalizer.C.

References Image< T >::clear().

bool GSlocalizer::isMatchFound ( uint  index  ) 

return the result of the matching search

Definition at line 289 of file GSlocalizer.C.

References ASSERT.

Referenced by threadCompute().

void GSlocalizer::objectUpdateBelief ( uint  index  ) 

update belief using object 'index'

Definition at line 1280 of file GSlocalizer.C.

References Point2D< T >::distance(), getLocation(), Dims::h(), sqrt(), and Dims::w().

void GSlocalizer::objectUpdateBelief (  ) 

update belief using all the objects found

Definition at line 1163 of file GSlocalizer.C.

References Point2D< T >::distance(), getLocation(), Dims::h(), sqrt(), and Dims::w().

Referenced by threadCompute().

bool GSlocalizer::outputReady (  ) 

check if the serach is finished

Definition at line 271 of file GSlocalizer.C.

void GSlocalizer::segmentUpdateBelief (  ) 

update belief using the segment prediction

Definition at line 1076 of file GSlocalizer.C.

References getLocation().

void GSlocalizer::setBeoWulf ( nub::soft_ref< Beowulf beo  ) 

set beowulf access

Definition at line 120 of file GSlocalizer.C.

void GSlocalizer::setEnvironment ( rutz::shared_ptr< Environment env  ) 

set the environment - has to be done

from its environment: topological map

from its environment: visual landmark database

Definition at line 96 of file GSlocalizer.C.

void GSlocalizer::setGroundTruth ( uint  snum,
float  ltrav 
)

set ground truth

Definition at line 517 of file GSlocalizer.C.

void GSlocalizer::setLocation (  ) 

set the most likely location

Definition at line 1385 of file GSlocalizer.C.

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

Referenced by updateBelief().

void GSlocalizer::setSavePrefix ( std::string  prefix  ) 

set the prefix of file to save data - has to be done

Definition at line 108 of file GSlocalizer.C.

void GSlocalizer::setWindow ( rutz::shared_ptr< XWinManaged inputWin  ) 

set the window to display results

Definition at line 173 of file GSlocalizer.C.

void GSlocalizer::start1 (  )  [protected, virtual]

get started

Reimplemented from ModelComponent.

Definition at line 126 of file GSlocalizer.C.

void GSlocalizer::stop2 (  )  [protected, virtual]

get stopped

Reimplemented from ModelComponent.

Definition at line 157 of file GSlocalizer.C.

void GSlocalizer::stopSearch (  ) 

stop search by cleaning up the queue NOTE: this is a hard stop (blocking operation) may take time (500ms, or even longer)

stop search by cleaning up the queue

wait until all workers stop working

Definition at line 762 of file GSlocalizer.C.

Referenced by threadCompute().

void GSlocalizer::stopSearch2 (  ) 

stop search by flipping a stop-search bit NOTE: this is a soft/non-blocking operation

Definition at line 782 of file GSlocalizer.C.

void GSlocalizer::threadCompute (  ) 
void GSlocalizer::updateBelief (  ) 

update belief using the input just processed update our likely location

Definition at line 1025 of file GSlocalizer.C.

References setLocation().


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