Measure salience at human eye positions. More...
#include <Neuro/SimulationViewerHand.H>
Classes | |
struct | GHandFormat |
Public Member Functions | |
Constructors and destructors | |
SimulationViewerHand (OptionManager &mgr, const std::string &descrName="Hand Simulation Viewer", const std::string &tagName="SimulationViewerHand") | |
Constructor. See ModelComponent.H. | |
virtual | ~SimulationViewerHand () |
Destructor. | |
Protected Member Functions | |
SIMCALLBACK_DECLARE (SimulationViewerHand, SimEventClockTick) | |
Callback for every clock tick. | |
SIMCALLBACK_DECLARE (SimulationViewerHand, SimEventSaveOutput) | |
Callback for every time we should save our outputs. | |
void | save1 (const ModelComponentSaveInfo &sinfo) |
Save our various results. | |
virtual Image< PixRGB< byte > > | getTraj (SimEventQueue &q) |
Get the attention/eye/head trajectory image. | |
virtual void | start1 () |
get started | |
virtual void | stop1 () |
get stopped | |
virtual void | drawHand (const rutz::shared_ptr< HandData > data, const uint trackerNum) |
virtual void | extraSampleProcessing (const rutz::shared_ptr< HandData >) |
Protected Attributes | |
nub::ref< SpatialMetrics > | itsMetrics |
metrics that depend on input size | |
OModelParam< bool > | itsSaveTraj |
save trajectory? | |
OModelParam< bool > | itsSaveCombo |
save combo? | |
OModelParam< bool > | itsDisplayHand |
display Hand position | |
OModelParam< int > | itsPatchSize |
size of marker at eye position | |
OModelParam< bool > | itsEraseMarker |
erase marker at each frame | |
OModelParam< int > | itsMaxComboWidth |
max width of getTraj() | |
Image< PixRGB< byte > > | itsDrawings |
SimTime | itsCurrTime |
uint | itsFrameNumber |
bool | itsHeaderCrafted |
std::vector< std::string > | itsOutFields |
std::vector< GHandFormat > | itsHandStyles |
Measure salience at human eye positions.
Definition at line 60 of file SimulationViewerHand.H.
SimulationViewerHand::SimulationViewerHand | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Hand Simulation Viewer" , |
|||
const std::string & | tagName = "SimulationViewerHand" | |||
) |
Constructor. See ModelComponent.H.
Definition at line 76 of file SimulationViewerHand.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), itsMetrics, and OptionManager::setOptionValString().
SimulationViewerHand::~SimulationViewerHand | ( | ) | [virtual] |
Destructor.
Definition at line 101 of file SimulationViewerHand.C.
void SimulationViewerHand::drawHand | ( | const rutz::shared_ptr< HandData > | data, | |
const uint | trackerNum | |||
) | [protected, virtual] |
Assuming grid [1,1]'s coord is (8,8) --> [ 0, 0] is ( 0, 0) --> [80,60] is (640,480) We only want the X to be in between grid [2,59] to [79,59] and Y in [1,1] to [1,58]. We set those instead of [1,59] to prevent collision incase both meet eachother (rawX=0/255, rawY=0/255) |----------------|-------[]------| X1 XC X_ X2
Definition at line 186 of file SimulationViewerHand.C.
References drawPatchBB(), SimpleFont::FIXED(), Image< T >::getDims(), Dims::h(), Point2D< T >::i, sformat(), Dims::w(), and writeText().
Image< PixRGB< byte > > SimulationViewerHand::getTraj | ( | SimEventQueue & | q | ) | [protected, virtual] |
Get the attention/eye/head trajectory image.
Definition at line 286 of file SimulationViewerHand.C.
References SimEventQueue::check(), composite(), concatX(), decX(), decY(), Image< T >::getDims(), OModelParam< T >::getVal(), Image< T >::getWidth(), Dims::h(), itsMaxComboWidth, itsSaveCombo, itsSaveTraj, lowPass3x(), lowPass3y(), SEQ_ANY, and Dims::w().
Referenced by save1().
void SimulationViewerHand::save1 | ( | const ModelComponentSaveInfo & | sinfo | ) | [protected, virtual] |
Save our various results.
Reimplemented from ModelComponent.
Definition at line 332 of file SimulationViewerHand.C.
References getTraj(), OModelParam< T >::getVal(), itsSaveCombo, itsSaveTraj, and SRC_POS.
SimulationViewerHand::SIMCALLBACK_DECLARE | ( | SimulationViewerHand | , | |
SimEventSaveOutput | ||||
) | [protected] |
Callback for every time we should save our outputs.
SimulationViewerHand::SIMCALLBACK_DECLARE | ( | SimulationViewerHand | , | |
SimEventClockTick | ||||
) | [protected] |
Callback for every clock tick.
void SimulationViewerHand::start1 | ( | ) | [protected, virtual] |
void SimulationViewerHand::stop1 | ( | ) | [protected, virtual] |
get stopped
Reimplemented from ModelComponent.
Definition at line 115 of file SimulationViewerHand.C.
OModelParam<bool> SimulationViewerHand::itsDisplayHand [protected] |
display Hand position
Definition at line 95 of file SimulationViewerHand.H.
OModelParam<bool> SimulationViewerHand::itsEraseMarker [protected] |
erase marker at each frame
Definition at line 97 of file SimulationViewerHand.H.
OModelParam<int> SimulationViewerHand::itsMaxComboWidth [protected] |
max width of getTraj()
Definition at line 98 of file SimulationViewerHand.H.
Referenced by getTraj().
nub::ref<SpatialMetrics> SimulationViewerHand::itsMetrics [protected] |
metrics that depend on input size
Definition at line 91 of file SimulationViewerHand.H.
Referenced by SimulationViewerHand().
OModelParam<int> SimulationViewerHand::itsPatchSize [protected] |
size of marker at eye position
Definition at line 96 of file SimulationViewerHand.H.
OModelParam<bool> SimulationViewerHand::itsSaveCombo [protected] |
save combo?
Definition at line 94 of file SimulationViewerHand.H.
OModelParam<bool> SimulationViewerHand::itsSaveTraj [protected] |
save trajectory?
Definition at line 93 of file SimulationViewerHand.H.