# opentl::modalities::DataFusion Class Reference

Static data fusion class. It inherits from the modalities:Modality interface, so it can be flexibly combined with the features. ASSUMPTIONS:

- the children output levels of one DataFusion class instance must be of the same level E.g. if you want to fuse the output of two pixel level children and one feature level child you have to cascade two DataFusion classes. DF1 instance fuses pixel level to feature level and DF2 instance fuses the output of DF1 with the feature level child.

More...

Inherits opentl::modalities::Modality.

List of all members.

## Public Types
## Public Member Functions
virtual modalities::Modality * | clone () const
| Deep cloning.
| DataFusion (const DataFusion &c)
| Copy Constructor.
| DataFusion (opentl::modelprojection::Warp *warp, int camIdx, opentl::modelprojection::GLRenderer *GLRender=NULL)
| Copy Constructor.
const opentl::core::cvdata::Image & | getFusionImage ()
virtual void | init ()
| Initialize class (clean parameter status).
virtual int | matchFeatLevel (const TargetPtrVector &targets, T_MEAS_FEATPtrVector &outputMeas, std::size_t partitionIdx)
| Matching on feature level match projected model features with detected image features.
virtual int | matchObjLevel (const TargetPtrVector &targets, T_MEAS_OBJPtrVector &outputMeas, std::size_t partitionIdx)
| Matching on object level compute a local, maximum-likelihood estimate of pose (evtl. state), using either pixel- or feature-level likelihood functions.
virtual int | matchPixLevel (const TargetPtrVector &targets, T_MEAS_PIXPtrVector &outputMeas, std::size_t partitionIdx)
| Here "MATCH" = "FUSION"!
virtual int | sampleModelFeatures (const TargetPtrVector &targets)
| Sample model features for all children.
virtual int | updateModelFeatures (const TargetPtrVector &targets)
| Update online features for all children.
virtual | ~DataFusion ()
| Destructor.
## Protected Attributes
int | mCurrentPartitionIdx
| Current partition index for multi-threading.
TargetPtrVector | mTmpTarget
| Temporary state NOTE: this is needed by the static function "staticSimilarityEval" (for the simplex optimizer).

## Detailed Description

Static data fusion class. It inherits from the modalities:Modality interface, so it can be flexibly combined with the features. ASSUMPTIONS:

- the children output levels of one DataFusion class instance must be of the same level E.g. if you want to fuse the output of two pixel level children and one feature level child you have to cascade two DataFusion classes. DF1 instance fuses pixel level to feature level and DF2 instance fuses the output of DF1 with the feature level child.

## Member Enumeration Documentation

enum opentl::modalities::DataFusion::OfflineParameters

Enumerator:

  OFFLINE_COUNT |

Reimplemented from opentl::modalities::Modality.

enum opentl::modalities::DataFusion::OnlineParameters

Enumerator:

  fusionAlgo | Data fusion modality (scheme for static fusion, input/output levels for z).
  fusionAlgoPixelLevel_Weights | Weight vector<double> for pixel-level, weighted average fusion.
  fusionAlgoPixelLevel_matchPixUsingResidualImage | (bool) Compute residual image or just scalar residual
  fusionAlgoPixelLevel_matchPixelRInvVariance | (double) Inverse variance of the pixel-level residual
  fusionAlgoObjectUpgrade_Epsilon | Exit condition: minimum error for one delta step.
  fusionAlgoObjectUpgrade_CovRVector | vector containing the covariance output values TODO: use math::Vector
  fusionAlgoObjectUpgrade_UseFullCovarianceMatrix | Flag whether to use the full Covariance Matrix as output or only the diagonal (default).
  fusionAlgoObjectUpgrade_EnableMultiThreadingPerChildFeature | create a thread per feature matchxxxLevel() function call
  fusionAlgoObjectUpgrade_usePrior | Whether to use the prediction (prior) Gaussian to regularize Gauss-Newton optimization.
  fusionAlgoObjectUpgrade_GaussNewton_enableDampingFactor | flag to enable damping factor in case of a singular matrix
  fusionAlgoObjectUpgrade_GaussNewton_dampingFactorDeterminantMinThreshold | Whether to use the invert covariance in the Gauss-Newton algorithm NOTE: it makes sense only if the measurements have a variable covariance.
  fusionAlgoObjectUpgrade_GaussNewton_dampingFactorMax | maximum damping factor
  fusionAlgoObjectUpgrade_GaussNewton_MEstimator | M Estimator to use.
  fusionAlgoObjectUpgrade_GaussNewton_MEstimatorThresh | M Estimator threshold.
  ONLINE_COUNT |

Reimplemented from opentl::modalities::Modality.

enum opentl::modalities::DataFusion::T_FUSION_ALGO

Possible static fusion schemes.

Enumerator:

  PIXEL_WA |
  PIXEL_PRODUCT |
  PIXEL_VOTING |
  PIXEL_FUZZY |
  OBJECT_UPGRADE_GAUSS_NEWTON |

enum opentl::modalities::DataFusion::VotingMode

Possible voting schemes for pixel-level.

Enumerator:

  UNANIMITY |
  BYZANTINE |
  MAJORITY |
  MOUTN |

## Constructor & Destructor Documentation

opentl::modalities::DataFusion::DataFusion | ( | opentl::modelprojection::Warp * | warp,
|  | int | camIdx,
|  | opentl::modelprojection::GLRenderer * | GLRender = `NULL` |
| ) |  |  |

Copy Constructor.

opentl::modalities::DataFusion::DataFusion | ( | const DataFusion & | c | ) |

Copy Constructor.

virtual opentl::modalities::DataFusion::~DataFusion | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual modalities::Modality* opentl::modalities::DataFusion::clone | ( |  | ) | const`[virtual]`

Deep cloning.

Implements opentl::modalities::Modality.

const opentl::core::cvdata::Image& opentl::modalities::DataFusion::getFusionImage | ( |  | ) |

virtual void opentl::modalities::DataFusion::init | ( |  | ) | `[virtual]`

Initialize class (clean parameter status).

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::DataFusion::matchFeatLevel | ( | const TargetPtrVector & | targets,
|  | T_MEAS_FEATPtrVector & | outputMeas,
|  | std::size_t | partitionIdx |
| ) |  |  | `[virtual]`

Matching on feature level

- match projected model features with detected image features.

Parameters:

  | states | Predicted state
  | outputMeas | Feature-space measurements and residuals

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::DataFusion::matchObjLevel | ( | const TargetPtrVector & | targets,
|  | T_MEAS_OBJPtrVector & | outputMeas,
|  | std::size_t | partitionIdx |
| ) |  |  | `[virtual]`

Matching on object level

- compute a local, maximum-likelihood estimate of pose (evtl. state), using either pixel- or feature-level likelihood functions.

Parameters:

  | states | Predicted state
  | outputMeas | State-space measurement and residuals (expected state = prediction, observed state = ML estimate)

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::DataFusion::matchPixLevel | ( | const TargetPtrVector & | targets,
|  | T_MEAS_PIXPtrVector & | outputMeas,
|  | std::size_t | partitionIdx |
| ) |  |  | `[virtual]`

Here "MATCH" = "FUSION"!

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::DataFusion::sampleModelFeatures | ( | const TargetPtrVector & | targets | ) | `[virtual]`

Sample model features for all children.

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::DataFusion::updateModelFeatures | ( | const TargetPtrVector & | targets | ) | `[virtual]`

Update online features for all children.

Reimplemented from opentl::modalities::Modality.

## Member Data Documentation

int opentl::modalities::DataFusion::mCurrentPartitionIdx`[protected]`

Current partition index for multi-threading.

TargetPtrVector opentl::modalities::DataFusion::mTmpTarget`[protected]`

Temporary state NOTE: this is needed by the static function "staticSimilarityEval" (for the simplex optimizer).