Class ShapeContextDistanceExtractor
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Implementation of the Shape Context descriptor and matching algorithm
public class ShapeContextDistanceExtractor : ShapeDistanceExtractor, IDisposable, ICvPtrHolder
- Inheritance
-
ShapeContextDistanceExtractor
- Implements
- Inherited Members
Remarks
proposed by Belongie et al. in "Shape Matching and Object Recognition Using Shape Contexts" (PAMI2002). This implementation is packaged in a generic scheme, in order to allow you the implementation of the common variations of the original pipeline.
Constructors
ShapeContextDistanceExtractor(nint)
protected ShapeContextDistanceExtractor(nint p)
Parameters
pnint
Properties
AngularBins
The number of angular bins in the shape context descriptor.
public int AngularBins { get; set; }
Property Value
BendingEnergyWeight
The weight of the Bending Energy in the final distance value.
public float BendingEnergyWeight { get; set; }
Property Value
ImageAppearanceWeight
The weight of the appearance cost in the final distance value.
public float ImageAppearanceWeight { get; set; }
Property Value
InnerRadius
The value of the inner radius.
public float InnerRadius { get; set; }
Property Value
Iterations
public int Iterations { get; set; }
Property Value
OuterRadius
The value of the outer radius.
public float OuterRadius { get; set; }
Property Value
RadialBins
The number of radial bins in the shape context descriptor.
public int RadialBins { get; set; }
Property Value
RotationInvariant
public bool RotationInvariant { get; set; }
Property Value
ShapeContextWeight
The weight of the shape context distance in the final distance value.
public float ShapeContextWeight { get; set; }
Property Value
StdDev
The value of the standard deviation for the Gaussian window for the image appearance cost.
public float StdDev { get; set; }
Property Value
Methods
Create(int, int, float, float, int)
Complete constructor
public static ShapeContextDistanceExtractor Create(int nAngularBins = 12, int nRadialBins = 4, float innerRadius = 0.2, float outerRadius = 2, int iterations = 3)
Parameters
nAngularBinsintThe number of angular bins in the shape context descriptor.
nRadialBinsintThe number of radial bins in the shape context descriptor.
innerRadiusfloatThe value of the inner radius.
outerRadiusfloatThe value of the outer radius.
iterationsint
Returns
DisposeManaged()
Releases managed resources
protected override void DisposeManaged()
GetImages(OutputArray, OutputArray)
Get the images that correspond to each shape. This images are used in the calculation of the Image Appearance cost.
public void GetImages(OutputArray image1, OutputArray image2)
Parameters
image1OutputArrayImage corresponding to the shape defined by contours1.
image2OutputArrayImage corresponding to the shape defined by contours2.
SetImages(InputArray, InputArray)
Set the images that correspond to each shape. This images are used in the calculation of the Image Appearance cost.
public void SetImages(InputArray image1, InputArray image2)
Parameters
image1InputArrayImage corresponding to the shape defined by contours1.
image2InputArrayImage corresponding to the shape defined by contours2.