# opentl::core::cvdata::T_MEAS_FEAT Class Reference

Structure holding a single feature-level measurement. A single measurement is related to: 1 target, 1 modality, 1 camera, 1 thread. More...

List of all members.

## Public Types
## Public Member Functions
std::size_t | getFeatElementDim () const
| Get size/length of a single feature element.
std::size_t | getJacSize () const
| Get the column-size of Jacobian matrices.
T_MEAS_FEAT_TYPE | getMeasType () const
| Return type of measurement.
std::size_t | getNMaxAssoc () const
| Get number of maximum association hypotheses (per feature).
std::size_t | getNMaxMeas () const
| Get number of allocated features.
std::size_t | getNMeas () const
| Get number of available features.
void | resizeAll (T_MEAS_FEAT_TYPE measType, std::size_t nMaxMeas_, std::size_t featElementDim_, std::size_t jacSize_=0, std::size_t nMaxAssoc_=1)
| Resizes all vectors within structure and sets internal variables accordingly.
void | setNMeas (std::size_t nMeas_)
| Set number of available features (it must be less or equal than the number of allocated features).
| T_MEAS_FEAT (std::size_t nMaxMeas_=1, std::size_t featElementDim_=0, std::size_t jacSize_=0, std::size_t nMaxAssoc_=1, double alpha_=0.0, T_MEAS_FEAT_TYPE measType=VECTOR_RES_SINGLE_HYPO)
| Constructor.
## Public Attributes
double | alpha
| Probability of missing detection (0 associated measurements) for each feature.
std::vector< std::vector < double > > | E_mHypo
| E_mHypo = vector of measurement residuals (or innovations) associated to each pair (h,z), with possibly multiple hypotheses NOTE: The actual number of valid residuals is given by the respective entry in nAssociations (0 = missing detection). Dimensions: outer (1st) [0,nMeas*featElemDim]: local feature index inner (2nd) [0,nAssociations[f]]: association hypotheses (NOTE: the actual number may be less than nMaxAssoc).
std::vector< double > | E_sHypo
| E_sHypo = vector of image residuals associated to each h, with either 0 or 1 association hypothesis. NOTE: The respective entry in nAssociations decides for the validity of this measurement (0 = missing detection). Dimensions: outer (1st) [0,nMeas*featElemDim]: encodes the set of data in a single vector (in case of missing detection, the respective data are invalid).
std::vector< double > | h
| h = vector of expected image features (obtained for example by re-projection from object space). Dimensions: outer (1st) [0,nMeas*featElemDim]: local feature index
std::vector< double > | invCov
| invCov = inverse of measurement covariances, for each feature. ATTENTION: invCov encodes a sequence of (nMeas) square matrices, each one of size (featElementDim * featElementDim), into a single vector. Therefore, the total dimension of invCov is (nMeas*featElementDim*featElementDim).
std::vector< int > | nAssociations
| nAssociations = vector of integers, giving the actual number of associated hypotheses per feature, between [0,nMaxAssoc].
std::vector< std::vector < double > > | transpJac
| transpJac = transposed Jacobians of h. See the jacSize parameter in resizeAll(). Dimensions: outer (1st) [0,jacSize]: state variable index inner (2nd) [0,nMeas*featElemDim]: local feature index (in case of missing detection, data in this vector are invalid).
std::vector< std::vector < double > > | z_mHypo
| z_mHypo = vector of image features associated to each h, with possibly multiple hypotheses NOTE: The actual number of valid associations is given by the respective entry in nAssociations (0 = missing detection). Dimensions: outer (1st) [0,nMeas*featElemDim]: local feature index inner (2nd) [0,nAssociations[f]]: association hypotheses (NOTE: the actual number may be less than nMaxAssoc).
std::vector< double > | z_sHypo
| z_sHypo = vector of image features associated to each h, with either 0 or 1 association hypothesis. NOTE: The respective entry in nAssociations decides for the validity of this measurement (0 = missing detection). Dimensions: outer (1st) [0,nMeas*featElemDim]: encodes the set of data in a single vector (in case of missing detection, the respective data are invalid).

## Detailed Description

Structure holding a single feature-level measurement. A single measurement is related to: 1 target, 1 modality, 1 camera, 1 thread.

## Member Enumeration Documentation

enum opentl::core::cvdata::T_MEAS_FEAT::T_MEAS_FEAT_TYPE

Possible measurement data types.

Enumerator:

  SCALAR_RES_SINGLE_HYPO | A unique, scalar residual for the whole measurement (but possibly vector-valued z,h) with a single association hypothesis.
  VECTOR_RES_SINGLE_HYPO | Vector residuals (one vector per feature, like z-h), with a single association hypothesis (default).
  VECTOR_RES_MULTI_HYPO | Vector residuals (one vector per feature, like z-h), with possibly multiple association hypotheses.

## Constructor & Destructor Documentation

opentl::core::cvdata::T_MEAS_FEAT::T_MEAS_FEAT | ( | std::size_t | nMaxMeas_ = `1`,
|  | std::size_t | featElementDim_ = `0`,
|  | std::size_t | jacSize_ = `0`,
|  | std::size_t | nMaxAssoc_ = `1`,
|  | double | alpha_ = `0.0`,
|  | T_MEAS_FEAT_TYPE | measType = `VECTOR_RES_SINGLE_HYPO` |
| ) |  |  | `[inline]`

Constructor.

Parameters:

  | nMaxMeas_ | Maximum number of features (in order to pre-allocate memory). The actual number of stored measurements is given by nMeas.
  | nMaxAssoc_ | Maximum number of association hypotheses (in case of multiple hypotheses, in order to pre-allocate the vectors).
  | featElementDim_ | Length of one feature element.
  | jacSize_ | Column-size of the Jacobian matrix (usually the state, or pose dimension). The row-size is featElementDim.
  | alpha_ | Probability of missing detection (default = 0).
  | measType | Type of measurement: scalar or vector residual, with single or multiple association hypotheses.

## Member Function Documentation

std::size_t opentl::core::cvdata::T_MEAS_FEAT::getFeatElementDim | ( |  | ) | const`[inline]`

Get size/length of a single feature element.

std::size_t opentl::core::cvdata::T_MEAS_FEAT::getJacSize | ( |  | ) | const`[inline]`

Get the column-size of Jacobian matrices.

T_MEAS_FEAT_TYPE opentl::core::cvdata::T_MEAS_FEAT::getMeasType | ( |  | ) | const`[inline]`

Return type of measurement.

std::size_t opentl::core::cvdata::T_MEAS_FEAT::getNMaxAssoc | ( |  | ) | const`[inline]`

Get number of maximum association hypotheses (per feature).

std::size_t opentl::core::cvdata::T_MEAS_FEAT::getNMaxMeas | ( |  | ) | const`[inline]`

Get number of allocated features.

std::size_t opentl::core::cvdata::T_MEAS_FEAT::getNMeas | ( |  | ) | const`[inline]`

Get number of available features.

void opentl::core::cvdata::T_MEAS_FEAT::resizeAll | ( | T_MEAS_FEAT_TYPE | measType,
|  | std::size_t | nMaxMeas_,
|  | std::size_t | featElementDim_,
|  | std::size_t | jacSize_ = `0`,
|  | std::size_t | nMaxAssoc_ = `1` |
| ) |  |  | `[inline]`

Resizes all vectors within structure and sets internal variables accordingly.

Parameters:

  | measType | Type of measurement: scalar or vector residual, with single or multiple association hypotheses.
  | nMaxMeas_ | Maximum number of features (in order to pre-allocate memory). The actual number of stored measurements is given by nMeas.
  | featElementDim_ | Length of one feature element (in case of vector data).
  | jacSize_ | Column-size of the Jacobian matrix (usually the state, or pose dimension). The row-size is featElementDim.
  | nMaxAssoc_ | Maximum number of association hypotheses (in case of multiple hypotheses, in order to pre-allocate the vectors).

void opentl::core::cvdata::T_MEAS_FEAT::setNMeas | ( | std::size_t | nMeas_ | ) | `[inline]`

Set number of available features (it must be less or equal than the number of allocated features).

## Member Data Documentation

double opentl::core::cvdata::T_MEAS_FEAT::alpha

Probability of missing detection (0 associated measurements) for each feature.

std::vector<std::vector<double> > opentl::core::cvdata::T_MEAS_FEAT::E_mHypo

E_mHypo = vector of measurement residuals (or innovations) associated to each pair (h,z), with possibly multiple hypotheses NOTE: The actual number of valid residuals is given by the respective entry in nAssociations (0 = missing detection). Dimensions:

- outer (1st) [0,nMeas*featElemDim]: local feature index
- inner (2nd) [0,nAssociations[f]]: association hypotheses (NOTE: the actual number may be less than nMaxAssoc).

std::vector<double> opentl::core::cvdata::T_MEAS_FEAT::E_sHypo

E_sHypo = vector of image residuals associated to each h, with either 0 or 1 association hypothesis. NOTE: The respective entry in nAssociations decides for the validity of this measurement (0 = missing detection). Dimensions:

- outer (1st) [0,nMeas*featElemDim]: encodes the set of data in a single vector (in case of missing detection, the respective data are invalid).

std::vector<double> opentl::core::cvdata::T_MEAS_FEAT::h

h = vector of expected image features (obtained for example by re-projection from object space). Dimensions:

- outer (1st) [0,nMeas*featElemDim]: local feature index

std::vector<double> opentl::core::cvdata::T_MEAS_FEAT::invCov

invCov = inverse of measurement covariances, for each feature. ATTENTION: invCov encodes a sequence of (nMeas) square matrices, each one of size (featElementDim * featElementDim), into a single vector. Therefore, the total dimension of invCov is (nMeas*featElementDim*featElementDim).

std::vector<int> opentl::core::cvdata::T_MEAS_FEAT::nAssociations

nAssociations = vector of integers, giving the actual number of associated hypotheses per feature, between [0,nMaxAssoc].

std::vector<std::vector<double> > opentl::core::cvdata::T_MEAS_FEAT::transpJac

transpJac = transposed Jacobians of h. See the jacSize parameter in resizeAll(). Dimensions:

- outer (1st) [0,jacSize]: state variable index
- inner (2nd) [0,nMeas*featElemDim]: local feature index (in case of missing detection, data in this vector are invalid).

Example: if the state dimension is 6, and you have 100 features, each one with a descriptor of dimension 3, J is (300 x 6) and transpJac will be (6 x 300).

std::vector<std::vector<double> > opentl::core::cvdata::T_MEAS_FEAT::z_mHypo

z_mHypo = vector of image features associated to each h, with possibly multiple hypotheses NOTE: The actual number of valid associations is given by the respective entry in nAssociations (0 = missing detection). Dimensions:

- outer (1st) [0,nMeas*featElemDim]: local feature index
- inner (2nd) [0,nAssociations[f]]: association hypotheses (NOTE: the actual number may be less than nMaxAssoc).

std::vector<double> opentl::core::cvdata::T_MEAS_FEAT::z_sHypo

z_sHypo = vector of image features associated to each h, with either 0 or 1 association hypothesis. NOTE: The respective entry in nAssociations decides for the validity of this measurement (0 = missing detection). Dimensions:

- outer (1st) [0,nMeas*featElemDim]: encodes the set of data in a single vector (in case of missing detection, the respective data are invalid).