this class is a complete Beobot More...
#include <Beobot/Beobot.H>
Public Member Functions | |
Beobot (const char *slaves, const int imgw, const int imgh, const int lev_min, const int lev_max, const int delta_min, const int delta_max, const int smlev, const int nborient, const MaxNormType normtype, const int jlev, const int jdepth, const int nbneig, const in_addr_t ip, const short int port) | |
Constructor. | |
void | newVisualInput (Image< PixRGB< byte > > &scene) |
set new scene from an existing image | |
Image< PixRGB< byte > > * | getRetinaPtr () |
get pointer to internal retina, for example to directly framegrab it | |
void | lowLevel (const int frame) |
low level pyramid business | |
void | lowLevelStart (const int frame) |
start low-level by sending off current frame | |
void | lowLevelEnd (const int frame) |
receive results from slave for given frame | |
void | getWinner (Point2D< int > &win) const |
get most salient location: | |
void | intermediateLevel (bool takeYourTime=false) |
compute the new "sensation" and update "memory" | |
void | highLevel (void) |
compute the new "action" and update "memory" | |
void | decision (void) |
take a decision | |
void | action (void) |
just do it | |
void | DEBUGgetClustered (Image< PixRGB< byte > > &im) |
returns the current clustered layout | |
void | DEBUGgetCurrentAction (BeobotAction &a) |
returns the current action | |
void | DEBUGsetCurrentAction (BeobotAction &a) |
set the current action |
this class is a complete Beobot
i.e. Visual Cortex, Memory, Sensors and Effectors
Definition at line 50 of file Beobot.H.
Beobot::Beobot | ( | const char * | slaves, | |
const int | imgw, | |||
const int | imgh, | |||
const int | lev_min, | |||
const int | lev_max, | |||
const int | delta_min, | |||
const int | delta_max, | |||
const int | smlev, | |||
const int | nborient, | |||
const MaxNormType | normtype, | |||
const int | jlev, | |||
const int | jdepth, | |||
const int | nbneig, | |||
const in_addr_t | ip, | |||
const short int | port | |||
) |
Constructor.
use NULL for slaves to use the single-CPU version
Definition at line 41 of file Beobot.C.
References BeobotVisualCortex::init().
void Beobot::action | ( | void | ) |
returns the current clustered layout
Definition at line 147 of file Beobot.C.
References BeobotSensation::getQuickLayout(), and BeobotMemory::passedSensation().
void Beobot::DEBUGgetCurrentAction | ( | BeobotAction & | a | ) | [inline] |
void Beobot::DEBUGsetCurrentAction | ( | BeobotAction & | a | ) | [inline] |
void Beobot::decision | ( | void | ) |
take a decision
based of the recommendation issued by highLevel() and passed sensations and actions
Definition at line 202 of file Beobot.C.
References BeobotMemory::generatePresentAction().
get pointer to internal retina, for example to directly framegrab it
Definition at line 70 of file Beobot.C.
References BeobotVisualCortex::getScenePtr().
Referenced by main().
void Beobot::getWinner | ( | Point2D< int > & | win | ) | const |
get most salient location:
Definition at line 86 of file Beobot.C.
References BeobotVisualCortex::getWinner().
void Beobot::highLevel | ( | void | ) |
compute the new "action" and update "memory"
-- higher level reasoning
Definition at line 156 of file Beobot.C.
References action(), centroid(), BeobotSensation::getCentroid(), BeobotSensation::getQuickLayout(), Image< T >::getWidth(), Point2D< T >::i, BeobotMemory::passedSensation(), BeobotMemory::presentActionRecommendation(), BeobotAction::setGear(), BeobotAction::setSpeed(), and BeobotAction::setTurn().
void Beobot::intermediateLevel | ( | bool | takeYourTime = false |
) |
compute the new "sensation" and update "memory"
( given a new scene i.e. after see() and someday the state of the sensors ) -- high level vision but still low level cognitive processing takeYourTime is set to 'true' for the first frame which is necessary for convergence - see implementation
Definition at line 90 of file Beobot.C.
References BeobotSensation::getCentroid(), BeobotVisualCortex::getClusteredImage(), BeobotVisualCortex::getInputSize(), Point2D< T >::i, BeobotVisualCortex::initSprings(), BeobotVisualCortex::iterateSprings(), BeobotMemory::passedSensation(), and BeobotMemory::presentSensation().
void Beobot::lowLevel | ( | const int | frame | ) |
low level pyramid business
When using parallel processing, this method will send off the current frame and wait until all results have come back. For better performance, use lowLevelStart() and lowLevelEnd() instead.
Definition at line 74 of file Beobot.C.
References BeobotVisualCortex::process().
Referenced by main().
void Beobot::lowLevelEnd | ( | const int | frame | ) |
receive results from slave for given frame
Definition at line 82 of file Beobot.C.
References BeobotVisualCortex::processEnd().
Referenced by main().
void Beobot::lowLevelStart | ( | const int | frame | ) |
start low-level by sending off current frame
Definition at line 78 of file Beobot.C.
References BeobotVisualCortex::processStart().
Referenced by main().
set new scene from an existing image
Definition at line 66 of file Beobot.C.
References BeobotVisualCortex::newVisualInput().