| OpenCV 3.4.7 Open Source Computer Vision

Public Types | Public Member Functions | Static Public Member Functions | List of all members
cv::xfeatures2d::PCTSignatures Class Referenceabstract
Extra 2D Features Framework » Experimental 2D Features Algorithms

Class implementing PCT (position-color-texture) signature extraction as described in [111]. The algorithm is divided to a feature sampler and a clusterizer. Feature sampler produces samples at given set of coordinates. Clusterizer then produces clusters of these samples using k-means algorithm. Resulting set of clusters is the signature of the input image. More...

`#include <opencv2/xfeatures2d.hpp>`

Inheritance diagram for cv::xfeatures2d::PCTSignatures:

## Public Types
enum | DistanceFunction { L0_25, L0_5, L1, L2, L2SQUARED, L5, L_INFINITY }
| Lp distance function selector. More...
enum | PointDistribution { UNIFORM, REGULAR, NORMAL }
| Point distributions supported by random point generator. More...
enum | SimilarityFunction { MINUS, GAUSSIAN, HEURISTIC }
| Similarity function selector. More...

## Public Member Functions
virtual void | computeSignature (InputArray image, OutputArray signature) const =0
| Computes signature of given image. More...
virtual void | computeSignatures (const std::vector< Mat > &images, std::vector< Mat > &signatures) const =0
| Computes signatures for multiple images in parallel. More...
virtual int | getClusterMinSize () const =0
| 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. More...
virtual int | getDistanceFunction () const =0
| Distance function selector used for measuring distance between two points in k-means. More...
virtual float | getDropThreshold () const =0
| Remove centroids in k-means whose weight is lesser or equal to given threshold. More...
virtual int | getGrayscaleBits () const =0
| 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. More...
virtual int | getInitSeedCount () const =0
| Number of initial seeds (initial number of clusters) for the k-means algorithm. More...
virtual std::vector< int > | getInitSeedIndexes () const =0
| Initial seeds (initial number of clusters) for the k-means algorithm. More...
virtual int | getIterationCount () const =0
| 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). More...
virtual float | getJoiningDistance () const =0
| 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. More...
virtual int | getMaxClustersCount () const =0
| Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped. More...
virtual int | getSampleCount () const =0
| Number of initial samples taken from the image. More...
virtual std::vector< Point2f > | getSamplingPoints () const =0
| Initial samples taken from the image. These sampled features become the input for clustering. More...
virtual float | getWeightA () const =0
| 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) More...
virtual float | getWeightB () const =0
| 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) More...
virtual float | getWeightContrast () const =0
| 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) More...
virtual float | getWeightEntropy () const =0
| 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) More...
virtual float | getWeightL () const =0
| 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) More...
virtual float | getWeightX () const =0
| 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) More...
virtual float | getWeightY () const =0
| 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) More...
virtual int | getWindowRadius () const =0
| 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). More...
virtual void | setClusterMinSize (int clusterMinSize)=0
| 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. More...
virtual void | setDistanceFunction (int distanceFunction)=0
| Distance function selector used for measuring distance between two points in k-means. Available: L0_25, L0_5, L1, L2, L2SQUARED, L5, L_INFINITY. More...
virtual void | setDropThreshold (float dropThreshold)=0
| Remove centroids in k-means whose weight is lesser or equal to given threshold. More...
virtual void | setGrayscaleBits (int grayscaleBits)=0
| 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. More...
virtual void | setInitSeedIndexes (std::vector< int > initSeedIndexes)=0
| Initial seed indexes for the k-means algorithm. More...
virtual void | setIterationCount (int iterationCount)=0
| 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). More...
virtual void | setJoiningDistance (float joiningDistance)=0
| 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. More...
virtual void | setMaxClustersCount (int maxClustersCount)=0
| Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped. More...
virtual void | setSamplingPoints (std::vector< Point2f > samplingPoints)=0
| Sets sampling points used to sample the input image. More...
virtual void | setTranslation (int idx, float value)=0
| Translations of the individual axes of the feature space. More...
virtual void | setTranslations (const std::vector< float > &translations)=0
| Translations of the individual axes of the feature space. More...
virtual void | setWeight (int idx, float value)=0
| Weights (multiplicative constants) that linearly stretch individual axes of the feature space. More...
virtual void | setWeightA (float weight)=0
| 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) More...
virtual void | setWeightB (float weight)=0
| 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) More...
virtual void | setWeightContrast (float weight)=0
| 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) More...
virtual void | setWeightEntropy (float weight)=0
| 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) More...
virtual void | setWeightL (float weight)=0
| 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) More...
virtual void | setWeights (const std::vector< float > &weights)=0
| Weights (multiplicative constants) that linearly stretch individual axes of the feature space. More...
virtual void | setWeightX (float weight)=0
| 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) More...
virtual void | setWeightY (float weight)=0
| 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) More...
virtual void | setWindowRadius (int radius)=0
| 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). More...
Public Member Functions inherited from cv::Algorithm
| Algorithm ()
virtual | ~Algorithm ()
virtual void | clear ()
| Clears the algorithm state. More...
virtual bool | empty () const
| Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
virtual String | getDefaultName () const
virtual void | read (const FileNode &fn)
| Reads algorithm parameters from a file storage. More...
virtual void | save (const String &filename) const
virtual void | write (FileStorage &fs) const
| Stores algorithm parameters in a file storage. More...
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const
| simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...

## Static Public Member Functions
static Ptr< PCTSignatures > | create (const int initSampleCount=2000, const int initSeedCount=400, const int pointDistribution=0)
| Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes. More...
static Ptr< PCTSignatures > | create (const std::vector< Point2f > &initSamplingPoints, const int initSeedCount)
| 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. More...
static Ptr< PCTSignatures > | create (const std::vector< Point2f > &initSamplingPoints, const std::vector< int > &initClusterSeedIndexes)
| Creates PCTSignatures algorithm using pre-generated sampling points and clusterization seeds indexes. More...
static void | drawSignature (InputArray source, InputArray signature, OutputArray result, float radiusToShorterSideRatio=1.0/8, int borderThickness=1)
| 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. More...
static void | generateInitPoints (std::vector< Point2f > &initPoints, const int count, int pointDistribution)
| Generates initial sampling points according to selected point distribution. More...
Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > | load (const String &filename, const String &objname=String())
| Loads algorithm from the file. More...
template<typename _Tp >
static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String())
| Loads algorithm from a String. More...
template<typename _Tp >
static Ptr< _Tp > | read (const FileNode &fn)
| Reads algorithm from the file node. More...

## Additional Inherited Members
Protected Member Functions inherited from cv::Algorithm
void | writeFormat (FileStorage &fs) const

## Detailed Description

Class implementing PCT (position-color-texture) signature extraction as described in [111]. The algorithm is divided to a feature sampler and a clusterizer. Feature sampler produces samples at given set of coordinates. Clusterizer then produces clusters of these samples using k-means algorithm. Resulting set of clusters is the signature of the input image.

A signature is an array of SIGNATURE_DIMENSION-dimensional points. Used dimensions are: weight, x, y position; lab color, contrast, entropy. [111] [13]

## Member Enumeration Documentation

## § DistanceFunction

enum cv::xfeatures2d::PCTSignatures::DistanceFunction

Lp distance function selector.

Enumerator
L0_25 |
L0_5 |
L1 |
L2 |
L2SQUARED |
L5 |
L_INFINITY |

## § PointDistribution

enum cv::xfeatures2d::PCTSignatures::PointDistribution

Point distributions supported by random point generator.

Enumerator
UNIFORM | Generate numbers uniformly.
REGULAR | Generate points in a regular grid.
NORMAL | Generate points with normal (gaussian) distribution.

## § SimilarityFunction

enum cv::xfeatures2d::PCTSignatures::SimilarityFunction

Similarity function selector.

See also
  Christian Beecks, Merih Seran Uysal, Thomas Seidl. Signature quadratic form distance. In Proceedings of the ACM International Conference on Image and Video Retrieval, pages 438-445. ACM, 2010. [13]

Note
  For selected distance function:

  \[ d(c_i, c_j) \]

  and parameter:

  \[ \alpha \]

Enumerator
MINUS | \[ -d(c_i, c_j) \]
GAUSSIAN | \[ e^{ -\alpha * d^2(c_i, c_j)} \]
HEURISTIC | \[ \frac{1}{\alpha + d(c_i, c_j)} \]

## Member Function Documentation

## § computeSignature()

virtual void cv::xfeatures2d::PCTSignatures::computeSignature | ( | InputArray | image,
|  | OutputArray | signature
| ) |  | const
| pure virtual

Python:
| signature | = | cv.xfeatures2d_PCTSignatures.computeSignature( | image[, signature] | )

Computes signature of given image.

Parameters

  image | Input image of CV_8U type.
  signature | Output computed signature.

## § computeSignatures()

virtual void cv::xfeatures2d::PCTSignatures::computeSignatures | ( | const std::vector< Mat > & | images,
|  | std::vector< Mat > & | signatures
| ) |  | const
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.computeSignatures( | images, signatures | )

Computes signatures for multiple images in parallel.

Parameters

  images | Vector of input images of CV_8U type.
  signatures | Vector of computed signatures.

## § create() [1/3]

static Ptr<PCTSignatures> cv::xfeatures2d::PCTSignatures::create | ( | const int | initSampleCount = `2000`,
|  | const int | initSeedCount = `400`,
|  | const int | pointDistribution = `0`
| ) |  |
| static

Python:
| retval | = | cv.xfeatures2d.PCTSignatures_create( | [, initSampleCount[, initSeedCount[, pointDistribution]]] | )
| retval | = | cv.xfeatures2d.PCTSignatures_create( | initSamplingPoints, initSeedCount | )
| retval | = | cv.xfeatures2d.PCTSignatures_create( | initSamplingPoints, initClusterSeedIndexes | )

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

Parameters

  initSampleCount | Number of points used for image sampling.
  initSeedCount | Number of initial clusterization seeds. Must be lower or equal to initSampleCount
  pointDistribution | Distribution of generated points. Default: UNIFORM. Available: UNIFORM, REGULAR, NORMAL.

Returns
  Created algorithm.

## § create() [2/3]

static Ptr<PCTSignatures> cv::xfeatures2d::PCTSignatures::create | ( | const std::vector< Point2f > & | initSamplingPoints,
|  | const int | initSeedCount
| ) |  |
| static

Python:
| retval | = | cv.xfeatures2d.PCTSignatures_create( | [, initSampleCount[, initSeedCount[, pointDistribution]]] | )
| retval | = | cv.xfeatures2d.PCTSignatures_create( | initSamplingPoints, initSeedCount | )
| retval | = | cv.xfeatures2d.PCTSignatures_create( | initSamplingPoints, initClusterSeedIndexes | )

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.

Parameters

  initSamplingPoints | Sampling points used in image sampling.
  initSeedCount | Number of initial clusterization seeds. Must be lower or equal to initSamplingPoints.size().

Returns
  Created algorithm.

## § create() [3/3]

static Ptr<PCTSignatures> cv::xfeatures2d::PCTSignatures::create | ( | const std::vector< Point2f > & | initSamplingPoints,
|  | const std::vector< int > & | initClusterSeedIndexes
| ) |  |
| static

Python:
| retval | = | cv.xfeatures2d.PCTSignatures_create( | [, initSampleCount[, initSeedCount[, pointDistribution]]] | )
| retval | = | cv.xfeatures2d.PCTSignatures_create( | initSamplingPoints, initSeedCount | )
| retval | = | cv.xfeatures2d.PCTSignatures_create( | initSamplingPoints, initClusterSeedIndexes | )

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

Parameters

  initSamplingPoints | Sampling points used in image sampling.
  initClusterSeedIndexes | Indexes of initial clusterization seeds. Its size must be lower or equal to initSamplingPoints.size().

Returns
  Created algorithm.

## § drawSignature()

static void cv::xfeatures2d::PCTSignatures::drawSignature | ( | InputArray | source,
|  | InputArray | signature,
|  | OutputArray | result,
|  | float | radiusToShorterSideRatio = `1.0/8`,
|  | int | borderThickness = `1`
| ) |  |
| static

Python:
| result | = | cv.xfeatures2d.PCTSignatures_drawSignature( | source, signature[, result[, radiusToShorterSideRatio[, borderThickness]]] | )

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.

Parameters

  source | Source image.
  signature | Image signature.
  result | Output result.
  radiusToShorterSideRatio | Determines maximal radius of signature in the output image.
  borderThickness | Border thickness of the visualized signature.

## § generateInitPoints()

static void cv::xfeatures2d::PCTSignatures::generateInitPoints | ( | std::vector< Point2f > & | initPoints,
|  | const int | count,
|  | int | pointDistribution
| ) |  |
| static

Python:
| None | = | cv.xfeatures2d.PCTSignatures_generateInitPoints( | initPoints, count, pointDistribution | )

Generates initial sampling points according to selected point distribution.

Parameters

  initPoints | Output vector where the generated points will be saved.
  count | Number of points to generate.
  pointDistribution | Point distribution selector. Available: UNIFORM, REGULAR, NORMAL.

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

## § getClusterMinSize()

virtual int cv::xfeatures2d::PCTSignatures::getClusterMinSize | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getClusterMinSize( |  | )

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.

## § getDistanceFunction()

virtual int cv::xfeatures2d::PCTSignatures::getDistanceFunction | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getDistanceFunction( |  | )

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

## § getDropThreshold()

virtual float cv::xfeatures2d::PCTSignatures::getDropThreshold | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getDropThreshold( |  | )

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

## § getGrayscaleBits()

virtual int cv::xfeatures2d::PCTSignatures::getGrayscaleBits | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getGrayscaleBits( |  | )

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.

## § getInitSeedCount()

virtual int cv::xfeatures2d::PCTSignatures::getInitSeedCount | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getInitSeedCount( |  | )

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

## § getInitSeedIndexes()

virtual std::vector<int> cv::xfeatures2d::PCTSignatures::getInitSeedIndexes | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getInitSeedIndexes( |  | )

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

## § getIterationCount()

virtual int cv::xfeatures2d::PCTSignatures::getIterationCount | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getIterationCount( |  | )

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).

## § getJoiningDistance()

virtual float cv::xfeatures2d::PCTSignatures::getJoiningDistance | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getJoiningDistance( |  | )

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.

## § getMaxClustersCount()

virtual int cv::xfeatures2d::PCTSignatures::getMaxClustersCount | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getMaxClustersCount( |  | )

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

## § getSampleCount()

virtual int cv::xfeatures2d::PCTSignatures::getSampleCount | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getSampleCount( |  | )

Number of initial samples taken from the image.

## § getSamplingPoints()

virtual std::vector<Point2f> cv::xfeatures2d::PCTSignatures::getSamplingPoints | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getSamplingPoints( |  | )

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

## § getWeightA()

virtual float cv::xfeatures2d::PCTSignatures::getWeightA | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightA( |  | )

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)

## § getWeightB()

virtual float cv::xfeatures2d::PCTSignatures::getWeightB | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightB( |  | )

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)

## § getWeightContrast()

virtual float cv::xfeatures2d::PCTSignatures::getWeightContrast | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightContrast( |  | )

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)

## § getWeightEntropy()

virtual float cv::xfeatures2d::PCTSignatures::getWeightEntropy | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightEntropy( |  | )

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)

## § getWeightL()

virtual float cv::xfeatures2d::PCTSignatures::getWeightL | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightL( |  | )

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)

## § getWeightX()

virtual float cv::xfeatures2d::PCTSignatures::getWeightX | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightX( |  | )

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)

## § getWeightY()

virtual float cv::xfeatures2d::PCTSignatures::getWeightY | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWeightY( |  | )

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)

## § getWindowRadius()

virtual int cv::xfeatures2d::PCTSignatures::getWindowRadius | ( |  | ) | const
| pure virtual

Python:
| retval | = | cv.xfeatures2d_PCTSignatures.getWindowRadius( |  | )

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).

## § setClusterMinSize()

virtual void cv::xfeatures2d::PCTSignatures::setClusterMinSize | ( | int | clusterMinSize | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setClusterMinSize( | clusterMinSize | )

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.

## § setDistanceFunction()

virtual void cv::xfeatures2d::PCTSignatures::setDistanceFunction | ( | int | distanceFunction | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setDistanceFunction( | distanceFunction | )

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

## § setDropThreshold()

virtual void cv::xfeatures2d::PCTSignatures::setDropThreshold | ( | float | dropThreshold | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setDropThreshold( | dropThreshold | )

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

## § setGrayscaleBits()

virtual void cv::xfeatures2d::PCTSignatures::setGrayscaleBits | ( | int | grayscaleBits | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setGrayscaleBits( | grayscaleBits | )

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.

## § setInitSeedIndexes()

virtual void cv::xfeatures2d::PCTSignatures::setInitSeedIndexes | ( | std::vector< int > | initSeedIndexes | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setInitSeedIndexes( | initSeedIndexes | )

Initial seed indexes for the k-means algorithm.

## § setIterationCount()

virtual void cv::xfeatures2d::PCTSignatures::setIterationCount | ( | int | iterationCount | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setIterationCount( | iterationCount | )

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).

## § setJoiningDistance()

virtual void cv::xfeatures2d::PCTSignatures::setJoiningDistance | ( | float | joiningDistance | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setJoiningDistance( | joiningDistance | )

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.

## § setMaxClustersCount()

virtual void cv::xfeatures2d::PCTSignatures::setMaxClustersCount | ( | int | maxClustersCount | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setMaxClustersCount( | maxClustersCount | )

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

## § setSamplingPoints()

virtual void cv::xfeatures2d::PCTSignatures::setSamplingPoints | ( | std::vector< Point2f > | samplingPoints | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setSamplingPoints( | samplingPoints | )

Sets sampling points used to sample the input image.

Parameters

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

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

## § setTranslation()

virtual void cv::xfeatures2d::PCTSignatures::setTranslation | ( | int | idx,
|  | float | value
| ) |  |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setTranslation( | idx, value | )

Translations of the individual axes of the feature space.

Parameters

  idx | ID of the translation
  value | 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;

## § setTranslations()

virtual void cv::xfeatures2d::PCTSignatures::setTranslations | ( | const std::vector< float > & | translations | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setTranslations( | translations | )

Translations of the individual axes of the feature space.

Parameters

  translations | 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;

## § setWeight()

virtual void cv::xfeatures2d::PCTSignatures::setWeight | ( | int | idx,
|  | float | value
| ) |  |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeight( | idx, value | )

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

Parameters

  idx | ID of the weight
  value | 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;

## § setWeightA()

virtual void cv::xfeatures2d::PCTSignatures::setWeightA | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightA( | weight | )

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)

## § setWeightB()

virtual void cv::xfeatures2d::PCTSignatures::setWeightB | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightB( | weight | )

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)

## § setWeightContrast()

virtual void cv::xfeatures2d::PCTSignatures::setWeightContrast | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightContrast( | weight | )

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)

## § setWeightEntropy()

virtual void cv::xfeatures2d::PCTSignatures::setWeightEntropy | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightEntropy( | weight | )

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)

## § setWeightL()

virtual void cv::xfeatures2d::PCTSignatures::setWeightL | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightL( | weight | )

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)

## § setWeights()

virtual void cv::xfeatures2d::PCTSignatures::setWeights | ( | const std::vector< float > & | weights | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeights( | weights | )

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

Parameters

  weights | 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;

## § setWeightX()

virtual void cv::xfeatures2d::PCTSignatures::setWeightX | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightX( | weight | )

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)

## § setWeightY()

virtual void cv::xfeatures2d::PCTSignatures::setWeightY | ( | float | weight | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWeightY( | weight | )

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)

## § setWindowRadius()

virtual void cv::xfeatures2d::PCTSignatures::setWindowRadius | ( | int | radius | ) |
| pure virtual

Python:
| None | = | cv.xfeatures2d_PCTSignatures.setWindowRadius( | radius | )

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).

The documentation for this class was generated from the following file:

- opencv2/xfeatures2d.hpp