pub trait ShapeTransformer: AlgorithmTrait + ShapeTransformerConst {
    fn as_raw_mut_ShapeTransformer(&mut self) -> *mut c_void;

    fn estimate_transformation(
        &mut self,
        transforming_shape: &dyn ToInputArray,
        target_shape: &dyn ToInputArray,
        matches: &mut Vector<DMatch>
    ) -> Result<()> { ... } fn apply_transformation(
        &mut self,
        input: &dyn ToInputArray,
        output: &mut dyn ToOutputArray
    ) -> Result<f32> { ... } }

Required Methods

Provided Methods

Estimate the transformation parameters of the current transformer algorithm, based on point matches.

Parameters
  • transformingShape: Contour defining first shape.
  • targetShape: Contour defining second shape (Target).
  • matches: Standard vector of Matches between points.

Apply a transformation, given a pre-estimated transformation parameters.

Parameters
  • input: Contour (set of points) to apply the transformation.
  • output: Output contour.
C++ default parameters
  • output: noArray()

Implementors