# opentl::modalities::ContourCCD Class Reference

Inherits opentl::modalities::Modality.

List of all members.

## Public Types
## Public Member Functions
virtual modalities::Modality * | clone () const
| Clone this class and all potential childs RECURSIVELY!! (deep copy).
| ContourCCD (const ContourCCD &c)
| Deep Copy Constructor.
| ContourCCD (const ObjModelPtrVector &objModels, opentl::modelprojection::Warp *warp, opentl::modelprojection::GLScene *scene, int camIdx, modelprojection::ContourSampler *contourSampler=NULL)
void | drawSamplePoints (opentl::core::cvdata::Image &img, CvScalar color, int targetIdx)
int | getCamIdx ()
| returns the camera index of this class instance
opentl::core::cvdata::VisContourSamplePts * | getContourData (int s=0)
virtual void | init ()
| Initialize CCD: create (if necessary) the contour sampler.
virtual int | matchFeatLevel (const TargetPtrVector &targets, T_MEAS_FEATPtrVector &outputMeas, std::size_t partitionIdx)
| Feature-level matching for the CCD modality. It basically computes local color statistics (=features) along the visible edges on both sides. The output measurement are the color residuals, and their Jacobian w.r.t. pose parameters.
virtual int | matchObjLevel (const TargetPtrVector &targets, T_MEAS_OBJPtrVector &outputMeas, std::size_t partitionIdx)
| (Object-level is not available in CCD, in order to avoid code duplication -> use DataFusion upgrade instead).
virtual int | preProcess (const opentl::core::cvdata::Image &image, const std::vector< std::vector< int > > &preProcessROIs)
| Do nothing (in CCD there is no pre-processing, and D=I).
virtual int | sampleModelFeatures (const TargetPtrVector &targets)
| Call the GPU-based visible edge sampler.
virtual | ~ContourCCD ()
| Destructor.

## Member Enumeration Documentation

enum opentl::modalities::ContourCCD::OfflineParameters

Enumerator:

  generate_contourSampler | (bool) If true, create the contour sampler algorithm internally; else, use a pre-defined one (contourSampler)
  contour_maxSamplePointsPerTarget | (int) Subsampling for the GPU contour sampling code
  CCD_DOF | (int) Number of degrees of freedom
  CCD_KMIN | (int) Minimum number of contour sample positions
  CCD_KMAX | (int) Maximum number of contour sample positions
  CCD_L | (int) Number of samples along the normal
  OFFLINE_COUNT |

Reimplemented from opentl::modalities::Modality.

enum opentl::modalities::ContourCCD::OnlineParameters

Enumerator:

  space_blur | (double) Space blur: this is the extent of mixing for local color statistics along contour positions in space (exponential filtering)
  max_dist | (std::vector(double)) Search distance (h) at iteration 0, for each link
  dist_upd | (std::vector(double)) Update coefficient of distance (h) from step to step (exponential decay), for each link
  ONLINE_COUNT |

Reimplemented from opentl::modalities::Modality.

## Constructor & Destructor Documentation

opentl::modalities::ContourCCD::ContourCCD | ( | const ObjModelPtrVector & | objModels,
|  | opentl::modelprojection::Warp * | warp,
|  | opentl::modelprojection::GLScene * | scene,
|  | int | camIdx,
|  | modelprojection::ContourSampler * | contourSampler = `NULL` |
| ) |  |  |

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

Deep Copy Constructor.

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

Destructor.

## Member Function Documentation

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

Clone this class and all potential childs RECURSIVELY!! (deep copy).

Implements opentl::modalities::Modality.

void opentl::modalities::ContourCCD::drawSamplePoints | ( | opentl::core::cvdata::Image & | img,
|  | CvScalar | color,
|  | int | targetIdx |
| ) |  |  |

int opentl::modalities::ContourCCD::getCamIdx | ( |  | ) | `[inline]`

returns the camera index of this class instance

Reimplemented from opentl::modalities::Modality.

opentl::core::cvdata::VisContourSamplePts* opentl::modalities::ContourCCD::getContourData | ( | int | s = `0` | ) | `[inline]`

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

Initialize CCD: create (if necessary) the contour sampler.

Reimplemented from opentl::modalities::Modality.

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

Feature-level matching for the CCD modality. It basically computes local color statistics (=features) along the visible edges on both sides. The output measurement are the color residuals, and their Jacobian w.r.t. pose parameters.

Reimplemented from opentl::modalities::Modality.

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

(Object-level is not available in CCD, in order to avoid code duplication -> use DataFusion upgrade instead).

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::ContourCCD::preProcess | ( | const opentl::core::cvdata::Image & | image,
|  | const std::vector< std::vector< int > > & | preProcessROIs |
| ) |  |  | `[virtual]`

Do nothing (in CCD there is no pre-processing, and D=I).

Parameters:

  | image | Input sensor data (e.g. camera image in RGB)
  | preProcessROIs | Regions of interest (x0,y0,width,height), per target

Reimplemented from opentl::modalities::Modality.

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

Call the GPU-based visible edge sampler.

Reimplemented from opentl::modalities::Modality.