pub trait ShapeContextDistanceExtractorTrait: ShapeContextDistanceExtractorTraitConst + ShapeDistanceExtractorTrait {
Show 14 methods // Required method fn as_raw_mut_ShapeContextDistanceExtractor(&mut self) -> *mut c_void; // Provided methods fn set_angular_bins(&mut self, n_angular_bins: i32) -> Result<()> { ... } fn set_radial_bins(&mut self, n_radial_bins: i32) -> Result<()> { ... } fn set_inner_radius(&mut self, inner_radius: f32) -> Result<()> { ... } fn set_outer_radius(&mut self, outer_radius: f32) -> Result<()> { ... } fn set_rotation_invariant(&mut self, rotation_invariant: bool) -> Result<()> { ... } fn set_shape_context_weight( &mut self, shape_context_weight: f32 ) -> Result<()> { ... } fn set_image_appearance_weight( &mut self, image_appearance_weight: f32 ) -> Result<()> { ... } fn set_bending_energy_weight( &mut self, bending_energy_weight: f32 ) -> Result<()> { ... } fn set_images( &mut self, image1: &impl ToInputArray, image2: &impl ToInputArray ) -> Result<()> { ... } fn set_iterations(&mut self, iterations: i32) -> Result<()> { ... } fn set_cost_extractor( &mut self, comparer: Ptr<HistogramCostExtractor> ) -> Result<()> { ... } fn set_std_dev(&mut self, sigma: f32) -> Result<()> { ... } fn set_transform_algorithm( &mut self, transformer: Ptr<ShapeTransformer> ) -> Result<()> { ... }
}
Expand description

Required Methods§

Provided Methods§

source

fn set_angular_bins(&mut self, n_angular_bins: i32) -> Result<()>

Establish the number of angular bins for the Shape Context Descriptor used in the shape matching pipeline.

§Parameters
  • nAngularBins: The number of angular bins in the shape context descriptor.
source

fn set_radial_bins(&mut self, n_radial_bins: i32) -> Result<()>

Establish the number of radial bins for the Shape Context Descriptor used in the shape matching pipeline.

§Parameters
  • nRadialBins: The number of radial bins in the shape context descriptor.
source

fn set_inner_radius(&mut self, inner_radius: f32) -> Result<()>

Set the inner radius of the shape context descriptor.

§Parameters
  • innerRadius: The value of the inner radius.
source

fn set_outer_radius(&mut self, outer_radius: f32) -> Result<()>

Set the outer radius of the shape context descriptor.

§Parameters
  • outerRadius: The value of the outer radius.
source

fn set_rotation_invariant(&mut self, rotation_invariant: bool) -> Result<()>

source

fn set_shape_context_weight(&mut self, shape_context_weight: f32) -> Result<()>

Set the weight of the shape context distance in the final value of the shape distance. The shape context distance between two shapes is defined as the symmetric sum of shape context matching costs over best matching points. The final value of the shape distance is a user-defined linear combination of the shape context distance, an image appearance distance, and a bending energy.

§Parameters
  • shapeContextWeight: The weight of the shape context distance in the final distance value.
source

fn set_image_appearance_weight( &mut self, image_appearance_weight: f32 ) -> Result<()>

Set the weight of the Image Appearance cost in the final value of the shape distance. The image appearance cost is defined as the sum of squared brightness differences in Gaussian windows around corresponding image points. The final value of the shape distance is a user-defined linear combination of the shape context distance, an image appearance distance, and a bending energy. If this value is set to a number different from 0, is mandatory to set the images that correspond to each shape.

§Parameters
  • imageAppearanceWeight: The weight of the appearance cost in the final distance value.
source

fn set_bending_energy_weight( &mut self, bending_energy_weight: f32 ) -> Result<()>

Set the weight of the Bending Energy in the final value of the shape distance. The bending energy definition depends on what transformation is being used to align the shapes. The final value of the shape distance is a user-defined linear combination of the shape context distance, an image appearance distance, and a bending energy.

§Parameters
  • bendingEnergyWeight: The weight of the Bending Energy in the final distance value.
source

fn set_images( &mut self, image1: &impl ToInputArray, image2: &impl ToInputArray ) -> Result<()>

Set the images that correspond to each shape. This images are used in the calculation of the Image Appearance cost.

§Parameters
  • image1: Image corresponding to the shape defined by contours1.
  • image2: Image corresponding to the shape defined by contours2.
source

fn set_iterations(&mut self, iterations: i32) -> Result<()>

source

fn set_cost_extractor( &mut self, comparer: Ptr<HistogramCostExtractor> ) -> Result<()>

Set the algorithm used for building the shape context descriptor cost matrix.

§Parameters
  • comparer: Smart pointer to a HistogramCostExtractor, an algorithm that defines the cost matrix between descriptors.
source

fn set_std_dev(&mut self, sigma: f32) -> Result<()>

Set the value of the standard deviation for the Gaussian window for the image appearance cost.

§Parameters
  • sigma: Standard Deviation.
source

fn set_transform_algorithm( &mut self, transformer: Ptr<ShapeTransformer> ) -> Result<()>

Set the algorithm used for aligning the shapes.

§Parameters
  • transformer: Smart pointer to a ShapeTransformer, an algorithm that defines the aligning transformation.

Object Safety§

This trait is not object safe.

Implementors§