pub trait ShapeTransformerTrait: AlgorithmTrait + ShapeTransformerTraitConst {
// Required method
fn as_raw_mut_ShapeTransformer(&mut self) -> *mut c_void;
// Provided methods
fn estimate_transformation(
&mut self,
transforming_shape: &impl ToInputArray,
target_shape: &impl ToInputArray,
matches: &mut Vector<DMatch>,
) -> Result<()> { ... }
fn apply_transformation(
&mut self,
input: &impl ToInputArray,
output: &mut impl ToOutputArray,
) -> Result<f32> { ... }
fn apply_transformation_def(
&mut self,
input: &impl ToInputArray,
) -> Result<f32> { ... }
}
Expand description
Mutable methods for crate::shape::ShapeTransformer
Required Methods§
fn as_raw_mut_ShapeTransformer(&mut self) -> *mut c_void
Provided Methods§
Sourcefn estimate_transformation(
&mut self,
transforming_shape: &impl ToInputArray,
target_shape: &impl ToInputArray,
matches: &mut Vector<DMatch>,
) -> Result<()>
fn estimate_transformation( &mut self, transforming_shape: &impl ToInputArray, target_shape: &impl ToInputArray, matches: &mut Vector<DMatch>, ) -> Result<()>
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.
Sourcefn apply_transformation(
&mut self,
input: &impl ToInputArray,
output: &mut impl ToOutputArray,
) -> Result<f32>
fn apply_transformation( &mut self, input: &impl ToInputArray, output: &mut impl ToOutputArray, ) -> Result<f32>
Sourcefn apply_transformation_def(&mut self, input: &impl ToInputArray) -> Result<f32>
fn apply_transformation_def(&mut self, input: &impl ToInputArray) -> Result<f32>
Apply a transformation, given a pre-estimated transformation parameters.
§Parameters
- input: Contour (set of points) to apply the transformation.
- output: Output contour.
§Note
This alternative version of ShapeTransformerTrait::apply_transformation function uses the following default values for its arguments:
- output: noArray()
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.