Class ShapeContextDistanceExtractor
Implementation of the Shape Context descriptor and matching algorithm
Inheritance
Implements
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class ShapeContextDistanceExtractor : ShapeDistanceExtractor, ICvPtrHolder
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
| Improve this Doc View SourceShapeContextDistanceExtractor(IntPtr)
Declaration
protected ShapeContextDistanceExtractor(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | p |
Properties
| Improve this Doc View SourceAngularBins
The number of angular bins in the shape context descriptor.
Declaration
public int AngularBins { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
BendingEnergyWeight
The weight of the Bending Energy in the final distance value.
Declaration
public float BendingEnergyWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
ImageAppearanceWeight
The weight of the appearance cost in the final distance value.
Declaration
public float ImageAppearanceWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
InnerRadius
The value of the inner radius.
Declaration
public float InnerRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Iterations
Declaration
public int Iterations { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
OuterRadius
The value of the outer radius.
Declaration
public float OuterRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
RadialBins
The number of radial bins in the shape context descriptor.
Declaration
public int RadialBins { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
RotationInvariant
Declaration
public bool RotationInvariant { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShapeContextWeight
The weight of the shape context distance in the final distance value.
Declaration
public float ShapeContextWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
StdDev
The value of the standard deviation for the Gaussian window for the image appearance cost.
Declaration
public float StdDev { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
| Improve this Doc View SourceCreate(Int32, Int32, Single, Single, Int32)
Complete constructor
Declaration
public static ShapeContextDistanceExtractor Create(int nAngularBins = 12, int nRadialBins = 4, float innerRadius = 0.2F, float outerRadius = 2F, int iterations = 3)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nAngularBins | The number of angular bins in the shape context descriptor. |
System.Int32 | nRadialBins | The number of radial bins in the shape context descriptor. |
System.Single | innerRadius | The value of the inner radius. |
System.Single | outerRadius | The value of the outer radius. |
System.Int32 | iterations |
Returns
Type | Description |
---|---|
ShapeContextDistanceExtractor |
DisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()
Overrides
| Improve this Doc View SourceDisposeUnmanaged()
Declaration
protected override void DisposeUnmanaged()
Overrides
| Improve this Doc View SourceGet()
Declaration
public override IntPtr Get()
Returns
Type | Description |
---|---|
IntPtr |
GetImages(OutputArray, OutputArray)
Get the images that correspond to each shape. This images are used in the calculation of the Image Appearance cost.
Declaration
public void GetImages(OutputArray image1, OutputArray image2)
Parameters
Type | Name | Description |
---|---|---|
OutputArray | image1 | Image corresponding to the shape defined by contours1. |
OutputArray | image2 | Image 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.
Declaration
public void SetImages(InputArray image1, InputArray image2)
Parameters
Type | Name | Description |
---|---|---|
InputArray | image1 | Image corresponding to the shape defined by contours1. |
InputArray | image2 | Image corresponding to the shape defined by contours2. |