Environment class. More...
#include <Beobot/Environment.H>
Public Member Functions | |
Constructors, assignment, and Destructors | |
Environment (std::string envFName=std::string("")) | |
Constructor: generate a blank environment if file does not exist. | |
bool | isBlank () |
return true if environment has no segments | |
bool | load (std::string fName) |
load the .env file | |
bool | save (std::string fName, std::string envPrefix) |
save the main environment to a file | |
bool | save (std::string fName, std::string tfName, std::string envPrefix) |
save the main and the just build environment | |
~Environment () | |
Destructor. | |
void | setWindow (rutz::shared_ptr< XWinManaged > win) |
set the window to view results | |
void | resetNumSegment (uint nSegment) |
reset the number of segments in the environment | |
void | setCurrentSegment (uint currSegNum) |
set the current | |
Access functions | |
uint | getNumSegment () |
get the number of segments | |
rutz::shared_ptr< Histogram > | getSegmentHistogram () |
get the segment histogram | |
rutz::shared_ptr< TopologicalMap > | getTopologicalMap () |
get the topological map | |
rutz::shared_ptr< LandmarkDB > | getLandmarkDB () |
get the visual landmark database | |
Point2D< int > | getLocation (uint cseg, float ltrav) |
get Point2D<int> location of the (segnum, ltrav) descriptor | |
void | getLocationFloat (uint cseg, float ltrav, float &x, float &y) |
get Point2D<int> location (in float) of the (segnum, ltrav) descriptor | |
Compute functions | |
rutz::shared_ptr< Histogram > | classifySegNum (Image< double > cgist) |
classify segment number from the input gist | |
void | build (std::vector< rutz::shared_ptr< VisualObject > > &inputVO, std::vector< Point2D< int > > &objOffset, uint fNum, rutz::shared_ptr< VisualObject > scene) |
initialize a new landmarkDB to be build | |
void | startBuild () |
void | finishBuild (std::string prefix, std::string path, uint rframe) |
finish building the landmarkDB - has all the ending procedure |
Environment class.
Definition at line 54 of file Environment.H.
Environment::Environment | ( | std::string | envFName = std::string("") |
) |
Constructor: generate a blank environment if file does not exist.
Definition at line 48 of file Environment.C.
References load().
Environment::~Environment | ( | ) |
Destructor.
Definition at line 317 of file Environment.C.
void Environment::build | ( | std::vector< rutz::shared_ptr< VisualObject > > & | inputVO, | |
std::vector< Point2D< int > > & | objOffset, | |||
uint | fNum, | |||
rutz::shared_ptr< VisualObject > | scene | |||
) |
initialize a new landmarkDB to be build
Definition at line 358 of file Environment.C.
rutz::shared_ptr< Histogram > Environment::classifySegNum | ( | Image< double > | cgist | ) |
classify segment number from the input gist
Definition at line 322 of file Environment.C.
References FFNtrainInfo::isPCA, and matrixMult().
void Environment::finishBuild | ( | std::string | prefix, | |
std::string | path, | |||
uint | rframe | |||
) |
finish building the landmarkDB - has all the ending procedure
Definition at line 369 of file Environment.C.
References sformat(), and Raster::waitForKey().
rutz::shared_ptr< LandmarkDB > Environment::getLandmarkDB | ( | ) | [inline] |
get the visual landmark database
Definition at line 193 of file Environment.H.
get Point2D<int> location of the (segnum, ltrav) descriptor
Definition at line 204 of file Environment.H.
void Environment::getLocationFloat | ( | uint | cseg, | |
float | ltrav, | |||
float & | x, | |||
float & | y | |||
) | [inline] |
get Point2D<int> location (in float) of the (segnum, ltrav) descriptor
Definition at line 210 of file Environment.H.
uint Environment::getNumSegment | ( | ) | [inline] |
get the number of segments
Definition at line 183 of file Environment.H.
rutz::shared_ptr< Histogram > Environment::getSegmentHistogram | ( | ) | [inline] |
get the segment histogram
Definition at line 178 of file Environment.H.
rutz::shared_ptr< TopologicalMap > Environment::getTopologicalMap | ( | ) | [inline] |
get the topological map
Definition at line 188 of file Environment.H.
bool Environment::isBlank | ( | ) |
return true if environment has no segments
Definition at line 71 of file Environment.C.
bool Environment::load | ( | std::string | fName | ) |
load the .env file
Definition at line 77 of file Environment.C.
References Timer::get(), Timer::reset(), resetNumSegment(), and sformat().
Referenced by Environment().
void Environment::resetNumSegment | ( | uint | nSegment | ) |
reset the number of segments in the environment
Definition at line 204 of file Environment.C.
Referenced by load().
bool Environment::save | ( | std::string | fName, | |
std::string | tfName, | |||
std::string | envPrefix | |||
) |
save the main and the just build environment
Definition at line 221 of file Environment.C.
bool Environment::save | ( | std::string | fName, | |
std::string | envPrefix | |||
) |
save the main environment to a file
Definition at line 229 of file Environment.C.
void Environment::setCurrentSegment | ( | uint | currSegNum | ) |
void Environment::setWindow | ( | rutz::shared_ptr< XWinManaged > | win | ) | [inline] |
set the window to view results
Definition at line 198 of file Environment.H.
void Environment::startBuild | ( | ) |
build the landmarkDB from the current run keep calling this every frame
Definition at line 349 of file Environment.C.
References rutz::shared_ptr< T >::reset().