Public Member Functions | |
virtual int | acquireId () |
Acquire a new target id for this target instance. The id will be stored in the current target instance. | |
boost::shared_ptr < opentl::core::State > | activeState (std::size_t uPartition) const |
Get single state of the active states vector. | |
std::size_t | activeStateIdx (std::size_t uPartition) const |
Get index of single active state. | |
double | activeWeight (std::size_t uPartition) const |
Get weight of single state. | |
std::vector< double > & | activeWeightVec () |
Get weight vector. | |
Target * | clone () const |
Create new instance of this class. | |
void | getGlobalROI (int camIdx, std::vector< int > &globalROI) const |
Get the region of interest (bounding box of all state hypotheses). | |
int | getTargetId () const |
Get the unique ID of this target. | |
std::size_t | nActiveStatePartitions () const |
Get number of partitions. | |
const std::string & | name () const |
std::size_t | nofStates () const |
Get number of states in the distribution. | |
void | normalizeWeights () |
Normalize weight vector (sum to 1.0). | |
const boost::shared_ptr < opentl::models::ObjModel > | objModel () const |
Get object model of this target. | |
Target & | operator= (const Target &target) |
Assignment operator: copy internal states and weights from another target (but NOT the ID!). | |
boost::shared_ptr < opentl::core::State > | outputState () const |
Get output state (average). | |
virtual void | releaseId () |
Release a target id (should be called before the _real_ target (not the hypotheses of this target) are destroyed! | |
void | resizeActivePartitions (std::size_t nPartitions) |
resizes the number of partitions of the active states and the ActiveWeights vectors | |
void | resizeStateAuxVec (int size) |
Resize state distribution auxiliary vector. | |
void | resizeStateVec (int size) |
Resize state distribution vector. | |
void | setActiveStateIdx (std::size_t uPartition, std::size_t stateIdx) |
Set single state of the internal active State. | |
void | setActiveWeight (std::size_t uPartition, double weight) |
set weight of single state in active state set | |
void | setGlobalROI (int camIdx, std::vector< int > &globalROI) |
Set the region of interest (bounding box of all state hypotheses), pre-computed outside by the Warp class. | |
void | setName (const std::string &newName) |
void | setOutputState (opentl::core::State &state) |
Set single state of the internal distribution. | |
void | setState (opentl::core::State &state, std::size_t i) |
Set single state of the internal distribution. | |
void | setStateAux (opentl::core::State &state, std::size_t i) |
Set single state of the internal auxiliary distribution. | |
void | setStateCov (const math::SquareMatrix &cov) |
Set internal state covariance. | |
void | setTargetId (int id) |
Set the unique ID of this target. | |
void | setWeight (std::size_t i, double weight) |
set weight of single state | |
boost::shared_ptr < opentl::core::State > | state (std::size_t i) const |
Get single state of the internal distribution. | |
boost::shared_ptr < opentl::core::State > | stateAux (std::size_t i) const |
Get single state of the internal auxiliary distribution. | |
std::vector< boost::shared_ptr < opentl::core::State > > * | stateAuxVec () const |
Get internal state auxiliary distribution. | |
math::SquareMatrix * | stateCov () const |
Get internal state covariance. | |
std::vector< boost::shared_ptr < opentl::core::State > > * | stateVec () const |
Get internal state distribution. | |
void | swapStateAndAuxVec () |
Swap the internal vectors mStates and mStatesAux. | |
Target (const Target &target) | |
Copy constructor. Initialize object with existing target object. | |
Target (const boost::shared_ptr< opentl::models::ObjModel > objModel, int nStates=1) | |
Constructor. | |
double | weight (std::size_t i) const |
Get weight of single state. | |
std::vector< double > & | weightVec () |
Get weight vector. | |
virtual | ~Target () |
Destructor. | |
Static Public Member Functions | |
static std::size_t | freeIdCount () |
Get number of remaining free ids. | |
static std::size_t | maxNoTargets () |
get maximum number of target ids | |
static std::size_t | noTargets () |
get total number of currently active target ids |
opentl::models::Target::Target | ( | const boost::shared_ptr< opentl::models::ObjModel > | objModel, | |
int | nStates = 1 | |||
) |
Constructor.
objModel | Object model related to this target (includes all information. and the State type) | |
stateTemplate | Template for building the state vector inside | |
nStates | (optional) Number of states of the distribution vector |
opentl::models::Target::Target | ( | const Target & | target | ) |
Copy constructor. Initialize object with existing target object.
virtual opentl::models::Target::~Target | ( | ) | [virtual] |
Destructor.
virtual int opentl::models::Target::acquireId | ( | ) | [virtual] |
Acquire a new target id for this target instance. The id will be stored in the current target instance.
boost::shared_ptr<opentl::core::State> opentl::models::Target::activeState | ( | std::size_t | uPartition | ) | const [inline] |
Get single state of the active states vector.
uPartition | position index |
std::size_t opentl::models::Target::activeStateIdx | ( | std::size_t | uPartition | ) | const [inline] |
Get index of single active state.
uPartition | position index |
double opentl::models::Target::activeWeight | ( | std::size_t | uPartition | ) | const [inline] |
Get weight of single state.
uPartition | partition index for active states |
std::vector<double>& opentl::models::Target::activeWeightVec | ( | ) | [inline] |
Get weight vector.
Target* opentl::models::Target::clone | ( | ) | const [inline] |
Create new instance of this class.
static std::size_t opentl::models::Target::freeIdCount | ( | ) | [static] |
Get number of remaining free ids.
void opentl::models::Target::getGlobalROI | ( | int | camIdx, | |
std::vector< int > & | globalROI | |||
) | const |
Get the region of interest (bounding box of all state hypotheses).
camIdx | Camera index | |
globalROI | Region of interest (x,y,width,height) |
int opentl::models::Target::getTargetId | ( | ) | const [inline] |
static std::size_t opentl::models::Target::maxNoTargets | ( | ) | [static] |
get maximum number of target ids
std::size_t opentl::models::Target::nActiveStatePartitions | ( | ) | const [inline] |
Get number of partitions.
const std::string& opentl::models::Target::name | ( | ) | const [inline] |
std::size_t opentl::models::Target::nofStates | ( | ) | const [inline] |
Get number of states in the distribution.
void opentl::models::Target::normalizeWeights | ( | ) |
Normalize weight vector (sum to 1.0).
static std::size_t opentl::models::Target::noTargets | ( | ) | [static] |
get total number of currently active target ids
const boost::shared_ptr<opentl::models::ObjModel> opentl::models::Target::objModel | ( | ) | const [inline] |
Assignment operator: copy internal states and weights from another target (but NOT the ID!).
boost::shared_ptr<opentl::core::State> opentl::models::Target::outputState | ( | ) | const [inline] |
virtual void opentl::models::Target::releaseId | ( | ) | [virtual] |
Release a target id (should be called before the _real_ target (not the hypotheses of this target) are destroyed!
void opentl::models::Target::resizeActivePartitions | ( | std::size_t | nPartitions | ) | [inline] |
resizes the number of partitions of the active states and the ActiveWeights vectors
nPartitions | partitions count |
void opentl::models::Target::resizeStateAuxVec | ( | int | size | ) |
Resize state distribution auxiliary vector.
size | new size of the vector |
void opentl::models::Target::resizeStateVec | ( | int | size | ) |
Resize state distribution vector.
size | new size of the vector |
void opentl::models::Target::setActiveStateIdx | ( | std::size_t | uPartition, | |
std::size_t | stateIdx | |||
) | [inline] |
Set single state of the internal active State.
uPartition | set the value to state with index uPartition. | |
stateIdx | New state index. |
void opentl::models::Target::setActiveWeight | ( | std::size_t | uPartition, | |
double | weight | |||
) | [inline] |
set weight of single state in active state set
uPartition | partition index | |
weight | value. |
void opentl::models::Target::setGlobalROI | ( | int | camIdx, | |
std::vector< int > & | globalROI | |||
) |
Set the region of interest (bounding box of all state hypotheses), pre-computed outside by the Warp class.
camIdx | Camera index | |
globalROI | Region of interest (x,y,width,height) |
void opentl::models::Target::setName | ( | const std::string & | newName | ) | [inline] |
void opentl::models::Target::setOutputState | ( | opentl::core::State & | state | ) | [inline] |
Set single state of the internal distribution.
state | New state value. | |
i | set the value to state with index i. |
void opentl::models::Target::setState | ( | opentl::core::State & | state, | |
std::size_t | i | |||
) | [inline] |
Set single state of the internal distribution.
state | New state value. | |
i | set the value to state with index i. |
void opentl::models::Target::setStateAux | ( | opentl::core::State & | state, | |
std::size_t | i | |||
) | [inline] |
Set single state of the internal auxiliary distribution.
state | New state value. | |
i | set the value to state with index i. |
void opentl::models::Target::setStateCov | ( | const math::SquareMatrix & | cov | ) | [inline] |
Set internal state covariance.
cov | New covariance value. |
void opentl::models::Target::setTargetId | ( | int | id | ) | [inline] |
void opentl::models::Target::setWeight | ( | std::size_t | i, | |
double | weight | |||
) | [inline] |
set weight of single state
i | Index inside the vector | |
weight | value. |
boost::shared_ptr<opentl::core::State> opentl::models::Target::state | ( | std::size_t | i | ) | const [inline] |
Get single state of the internal distribution.
i | position index |
boost::shared_ptr<opentl::core::State> opentl::models::Target::stateAux | ( | std::size_t | i | ) | const [inline] |
Get single state of the internal auxiliary distribution.
i | position index |
std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::stateAuxVec | ( | ) | const [inline] |
Get internal state auxiliary distribution.
math::SquareMatrix* opentl::models::Target::stateCov | ( | ) | const [inline] |
Get internal state covariance.
std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::stateVec | ( | ) | const [inline] |
Get internal state distribution.
void opentl::models::Target::swapStateAndAuxVec | ( | ) | [inline] |
Swap the internal vectors mStates and mStatesAux.
double opentl::models::Target::weight | ( | std::size_t | i | ) | const [inline] |
Get weight of single state.
std::vector<double>& opentl::models::Target::weightVec | ( | ) | [inline] |
Get weight vector.