View Source Evision.XFeatures2D.PCTSignatures (Evision v0.2.9)

Summary

Types

t()

Type that represents an XFeatures2D.PCTSignatures struct.

Functions

Clears the algorithm state

Computes signature of given image.

Computes signature of given image.

Computes signatures for multiple images in parallel.

Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.

Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.

Variant 1:

Creates PCTSignatures algorithm using pre-generated sampling points and clusterization seeds indexes.

Draws signature in the source image and outputs the result. Signatures are visualized as a circle with radius based on signature weight and color based on signature color. Contrast and entropy are not visualized.

Draws signature in the source image and outputs the result. Signatures are visualized as a circle with radius based on signature weight and color based on signature color. Contrast and entropy are not visualized.

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Generates initial sampling points according to selected point distribution.

This parameter multiplied by the index of iteration gives lower limit for cluster size. Clusters containing fewer points than specified by the limit have their centroid dismissed and points are reassigned.

Distance function selector used for measuring distance between two points in k-means.

Remove centroids in k-means whose weight is lesser or equal to given threshold.

Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used). The greyscale bitmap is used for computing contrast and entropy values.

Number of initial seeds (initial number of clusters) for the k-means algorithm.

Initial seeds (initial number of clusters) for the k-means algorithm.

Number of iterations of the k-means clustering. We use fixed number of iterations, since the modified clustering is pruning clusters (not iteratively refining k clusters).

Threshold euclidean distance between two centroids. If two cluster centers are closer than this distance, one of the centroid is dismissed and points are reassigned.

Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.

Number of initial samples taken from the image.

Initial samples taken from the image. These sampled features become the input for clustering.

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Size of the texture sampling window used to compute contrast and entropy (center of the window is always in the pixel selected by x,y coordinates of the corresponding feature sample).

Reads algorithm parameters from a file storage

This parameter multiplied by the index of iteration gives lower limit for cluster size. Clusters containing fewer points than specified by the limit have their centroid dismissed and points are reassigned.

Distance function selector used for measuring distance between two points in k-means. Available: L0_25, L0_5, L1, L2, L2SQUARED, L5, L_INFINITY.

Remove centroids in k-means whose weight is lesser or equal to given threshold.

Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used). The greyscale bitmap is used for computing contrast and entropy values.

Initial seed indexes for the k-means algorithm.

Number of iterations of the k-means clustering. We use fixed number of iterations, since the modified clustering is pruning clusters (not iteratively refining k clusters).

Threshold euclidean distance between two centroids. If two cluster centers are closer than this distance, one of the centroid is dismissed and points are reassigned.

Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.

Sets sampling points used to sample the input image.

Translations of the individual axes of the feature space.

Translations of the individual axes of the feature space.

Weights (multiplicative constants) that linearly stretch individual axes of the feature space.

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space.

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Size of the texture sampling window used to compute contrast and entropy (center of the window is always in the pixel selected by x,y coordinates of the corresponding feature sample).

Stores algorithm parameters in a file storage

Types

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

Type that represents an XFeatures2D.PCTSignatures struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

Python prototype (for reference only):

clear() -> None
Link to this function

computeSignature(named_args)

View Source
@spec computeSignature(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

computeSignature(self, image)

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

Computes signature of given image.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • image: Evision.Mat.

    Input image of CV_8U type.

Return
  • signature: Evision.Mat.t().

    Output computed signature.

Python prototype (for reference only):

computeSignature(image[, signature]) -> signature
Link to this function

computeSignature(self, image, opts)

View Source
@spec computeSignature(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

Computes signature of given image.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • image: Evision.Mat.

    Input image of CV_8U type.

Return
  • signature: Evision.Mat.t().

    Output computed signature.

Python prototype (for reference only):

computeSignature(image[, signature]) -> signature
Link to this function

computeSignatures(named_args)

View Source
@spec computeSignatures(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

computeSignatures(self, images, signatures)

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

Computes signatures for multiple images in parallel.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • images: [Evision.Mat].

    Vector of input images of CV_8U type.

  • signatures: [Evision.Mat].

    Vector of computed signatures.

Python prototype (for reference only):

computeSignatures(images, signatures) -> None
@spec create() :: t() | {:error, String.t()}

Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.

Keyword Arguments
  • initSampleCount: integer().

    Number of points used for image sampling.

  • initSeedCount: integer().

    Number of initial clusterization seeds. Must be lower or equal to initSampleCount

  • pointDistribution: integer().

    Distribution of generated points. Default: UNIFORM. Available: UNIFORM, REGULAR, NORMAL.

Return
  • retval: PCTSignatures

@return Created algorithm.

Python prototype (for reference only):

create([, initSampleCount[, initSeedCount[, pointDistribution]]]) -> retval
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create(
  [initSampleCount: term(), initSeedCount: term(), pointDistribution: term()]
  | nil
) ::
  t() | {:error, String.t()}

Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.

Keyword Arguments
  • initSampleCount: integer().

    Number of points used for image sampling.

  • initSeedCount: integer().

    Number of initial clusterization seeds. Must be lower or equal to initSampleCount

  • pointDistribution: integer().

    Distribution of generated points. Default: UNIFORM. Available: UNIFORM, REGULAR, NORMAL.

Return
  • retval: PCTSignatures

@return Created algorithm.

Python prototype (for reference only):

create([, initSampleCount[, initSeedCount[, pointDistribution]]]) -> retval
Link to this function

create(initSamplingPoints, initClusterSeedIndexes)

View Source
@spec create([{number(), number()}], [integer()]) :: t() | {:error, String.t()}
@spec create([{number(), number()}], integer()) :: t() | {:error, String.t()}

Variant 1:

Creates PCTSignatures algorithm using pre-generated sampling points and clusterization seeds indexes.

Positional Arguments
  • initSamplingPoints: [Point2f].

    Sampling points used in image sampling.

  • initClusterSeedIndexes: [integer()].

    Indexes of initial clusterization seeds. Its size must be lower or equal to initSamplingPoints.size().

Return
  • retval: PCTSignatures

@return Created algorithm.

Python prototype (for reference only):

create(initSamplingPoints, initClusterSeedIndexes) -> retval

Variant 2:

Creates PCTSignatures algorithm using pre-generated sampling points and number of clusterization seeds. It uses the provided sampling points and generates its own clusterization seed indexes.

Positional Arguments
  • initSamplingPoints: [Point2f].

    Sampling points used in image sampling.

  • initSeedCount: integer().

    Number of initial clusterization seeds. Must be lower or equal to initSamplingPoints.size().

Return
  • retval: PCTSignatures

@return Created algorithm.

Python prototype (for reference only):

create(initSamplingPoints, initSeedCount) -> retval
Link to this function

drawSignature(named_args)

View Source
@spec drawSignature(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

drawSignature(source, signature)

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

Draws signature in the source image and outputs the result. Signatures are visualized as a circle with radius based on signature weight and color based on signature color. Contrast and entropy are not visualized.

Positional Arguments
Keyword Arguments
  • radiusToShorterSideRatio: float.

    Determines maximal radius of signature in the output image.

  • borderThickness: integer().

    Border thickness of the visualized signature.

Return
  • result: Evision.Mat.t().

    Output result.

Python prototype (for reference only):

drawSignature(source, signature[, result[, radiusToShorterSideRatio[, borderThickness]]]) -> result
Link to this function

drawSignature(source, signature, opts)

View Source
@spec drawSignature(
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [borderThickness: term(), radiusToShorterSideRatio: term()] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Draws signature in the source image and outputs the result. Signatures are visualized as a circle with radius based on signature weight and color based on signature color. Contrast and entropy are not visualized.

Positional Arguments
Keyword Arguments
  • radiusToShorterSideRatio: float.

    Determines maximal radius of signature in the output image.

  • borderThickness: integer().

    Border thickness of the visualized signature.

Return
  • result: Evision.Mat.t().

    Output result.

Python prototype (for reference only):

drawSignature(source, signature[, result[, radiusToShorterSideRatio[, borderThickness]]]) -> result
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

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

Python prototype (for reference only):

empty() -> retval
Link to this function

generateInitPoints(named_args)

View Source
@spec generateInitPoints(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

generateInitPoints(initPoints, count, pointDistribution)

View Source
@spec generateInitPoints([{number(), number()}], integer(), integer()) ::
  :ok | {:error, String.t()}

Generates initial sampling points according to selected point distribution.

Positional Arguments
  • initPoints: [Point2f].

    Output vector where the generated points will be saved.

  • count: integer().

    Number of points to generate.

  • pointDistribution: integer().

    Point distribution selector. Available: UNIFORM, REGULAR, NORMAL.

Note: Generated coordinates are in range [0..1)

Python prototype (for reference only):

generateInitPoints(initPoints, count, pointDistribution) -> None
Link to this function

getClusterMinSize(named_args)

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

This parameter multiplied by the index of iteration gives lower limit for cluster size. Clusters containing fewer points than specified by the limit have their centroid dismissed and points are reassigned.

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

Python prototype (for reference only):

getClusterMinSize() -> retval
Link to this function

getDefaultName(named_args)

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

getDefaultName

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
Link to this function

getDistanceFunction(named_args)

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

Distance function selector used for measuring distance between two points in k-means.

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

Python prototype (for reference only):

getDistanceFunction() -> retval
Link to this function

getDropThreshold(named_args)

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

Remove centroids in k-means whose weight is lesser or equal to given threshold.

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

Python prototype (for reference only):

getDropThreshold() -> retval
Link to this function

getGrayscaleBits(named_args)

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

Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used). The greyscale bitmap is used for computing contrast and entropy values.

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

Python prototype (for reference only):

getGrayscaleBits() -> retval
Link to this function

getInitSeedCount(named_args)

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

Number of initial seeds (initial number of clusters) for the k-means algorithm.

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

Python prototype (for reference only):

getInitSeedCount() -> retval
Link to this function

getInitSeedIndexes(named_args)

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

Initial seeds (initial number of clusters) for the k-means algorithm.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
Return
  • retval: [integer()]

Python prototype (for reference only):

getInitSeedIndexes() -> retval
Link to this function

getIterationCount(named_args)

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

Number of iterations of the k-means clustering. We use fixed number of iterations, since the modified clustering is pruning clusters (not iteratively refining k clusters).

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

Python prototype (for reference only):

getIterationCount() -> retval
Link to this function

getJoiningDistance(named_args)

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

Threshold euclidean distance between two centroids. If two cluster centers are closer than this distance, one of the centroid is dismissed and points are reassigned.

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

Python prototype (for reference only):

getJoiningDistance() -> retval
Link to this function

getMaxClustersCount(named_args)

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

Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.

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

Python prototype (for reference only):

getMaxClustersCount() -> retval
Link to this function

getSampleCount(named_args)

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

Number of initial samples taken from the image.

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

Python prototype (for reference only):

getSampleCount() -> retval
Link to this function

getSamplingPoints(named_args)

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

Initial samples taken from the image. These sampled features become the input for clustering.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
Return
  • retval: [Point2f]

Python prototype (for reference only):

getSamplingPoints() -> retval
@spec getWeightA(Keyword.t()) :: any() | {:error, String.t()}
@spec getWeightA(t()) :: number() | {:error, String.t()}

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightA() -> retval
@spec getWeightB(Keyword.t()) :: any() | {:error, String.t()}
@spec getWeightB(t()) :: number() | {:error, String.t()}

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightB() -> retval
Link to this function

getWeightContrast(named_args)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightContrast() -> retval
Link to this function

getWeightEntropy(named_args)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightEntropy() -> retval
@spec getWeightL(Keyword.t()) :: any() | {:error, String.t()}
@spec getWeightL(t()) :: number() | {:error, String.t()}

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightL() -> retval
@spec getWeightX(Keyword.t()) :: any() | {:error, String.t()}
@spec getWeightX(t()) :: number() | {:error, String.t()}

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightX() -> retval
@spec getWeightY(Keyword.t()) :: any() | {:error, String.t()}
@spec getWeightY(t()) :: number() | {:error, String.t()}

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

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

Python prototype (for reference only):

getWeightY() -> retval
Link to this function

getWindowRadius(named_args)

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

Size of the texture sampling window used to compute contrast and entropy (center of the window is always in the pixel selected by x,y coordinates of the corresponding feature sample).

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

Python prototype (for reference only):

getWindowRadius() -> retval
@spec read(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
Link to this function

setClusterMinSize(named_args)

View Source
@spec setClusterMinSize(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setClusterMinSize(self, clusterMinSize)

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

This parameter multiplied by the index of iteration gives lower limit for cluster size. Clusters containing fewer points than specified by the limit have their centroid dismissed and points are reassigned.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • clusterMinSize: integer()

Python prototype (for reference only):

setClusterMinSize(clusterMinSize) -> None
Link to this function

setDistanceFunction(named_args)

View Source
@spec setDistanceFunction(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setDistanceFunction(self, distanceFunction)

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

Distance function selector used for measuring distance between two points in k-means. Available: L0_25, L0_5, L1, L2, L2SQUARED, L5, L_INFINITY.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • distanceFunction: integer()

Python prototype (for reference only):

setDistanceFunction(distanceFunction) -> None
Link to this function

setDropThreshold(named_args)

View Source
@spec setDropThreshold(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setDropThreshold(self, dropThreshold)

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

Remove centroids in k-means whose weight is lesser or equal to given threshold.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • dropThreshold: float

Python prototype (for reference only):

setDropThreshold(dropThreshold) -> None
Link to this function

setGrayscaleBits(named_args)

View Source
@spec setGrayscaleBits(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setGrayscaleBits(self, grayscaleBits)

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

Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used). The greyscale bitmap is used for computing contrast and entropy values.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • grayscaleBits: integer()

Python prototype (for reference only):

setGrayscaleBits(grayscaleBits) -> None
Link to this function

setInitSeedIndexes(named_args)

View Source
@spec setInitSeedIndexes(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setInitSeedIndexes(self, initSeedIndexes)

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

Initial seed indexes for the k-means algorithm.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • initSeedIndexes: [integer()]

Python prototype (for reference only):

setInitSeedIndexes(initSeedIndexes) -> None
Link to this function

setIterationCount(named_args)

View Source
@spec setIterationCount(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setIterationCount(self, iterationCount)

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

Number of iterations of the k-means clustering. We use fixed number of iterations, since the modified clustering is pruning clusters (not iteratively refining k clusters).

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • iterationCount: integer()

Python prototype (for reference only):

setIterationCount(iterationCount) -> None
Link to this function

setJoiningDistance(named_args)

View Source
@spec setJoiningDistance(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setJoiningDistance(self, joiningDistance)

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

Threshold euclidean distance between two centroids. If two cluster centers are closer than this distance, one of the centroid is dismissed and points are reassigned.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • joiningDistance: float

Python prototype (for reference only):

setJoiningDistance(joiningDistance) -> None
Link to this function

setMaxClustersCount(named_args)

View Source
@spec setMaxClustersCount(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setMaxClustersCount(self, maxClustersCount)

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

Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • maxClustersCount: integer()

Python prototype (for reference only):

setMaxClustersCount(maxClustersCount) -> None
Link to this function

setSamplingPoints(named_args)

View Source
@spec setSamplingPoints(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setSamplingPoints(self, samplingPoints)

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

Sets sampling points used to sample the input image.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • samplingPoints: [Point2f].

    Vector of sampling points in range [0..1)

Note: Number of sampling points must be greater or equal to clusterization seed count.

Python prototype (for reference only):

setSamplingPoints(samplingPoints) -> None
Link to this function

setTranslation(named_args)

View Source
@spec setTranslation(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setTranslation(self, idx, value)

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

Translations of the individual axes of the feature space.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • idx: integer().

    ID of the translation

  • value: float.

    Value of the translation

Note:

   WEIGHT_IDX = 0;
   X_IDX = 1;
   Y_IDX = 2;
   L_IDX = 3;
   A_IDX = 4;
   B_IDX = 5;
   CONTRAST_IDX = 6;
   ENTROPY_IDX = 7;

Python prototype (for reference only):

setTranslation(idx, value) -> None
Link to this function

setTranslations(named_args)

View Source
@spec setTranslations(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setTranslations(self, translations)

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

Translations of the individual axes of the feature space.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • translations: [float].

    Values of all translations.

Note:

   WEIGHT_IDX = 0;
   X_IDX = 1;
   Y_IDX = 2;
   L_IDX = 3;
   A_IDX = 4;
   B_IDX = 5;
   CONTRAST_IDX = 6;
   ENTROPY_IDX = 7;

Python prototype (for reference only):

setTranslations(translations) -> None
@spec setWeight(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeight(self, idx, value)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • idx: integer().

    ID of the weight

  • value: float.

    Value of the weight

Note:

   WEIGHT_IDX = 0;
   X_IDX = 1;
   Y_IDX = 2;
   L_IDX = 3;
   A_IDX = 4;
   B_IDX = 5;
   CONTRAST_IDX = 6;
   ENTROPY_IDX = 7;

Python prototype (for reference only):

setWeight(idx, value) -> None
@spec setWeightA(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightA(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightA(weight) -> None
@spec setWeightB(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightB(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightB(weight) -> None
Link to this function

setWeightContrast(named_args)

View Source
@spec setWeightContrast(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightContrast(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightContrast(weight) -> None
Link to this function

setWeightEntropy(named_args)

View Source
@spec setWeightEntropy(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightEntropy(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightEntropy(weight) -> None
@spec setWeightL(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightL(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightL(weight) -> None
@spec setWeights(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeights(self, weights)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space.

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()

  • weights: [float].

    Values of all weights.

Note:

   WEIGHT_IDX = 0;
   X_IDX = 1;
   Y_IDX = 2;
   L_IDX = 3;
   A_IDX = 4;
   B_IDX = 5;
   CONTRAST_IDX = 6;
   ENTROPY_IDX = 7;

Python prototype (for reference only):

setWeights(weights) -> None
@spec setWeightX(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightX(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightX(weight) -> None
@spec setWeightY(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWeightY(self, weight)

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

Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • weight: float

Python prototype (for reference only):

setWeightY(weight) -> None
Link to this function

setWindowRadius(named_args)

View Source
@spec setWindowRadius(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setWindowRadius(self, radius)

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

Size of the texture sampling window used to compute contrast and entropy (center of the window is always in the pixel selected by x,y coordinates of the corresponding feature sample).

Positional Arguments
  • self: Evision.XFeatures2D.PCTSignatures.t()
  • radius: integer()

Python prototype (for reference only):

setWindowRadius(radius) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None