Public Member Functions | |
SceneUnderstanding (ModelManager *mgr, nub::ref< StdBrain > &brain) | |
~SceneUnderstanding () | |
Destructor. | |
nub::ref< StdBrain > | getBrainPtr () |
get the brain | |
Bayes * | getBayesPtr () |
Get the Bayes network. | |
SWIProlog * | getPrologPtr () |
get the Prolog engine | |
DescriptorVec * | getDescriptorVecPtr () |
get the descriptor vector | |
void | setImage (Image< PixRGB< byte > > &img) |
Set the current image. | |
float | evolveBrain () |
Point2D< int > | getFoveaLoc () |
Get the current fovea location (attention location). | |
std::vector< double > | getFV (Point2D< int > foveaLoc) |
Get a feature vector from the fovea at location p. | |
int | classifyFovea (Point2D< int > foveaLoc, double *prob=NULL) |
classify the object under the fovea positioned at p | |
void | learn (Point2D< int > foveaLoc, const char *name) |
Learn to associate the feature under fovea with object. | |
bool | biasFor (const char *name) |
std::string | highOrderRec () |
Recognize using high order information. in particuler use prolog KB. |
Definition at line 60 of file SceneUnderstanding.H.
SceneUnderstanding::~SceneUnderstanding | ( | ) |
Destructor.
Definition at line 93 of file SceneUnderstanding.C.
bool SceneUnderstanding::biasFor | ( | const char * | name | ) |
Try to bias the feature maps to locate object Return true if we know about the object
Definition at line 221 of file SceneUnderstanding.C.
References ComplexChannel::accept(), Bayes::getClassId(), DescriptorVec::setInputImg(), and setSubmapAlgorithmBiased().
Referenced by highOrderRec().
int SceneUnderstanding::classifyFovea | ( | Point2D< int > | foveaLoc, | |
double * | prob = NULL | |||
) |
classify the object under the fovea positioned at p
Definition at line 200 of file SceneUnderstanding.C.
References Bayes::classify(), and getFV().
Referenced by highOrderRec().
float SceneUnderstanding::evolveBrain | ( | ) |
evolve the brain Return the intrest level
Definition at line 132 of file SceneUnderstanding.C.
References Point2D< T >::i, and Image< T >::initialized().
Referenced by highOrderRec().
Bayes * SceneUnderstanding::getBayesPtr | ( | ) |
Get the Bayes network.
Definition at line 105 of file SceneUnderstanding.C.
get the brain
Definition at line 99 of file SceneUnderstanding.C.
DescriptorVec * SceneUnderstanding::getDescriptorVecPtr | ( | ) |
get the descriptor vector
Definition at line 117 of file SceneUnderstanding.C.
Point2D< int > SceneUnderstanding::getFoveaLoc | ( | ) |
Get the current fovea location (attention location).
Definition at line 177 of file SceneUnderstanding.C.
std::vector< double > SceneUnderstanding::getFV | ( | Point2D< int > | foveaLoc | ) |
Get a feature vector from the fovea at location p.
Definition at line 183 of file SceneUnderstanding.C.
References DescriptorVec::buildRawDV(), DescriptorVec::getFoveaSize(), DescriptorVec::getFV(), and DescriptorVec::setFovea().
Referenced by classifyFovea(), and learn().
SWIProlog * SceneUnderstanding::getPrologPtr | ( | ) |
get the Prolog engine
Definition at line 111 of file SceneUnderstanding.C.
std::string SceneUnderstanding::highOrderRec | ( | ) |
Recognize using high order information. in particuler use prolog KB.
Definition at line 247 of file SceneUnderstanding.C.
References biasFor(), classifyFovea(), evolveBrain(), Bayes::getClassName(), DescriptorVec::getFoveaSize(), Dims::h(), and SWIProlog::query().
void SceneUnderstanding::learn | ( | Point2D< int > | foveaLoc, | |
const char * | name | |||
) |
Learn to associate the feature under fovea with object.
Definition at line 212 of file SceneUnderstanding.C.
References getFV(), and Bayes::learn().
Set the current image.
Definition at line 123 of file SceneUnderstanding.C.
References DescriptorVec::setInputImg().