OpenCV  4.1.0
Open Source Computer Vision
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cv::xfeatures2d::PCTSignatures Class Referenceabstract

Class implementing PCT (position-color-texture) signature extraction as described in. More...

#include <opencv2/xfeatures2d.hpp>

Inheritance diagram for cv::xfeatures2d::PCTSignatures:
cv::Algorithm

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.
 
virtual void computeSignatures (const std::vector< Mat > &images, std::vector< Mat > &signatures) const =0
 Computes signatures for multiple images in parallel.
 
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.
 
virtual int getDistanceFunction () const =0
 Distance function selector used for measuring distance between two points in k-means.
 
virtual float getDropThreshold () const =0
 Remove centroids in k-means whose weight is lesser or equal to given threshold.
 
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.
 
virtual int getInitSeedCount () const =0
 Number of initial seeds (initial number of clusters) for the k-means algorithm.
 
virtual std::vector< int > getInitSeedIndexes () const =0
 Initial seeds (initial number of clusters) for the k-means algorithm.
 
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).
 
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.
 
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.
 
virtual int getSampleCount () const =0
 Number of initial samples taken from the image.
 
virtual std::vector< Point2fgetSamplingPoints () const =0
 Initial samples taken from the image. These sampled features become the input for clustering.
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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).
 
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.
 
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.
 
virtual void setDropThreshold (float dropThreshold)=0
 Remove centroids in k-means whose weight is lesser or equal to given threshold.
 
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.
 
virtual void setInitSeedIndexes (std::vector< int > initSeedIndexes)=0
 Initial seed indexes for the k-means algorithm.
 
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).
 
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.
 
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.
 
virtual void setSamplingPoints (std::vector< Point2f > samplingPoints)=0
 Sets sampling points used to sample the input image.
 
virtual void setTranslation (int idx, float value)=0
 Translations of the individual axes of the feature space.
 
virtual void setTranslations (const std::vector< float > &translations)=0
 Translations of the individual axes of the feature space.
 
virtual void setWeight (int idx, float value)=0
 Weights (multiplicative constants) that linearly stretch individual axes of the feature space.
 
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)
 
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)
 
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)
 
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)
 
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)
 
virtual void setWeights (const std::vector< float > &weights)=0
 Weights (multiplicative constants) that linearly stretch individual axes of the feature space.
 
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)
 
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)
 
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).
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage.
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage.
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindingsThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Static Public Member Functions

static Ptr< PCTSignaturescreate (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.
 
static Ptr< PCTSignaturescreate (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.
 
static Ptr< PCTSignaturescreate (const std::vector< Point2f > &initSamplingPoints, const std::vector< int > &initClusterSeedIndexes)
 Creates PCTSignatures algorithm using pre-generated sampling points and clusterization seeds indexes.
 
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.
 
static void generateInitPoints (std::vector< Point2f > &initPoints, const int count, int pointDistribution)
 Generates initial sampling points according to selected point distribution.
 
- 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.
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String.
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node.
 

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.

KrulisLS16. 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. KrulisLS16 BeecksUS10

Member Enumeration Documentation

Lp distance function selector.

Enumerator
L0_25 
L0_5 
L1 
L2 
L2SQUARED 
L5 
L_INFINITY 

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.

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

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
imageInput image of CV_8U type.
signatureOutput computed signature.
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
imagesVector of input images of CV_8U type.
signaturesVector of computed signatures.
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
initSampleCountNumber of points used for image sampling.
initSeedCountNumber of initial clusterization seeds. Must be lower or equal to initSampleCount
pointDistributionDistribution of generated points. Default: UNIFORM. Available: UNIFORM, REGULAR, NORMAL.
Returns
Created algorithm.
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
initSamplingPointsSampling points used in image sampling.
initSeedCountNumber of initial clusterization seeds. Must be lower or equal to initSamplingPoints.size().
Returns
Created algorithm.
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
initSamplingPointsSampling points used in image sampling.
initClusterSeedIndexesIndexes of initial clusterization seeds. Its size must be lower or equal to initSamplingPoints.size().
Returns
Created algorithm.
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
sourceSource image.
signatureImage signature.
resultOutput result.
radiusToShorterSideRatioDetermines maximal radius of signature in the output image.
borderThicknessBorder thickness of the visualized signature.
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
initPointsOutput vector where the generated points will be saved.
countNumber of points to generate.
pointDistributionPoint distribution selector. Available: UNIFORM, REGULAR, NORMAL.
Note
Generated coordinates are in range [0..1)
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.

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.

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.

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.

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.

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.

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

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.

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.

virtual int cv::xfeatures2d::PCTSignatures::getSampleCount ( ) const
pure virtual
Python:
retval=cv.xfeatures2d_PCTSignatures.getSampleCount()

Number of initial samples taken from the image.

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.

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)

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)

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)

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)

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)

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)

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)

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

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.

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.

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.

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.

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.

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

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.

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.

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
samplingPointsVector of sampling points in range [0..1)
Note
Number of sampling points must be greater or equal to clusterization seed count.
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
idxID of the translation
valueValue 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;
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
translationsValues 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;
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
idxID of the weight
valueValue 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;
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)

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)

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)

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)

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)

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
weightsValues 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;
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)

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)

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: