View Source Evision.ShapeContextDistanceExtractor (Evision v0.2.9)

Summary

Types

t()

Type that represents an ShapeContextDistanceExtractor struct.

Functions

getBendingEnergyWeight

getCostExtractor

getImageAppearanceWeight

getRotationInvariant

getShapeContextWeight

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

Link to this function

getAngularBins(named_args)

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

getAngularBins

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

Python prototype (for reference only):

getAngularBins() -> retval
Link to this function

getBendingEnergyWeight(named_args)

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

getBendingEnergyWeight

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

Python prototype (for reference only):

getBendingEnergyWeight() -> retval
Link to this function

getCostExtractor(named_args)

View Source
@spec getCostExtractor(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getImageAppearanceWeight(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getInnerRadius(named_args)

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

getInnerRadius

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

Python prototype (for reference only):

getInnerRadius() -> retval
Link to this function

getIterations(named_args)

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

getIterations

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

Python prototype (for reference only):

getIterations() -> retval
Link to this function

getOuterRadius(named_args)

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

getOuterRadius

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

Python prototype (for reference only):

getOuterRadius() -> retval
Link to this function

getRadialBins(named_args)

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

getRadialBins

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

Python prototype (for reference only):

getRadialBins() -> retval
Link to this function

getRotationInvariant(named_args)

View Source
@spec getRotationInvariant(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getShapeContextWeight(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getTransformAlgorithm(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec setAngularBins(Keyword.t()) :: any() | {:error, String.t()}
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: integer().

    The number of angular bins in the shape context descriptor.

Python prototype (for reference only):

setAngularBins(nAngularBins) -> None
Link to this function

setBendingEnergyWeight(named_args)

View Source
@spec setBendingEnergyWeight(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setCostExtractor(Keyword.t()) :: any() | {:error, String.t()}
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.

    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(named_args)

View Source
@spec setImageAppearanceWeight(Keyword.t()) :: any() | {:error, String.t()}
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
@spec setImages(Keyword.t()) :: any() | {:error, String.t()}
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.

    Image corresponding to the shape defined by contours1.

  • image2: Evision.Mat.

    Image corresponding to the shape defined by contours2.

Python prototype (for reference only):

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

setInnerRadius(named_args)

View Source
@spec setInnerRadius(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setIterations(Keyword.t()) :: any() | {:error, String.t()}
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: integer()

Python prototype (for reference only):

setIterations(iterations) -> None
Link to this function

setOuterRadius(named_args)

View Source
@spec setOuterRadius(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setRadialBins(Keyword.t()) :: any() | {:error, String.t()}
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: integer().

    The number of radial bins in the shape context descriptor.

Python prototype (for reference only):

setRadialBins(nRadialBins) -> None
Link to this function

setRotationInvariant(named_args)

View Source
@spec setRotationInvariant(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setShapeContextWeight(Keyword.t()) :: any() | {:error, String.t()}
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(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec setTransformAlgorithm(Keyword.t()) :: any() | {:error, String.t()}
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.

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

Python prototype (for reference only):

setTransformAlgorithm(transformer) -> None