View Source Evision.ShapeContextDistanceExtractor (Evision v0.1.38)

Summary

Types

t()

Type that represents an ShapeContextDistanceExtractor struct.

Functions

getAngularBins

getBendingEnergyWeight

getCostExtractor

getImageAppearanceWeight

getImages

getInnerRadius

getIterations

getOuterRadius

getRadialBins

getRotationInvariant

getShapeContextWeight

getStdDev

getTransformAlgorithm

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

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.

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

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.

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

Set the inner radius of the shape context descriptor.

Set the outer radius of the shape context descriptor.

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

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.

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

Set the algorithm used for aligning the shapes.

Types

@type t() :: %Evision.ShapeContextDistanceExtractor{ref: reference()}

Type that represents an ShapeContextDistanceExtractor struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec getAngularBins(t()) :: integer() | {:error, String.t()}

getAngularBins

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: int

Python prototype (for reference only):

getAngularBins() -> retval
Link to this function

getBendingEnergyWeight(self)

View Source
@spec getBendingEnergyWeight(t()) :: number() | {:error, String.t()}

getBendingEnergyWeight

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: float

Python prototype (for reference only):

getBendingEnergyWeight() -> retval
@spec getCostExtractor(t()) ::
  Evision.HistogramCostExtractor.t() | {:error, String.t()}

getCostExtractor

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: Evision.HistogramCostExtractor.t()

Python prototype (for reference only):

getCostExtractor() -> retval
Link to this function

getImageAppearanceWeight(self)

View Source
@spec getImageAppearanceWeight(t()) :: number() | {:error, String.t()}

getImageAppearanceWeight

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: float

Python prototype (for reference only):

getImageAppearanceWeight() -> retval
@spec getImages(t()) :: {Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

getImages

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • image1: Evision.Mat.t().
  • image2: Evision.Mat.t().

Python prototype (for reference only):

getImages([, image1[, image2]]) -> image1, image2
@spec getImages(t(), [{atom(), term()}, ...] | nil) ::
  {Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

getImages

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • image1: Evision.Mat.t().
  • image2: Evision.Mat.t().

Python prototype (for reference only):

getImages([, image1[, image2]]) -> image1, image2
@spec getInnerRadius(t()) :: number() | {:error, String.t()}

getInnerRadius

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: float

Python prototype (for reference only):

getInnerRadius() -> retval
@spec getIterations(t()) :: integer() | {:error, String.t()}

getIterations

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: int

Python prototype (for reference only):

getIterations() -> retval
@spec getOuterRadius(t()) :: number() | {:error, String.t()}

getOuterRadius

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: float

Python prototype (for reference only):

getOuterRadius() -> retval
@spec getRadialBins(t()) :: integer() | {:error, String.t()}

getRadialBins

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: int

Python prototype (for reference only):

getRadialBins() -> retval
Link to this function

getRotationInvariant(self)

View Source
@spec getRotationInvariant(t()) :: boolean() | {:error, String.t()}

getRotationInvariant

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: bool

Python prototype (for reference only):

getRotationInvariant() -> retval
Link to this function

getShapeContextWeight(self)

View Source
@spec getShapeContextWeight(t()) :: number() | {:error, String.t()}

getShapeContextWeight

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: float

Python prototype (for reference only):

getShapeContextWeight() -> retval
@spec getStdDev(t()) :: number() | {:error, String.t()}

getStdDev

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: float

Python prototype (for reference only):

getStdDev() -> retval
Link to this function

getTransformAlgorithm(self)

View Source
@spec getTransformAlgorithm(t()) ::
  Evision.ShapeTransformer.t() | {:error, String.t()}

getTransformAlgorithm

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
Return
  • retval: Evision.ShapeTransformer.t()

Python prototype (for reference only):

getTransformAlgorithm() -> retval
Link to this function

setAngularBins(self, nAngularBins)

View Source
@spec setAngularBins(t(), integer()) :: t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • nAngularBins: int.

    The number of angular bins in the shape context descriptor.

Python prototype (for reference only):

setAngularBins(nAngularBins) -> None
Link to this function

setBendingEnergyWeight(self, bendingEnergyWeight)

View Source
@spec setBendingEnergyWeight(t(), number()) :: t() | {:error, String.t()}

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.

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • bendingEnergyWeight: float.

    The weight of the Bending Energy in the final distance value.

Python prototype (for reference only):

setBendingEnergyWeight(bendingEnergyWeight) -> None
Link to this function

setCostExtractor(self, comparer)

View Source
@spec setCostExtractor(t(), Evision.HistogramCostExtractor.t()) ::
  t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • comparer: Evision.HistogramCostExtractor.t().

    Smart pointer to a HistogramCostExtractor, an algorithm that defines the cost matrix between descriptors.

Python prototype (for reference only):

setCostExtractor(comparer) -> None
Link to this function

setImageAppearanceWeight(self, imageAppearanceWeight)

View Source
@spec setImageAppearanceWeight(t(), number()) :: t() | {:error, String.t()}

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.

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • imageAppearanceWeight: float.

    The weight of the appearance cost in the final distance value.

Python prototype (for reference only):

setImageAppearanceWeight(imageAppearanceWeight) -> None
Link to this function

setImages(self, image1, image2)

View Source
@spec setImages(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • image1: Evision.Mat.t().

    Image corresponding to the shape defined by contours1.

  • image2: Evision.Mat.t().

    Image corresponding to the shape defined by contours2.

Python prototype (for reference only):

setImages(image1, image2) -> None
Link to this function

setInnerRadius(self, innerRadius)

View Source
@spec setInnerRadius(t(), number()) :: t() | {:error, String.t()}

Set the inner radius of the shape context descriptor.

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • innerRadius: float.

    The value of the inner radius.

Python prototype (for reference only):

setInnerRadius(innerRadius) -> None
Link to this function

setIterations(self, iterations)

View Source
@spec setIterations(t(), integer()) :: t() | {:error, String.t()}

setIterations

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
  • iterations: int

Python prototype (for reference only):

setIterations(iterations) -> None
Link to this function

setOuterRadius(self, outerRadius)

View Source
@spec setOuterRadius(t(), number()) :: t() | {:error, String.t()}

Set the outer radius of the shape context descriptor.

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • outerRadius: float.

    The value of the outer radius.

Python prototype (for reference only):

setOuterRadius(outerRadius) -> None
Link to this function

setRadialBins(self, nRadialBins)

View Source
@spec setRadialBins(t(), integer()) :: t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • nRadialBins: int.

    The number of radial bins in the shape context descriptor.

Python prototype (for reference only):

setRadialBins(nRadialBins) -> None
Link to this function

setRotationInvariant(self, rotationInvariant)

View Source
@spec setRotationInvariant(t(), boolean()) :: t() | {:error, String.t()}

setRotationInvariant

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()
  • rotationInvariant: bool

Python prototype (for reference only):

setRotationInvariant(rotationInvariant) -> None
Link to this function

setShapeContextWeight(self, shapeContextWeight)

View Source
@spec setShapeContextWeight(t(), number()) :: t() | {:error, String.t()}

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.

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • shapeContextWeight: float.

    The weight of the shape context distance in the final distance value.

Python prototype (for reference only):

setShapeContextWeight(shapeContextWeight) -> None
@spec setStdDev(t(), number()) :: t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • sigma: float.

    Standard Deviation.

Python prototype (for reference only):

setStdDev(sigma) -> None
Link to this function

setTransformAlgorithm(self, transformer)

View Source
@spec setTransformAlgorithm(t(), Evision.ShapeTransformer.t()) ::
  t() | {:error, String.t()}

Set the algorithm used for aligning the shapes.

Positional Arguments
  • self: Evision.ShapeContextDistanceExtractor.t()

  • transformer: Evision.ShapeTransformer.t().

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

Python prototype (for reference only):

setTransformAlgorithm(transformer) -> None