[][src]Trait opencv::prelude::ShapeContextDistanceExtractor

pub trait ShapeContextDistanceExtractor: ShapeDistanceExtractor {
    pub fn as_raw_ShapeContextDistanceExtractor(&self) -> *const c_void;
pub fn as_raw_mut_ShapeContextDistanceExtractor(&mut self) -> *mut c_void; pub fn set_angular_bins(&mut self, n_angular_bins: i32) -> Result<()> { ... }
pub fn get_angular_bins(&self) -> Result<i32> { ... }
pub fn set_radial_bins(&mut self, n_radial_bins: i32) -> Result<()> { ... }
pub fn get_radial_bins(&self) -> Result<i32> { ... }
pub fn set_inner_radius(&mut self, inner_radius: f32) -> Result<()> { ... }
pub fn get_inner_radius(&self) -> Result<f32> { ... }
pub fn set_outer_radius(&mut self, outer_radius: f32) -> Result<()> { ... }
pub fn get_outer_radius(&self) -> Result<f32> { ... }
pub fn set_rotation_invariant(
        &mut self,
        rotation_invariant: bool
    ) -> Result<()> { ... }
pub fn get_rotation_invariant(&self) -> Result<bool> { ... }
pub fn set_shape_context_weight(
        &mut self,
        shape_context_weight: f32
    ) -> Result<()> { ... }
pub fn get_shape_context_weight(&self) -> Result<f32> { ... }
pub fn set_image_appearance_weight(
        &mut self,
        image_appearance_weight: f32
    ) -> Result<()> { ... }
pub fn get_image_appearance_weight(&self) -> Result<f32> { ... }
pub fn set_bending_energy_weight(
        &mut self,
        bending_energy_weight: f32
    ) -> Result<()> { ... }
pub fn get_bending_energy_weight(&self) -> Result<f32> { ... }
pub fn set_images(
        &mut self,
        image1: &dyn ToInputArray,
        image2: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn get_images(
        &self,
        image1: &mut dyn ToOutputArray,
        image2: &mut dyn ToOutputArray
    ) -> Result<()> { ... }
pub fn set_iterations(&mut self, iterations: i32) -> Result<()> { ... }
pub fn get_iterations(&self) -> Result<i32> { ... }
pub fn set_cost_extractor(
        &mut self,
        comparer: Ptr<dyn HistogramCostExtractor>
    ) -> Result<()> { ... }
pub fn get_cost_extractor(&self) -> Result<Ptr<dyn HistogramCostExtractor>> { ... }
pub fn set_std_dev(&mut self, sigma: f32) -> Result<()> { ... }
pub fn get_std_dev(&self) -> Result<f32> { ... }
pub fn set_transform_algorithm(
        &mut self,
        transformer: Ptr<dyn ShapeTransformer>
    ) -> Result<()> { ... }
pub fn get_transform_algorithm(&self) -> Result<Ptr<dyn ShapeTransformer>> { ... } }

/ / Implementation of the Shape Context descriptor and matching algorithm

proposed by Belongie et al. in "Shape Matching and Object Recognition Using Shape Contexts" (PAMI 2002). This implementation is packaged in a generic scheme, in order to allow you the implementation of the common variations of the original pipeline.

Required methods

Loading content...

Provided methods

pub fn set_angular_bins(&mut self, n_angular_bins: i32) -> Result<()>[src]

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.

pub fn get_angular_bins(&self) -> Result<i32>[src]

pub fn set_radial_bins(&mut self, n_radial_bins: i32) -> Result<()>[src]

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.

pub fn get_radial_bins(&self) -> Result<i32>[src]

pub fn set_inner_radius(&mut self, inner_radius: f32) -> Result<()>[src]

Set the inner radius of the shape context descriptor.

Parameters

  • innerRadius: The value of the inner radius.

pub fn get_inner_radius(&self) -> Result<f32>[src]

pub fn set_outer_radius(&mut self, outer_radius: f32) -> Result<()>[src]

Set the outer radius of the shape context descriptor.

Parameters

  • outerRadius: The value of the outer radius.

pub fn get_outer_radius(&self) -> Result<f32>[src]

pub fn set_rotation_invariant(&mut self, rotation_invariant: bool) -> Result<()>[src]

pub fn get_rotation_invariant(&self) -> Result<bool>[src]

pub fn set_shape_context_weight(
    &mut self,
    shape_context_weight: f32
) -> Result<()>
[src]

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.

pub fn get_shape_context_weight(&self) -> Result<f32>[src]

pub fn set_image_appearance_weight(
    &mut self,
    image_appearance_weight: f32
) -> Result<()>
[src]

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.

pub fn get_image_appearance_weight(&self) -> Result<f32>[src]

pub fn set_bending_energy_weight(
    &mut self,
    bending_energy_weight: f32
) -> Result<()>
[src]

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.

pub fn get_bending_energy_weight(&self) -> Result<f32>[src]

pub fn set_images(
    &mut self,
    image1: &dyn ToInputArray,
    image2: &dyn ToInputArray
) -> Result<()>
[src]

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.

pub fn get_images(
    &self,
    image1: &mut dyn ToOutputArray,
    image2: &mut dyn ToOutputArray
) -> Result<()>
[src]

pub fn set_iterations(&mut self, iterations: i32) -> Result<()>[src]

pub fn get_iterations(&self) -> Result<i32>[src]

pub fn set_cost_extractor(
    &mut self,
    comparer: Ptr<dyn HistogramCostExtractor>
) -> Result<()>
[src]

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.

pub fn get_cost_extractor(&self) -> Result<Ptr<dyn HistogramCostExtractor>>[src]

pub fn set_std_dev(&mut self, sigma: f32) -> Result<()>[src]

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

Parameters

  • sigma: Standard Deviation.

pub fn get_std_dev(&self) -> Result<f32>[src]

pub fn set_transform_algorithm(
    &mut self,
    transformer: Ptr<dyn ShapeTransformer>
) -> Result<()>
[src]

Set the algorithm used for aligning the shapes.

Parameters

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

pub fn get_transform_algorithm(&self) -> Result<Ptr<dyn ShapeTransformer>>[src]

Loading content...

Implementors

Loading content...