🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.xfeatures2d
クラス PCTSignatures
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.xfeatures2d.PCTSignatures
public class PCTSignatures extends Algorithm
CITE: KrulisLS16 で説明されている、PCT (position-color-texture) シグネチャ抽出を実装するクラス。アルゴリズムは特徴サンプラとクラスタライザに分かれている。特徴サンプラは与えられた座標集合でサンプルを生成する。次にクラスタライザはk-meansアルゴリズムを用いてこれらのサンプルのクラスタを生成する。得られたクラスタの集合が入力画像のシグネチャとなる。シグネチャはSIGNATURE_DIMENSION次元の点の配列である。使用される次元は、重み、x座標、y位置、lab色、コントラスト、エントロピーである。CITE: KrulisLS16 CITE: BeecksUS10
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedPCTSignatures​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static PCTSignatures__fromPtr__​(long addr)voidcomputeSignature​(Mat image, Mat signature)Computes signature of given image.voidcomputeSignatures​(java.util.List<Mat> images, java.util.List<Mat> signatures)Computes signatures for multiple images in parallel.static PCTSignaturescreate()Creates PCTSignatures algorithm using sample and seed count.static PCTSignaturescreate​(int initSampleCount)Creates PCTSignatures algorithm using sample and seed count.static PCTSignaturescreate​(int initSampleCount, int initSeedCount)Creates PCTSignatures algorithm using sample and seed count.static PCTSignaturescreate​(int initSampleCount, int initSeedCount, int pointDistribution)Creates PCTSignatures algorithm using sample and seed count.static PCTSignaturescreate​(MatOfPoint2f initSamplingPoints, int initSeedCount)Creates PCTSignatures algorithm using pre-generated sampling points and number of clusterization seeds.static PCTSignaturescreate​(MatOfPoint2f initSamplingPoints, MatOfInt initClusterSeedIndexes)Creates PCTSignatures algorithm using pre-generated sampling points and clusterization seeds indexes.static voiddrawSignature​(Mat source, Mat signature, Mat result)Draws signature in the source image and outputs the result.static voiddrawSignature​(Mat source, Mat signature, Mat result, float radiusToShorterSideRatio)Draws signature in the source image and outputs the result.static voiddrawSignature​(Mat source, Mat signature, Mat result, float radiusToShorterSideRatio, int borderThickness)Draws signature in the source image and outputs the result.static voidgenerateInitPoints​(MatOfPoint2f initPoints, int count, int pointDistribution)Generates initial sampling points according to selected point distribution.intgetClusterMinSize()This parameter multiplied by the index of iteration gives lower limit for cluster size.intgetDistanceFunction()Distance function selector used for measuring distance between two points in k-means.floatgetDropThreshold()Remove centroids in k-means whose weight is lesser or equal to given threshold.intgetGrayscaleBits()Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used).intgetInitSeedCount()Number of initial seeds (initial number of clusters) for the k-means algorithm.MatOfIntgetInitSeedIndexes()Initial seeds (initial number of clusters) for the k-means algorithm.intgetIterationCount()Number of iterations of the k-means clustering.floatgetJoiningDistance()Threshold euclidean distance between two centroids.intgetMaxClustersCount()Maximal number of generated clusters.intgetSampleCount()Number of initial samples taken from the image.MatOfPoint2fgetSamplingPoints()Initial samples taken from the image.floatgetWeightA()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.floatgetWeightB()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.floatgetWeightContrast()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.floatgetWeightEntropy()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.floatgetWeightL()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.floatgetWeightX()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.floatgetWeightY()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.intgetWindowRadius()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).voidsetClusterMinSize​(int clusterMinSize)This parameter multiplied by the index of iteration gives lower limit for cluster size.voidsetDistanceFunction​(int distanceFunction)Distance function selector used for measuring distance between two points in k-means.voidsetDropThreshold​(float dropThreshold)Remove centroids in k-means whose weight is lesser or equal to given threshold.voidsetGrayscaleBits​(int grayscaleBits)Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used).voidsetInitSeedIndexes​(MatOfInt initSeedIndexes)Initial seed indexes for the k-means algorithm.voidsetIterationCount​(int iterationCount)Number of iterations of the k-means clustering.voidsetJoiningDistance​(float joiningDistance)Threshold euclidean distance between two centroids.voidsetMaxClustersCount​(int maxClustersCount)Maximal number of generated clusters.voidsetSamplingPoints​(MatOfPoint2f samplingPoints)Sets sampling points used to sample the input image.voidsetTranslation​(int idx, float value)Translations of the individual axes of the feature space.voidsetTranslations​(MatOfFloat translations)Translations of the individual axes of the feature space.voidsetWeight​(int idx, float value)Weights (multiplicative constants) that linearly stretch individual axes of the feature space.voidsetWeightA​(float 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.voidsetWeightB​(float 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.voidsetWeightContrast​(float 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.voidsetWeightEntropy​(float 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.voidsetWeightL​(float 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.voidsetWeights​(MatOfFloat weights)Weights (multiplicative constants) that linearly stretch individual axes of the feature space.voidsetWeightX​(float 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.voidsetWeightY​(float 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.voidsetWindowRadius​(int 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).-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
フィールドの詳細
-
L0_25
public static final int L0_25
- 関連項目:
- 定数フィールド値
-
L0_5
public static final int L0_5
- 関連項目:
- 定数フィールド値
-
L1
public static final int L1
- 関連項目:
- 定数フィールド値
-
L2
public static final int L2
- 関連項目:
- 定数フィールド値
-
L2SQUARED
public static final int L2SQUARED
- 関連項目:
- 定数フィールド値
-
L5
public static final int L5
- 関連項目:
- 定数フィールド値
-
L_INFINITY
public static final int L_INFINITY
- 関連項目:
- 定数フィールド値
-
UNIFORM
public static final int UNIFORM
- 関連項目:
- 定数フィールド値
-
REGULAR
public static final int REGULAR
- 関連項目:
- 定数フィールド値
-
NORMAL
public static final int NORMAL
- 関連項目:
- 定数フィールド値
-
MINUS
public static final int MINUS
- 関連項目:
- 定数フィールド値
-
GAUSSIAN
public static final int GAUSSIAN
- 関連項目:
- 定数フィールド値
-
HEURISTIC
public static final int HEURISTIC
- 関連項目:
- 定数フィールド値
-
-
メソッドの詳細
-
__fromPtr__
public static PCTSignatures __fromPtr__​(long addr)
-
create
public static PCTSignatures create​(int initSampleCount, int initSeedCount, int pointDistribution)
Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.- 引数:
initSampleCount- 画像サンプリングに使用する点の数。initSeedCount- 初期クラスタリングのシード数。initSampleCount以下でなければならない。pointDistribution- 生成される点の分布。デフォルト: UNIFORM。指定可能: UNIFORM, REGULAR, NORMAL。- 戻り値:
- 生成されたアルゴリズム。
-
create
public static PCTSignatures create​(int initSampleCount, int initSeedCount)
Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.- 引数:
initSampleCount- 画像サンプリングに使用する点の数。initSeedCount- 初期クラスタリングのシード数。initSampleCount以下でなければならない。指定可能: UNIFORM, REGULAR, NORMAL。- 戻り値:
- 生成されたアルゴリズム。
-
create
public static PCTSignatures create​(int initSampleCount)
Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes.- 引数:
initSampleCount- 画像サンプリングに使用する点の数。initSampleCount以下でなければならない。指定可能: UNIFORM, REGULAR, NORMAL。- 戻り値:
- 生成されたアルゴリズム。
-
create
public static PCTSignatures create()
Creates PCTSignatures algorithm using sample and seed count. It generates its own sets of sampling points and clusterization seed indexes. Must be lower or equal to initSampleCount Available: UNIFORM, REGULAR, NORMAL.- 戻り値:
- 生成されたアルゴリズム。
-
create
public static PCTSignatures create​(MatOfPoint2f initSamplingPoints, 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.- 引数:
initSamplingPoints- 画像サンプリングで使用するサンプリング点。initSeedCount- 初期クラスタリングのシード数。initSamplingPoints.size()以下でなければならない。- 戻り値:
- 生成されたアルゴリズム。
-
create
public static PCTSignatures create​(MatOfPoint2f initSamplingPoints, MatOfInt initClusterSeedIndexes)
Creates PCTSignatures algorithm using pre-generated sampling points and clusterization seeds indexes.- 引数:
initSamplingPoints- 画像サンプリングで使用するサンプリング点。initClusterSeedIndexes- クラスタリングの初期シードのインデックス。そのサイズは initSamplingPoints.size() 以下でなければならない。- 戻り値:
- 生成されたアルゴリズム。
-
computeSignature
public void computeSignature​(Mat image, Mat signature)
Computes signature of given image.- 引数:
image- CV_8U 型の入力画像。signature- 計算されたシグネチャの出力。
-
computeSignatures
public void computeSignatures​(java.util.List<Mat> images, java.util.List<Mat> signatures)
Computes signatures for multiple images in parallel.- 引数:
images- CV_8U 型の入力画像のベクトル。signatures- 計算されたシグネチャのベクトル。
-
drawSignature
public static void drawSignature​(Mat source, Mat signature, Mat result, float radiusToShorterSideRatio, int 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.- 引数:
source- 元画像。signature- 画像のシグネチャ。result- 出力結果。radiusToShorterSideRatio- 出力画像におけるシグネチャの最大半径を決定する。borderThickness- 可視化されたシグネチャの境界の太さ。
-
drawSignature
public static void drawSignature​(Mat source, Mat signature, Mat result, float radiusToShorterSideRatio)
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.- 引数:
source- 元画像。signature- 画像のシグネチャ。result- 出力結果。radiusToShorterSideRatio- 出力画像におけるシグネチャの最大半径を決定する。
-
drawSignature
public static void drawSignature​(Mat source, Mat signature, Mat result)
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.- 引数:
source- 元画像。signature- 画像のシグネチャ。result- 出力結果。
-
generateInitPoints
public static void generateInitPoints​(MatOfPoint2f initPoints, int count, int pointDistribution)
Generates initial sampling points according to selected point distribution.- 引数:
initPoints- 生成された点が保存される出力ベクトル。count- 生成する点の数。pointDistribution- 点の分布セレクタ。利用可能: UNIFORM, REGULAR, NORMAL。覚え書き: 生成される座標は範囲 [0..1) 内である
-
getSampleCount
public int getSampleCount()
Number of initial samples taken from the image.- 戻り値:
- 自動生成
-
getGrayscaleBits
public int 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.- 戻り値:
- 自動生成
-
setGrayscaleBits
public void setGrayscaleBits​(int 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.- 引数:
grayscaleBits- 自動生成
-
getWindowRadius
public int 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).- 戻り値:
- 自動生成
-
setWindowRadius
public void setWindowRadius​(int 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).- 引数:
radius- 自動生成
-
getWeightX
public float 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)- 戻り値:
- 自動生成
-
setWeightX
public void setWeightX​(float 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)- 引数:
weight- 自動生成
-
getWeightY
public float 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)- 戻り値:
- 自動生成
-
setWeightY
public void setWeightY​(float 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)- 引数:
weight- 自動生成
-
getWeightL
public float 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)- 戻り値:
- 自動生成
-
setWeightL
public void setWeightL​(float 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)- 引数:
weight- 自動生成
-
getWeightA
public float 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)- 戻り値:
- 自動生成
-
setWeightA
public void setWeightA​(float 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)- 引数:
weight- 自動生成
-
getWeightB
public float 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)- 戻り値:
- 自動生成
-
setWeightB
public void setWeightB​(float 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)- 引数:
weight- 自動生成
-
getWeightContrast
public float 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)- 戻り値:
- 自動生成
-
setWeightContrast
public void setWeightContrast​(float 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)- 引数:
weight- 自動生成
-
getWeightEntropy
public float 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)- 戻り値:
- 自動生成
-
setWeightEntropy
public void setWeightEntropy​(float 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)- 引数:
weight- 自動生成
-
getSamplingPoints
public MatOfPoint2f getSamplingPoints()
Initial samples taken from the image. These sampled features become the input for clustering.- 戻り値:
- 自動生成
-
setWeight
public void setWeight​(int idx, float value)Weights (multiplicative constants) that linearly stretch individual axes of the feature space.- 引数:
idx- 重みの IDvalue- 重みの値 覚え書き: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
-
setWeights
public void setWeights​(MatOfFloat weights)
Weights (multiplicative constants) that linearly stretch individual axes of the feature space.- 引数:
weights- すべての重みの値。覚え書き: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
-
setTranslation
public void setTranslation​(int idx, float value)Translations of the individual axes of the feature space.- 引数:
idx- 平行移動の IDvalue- 平行移動の値 覚え書き: 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
public void setTranslations​(MatOfFloat translations)
Translations of the individual axes of the feature space.- 引数:
translations- すべての平行移動の値。覚え書き: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
-
setSamplingPoints
public void setSamplingPoints​(MatOfPoint2f samplingPoints)
Sets sampling points used to sample the input image.- 引数:
samplingPoints- 範囲 [0..1) 内のサンプリング点のベクトル 覚え書き: サンプリング点の数はクラスタリングのシード数以上でなければならない。
-
getInitSeedIndexes
public MatOfInt getInitSeedIndexes()
Initial seeds (initial number of clusters) for the k-means algorithm.- 戻り値:
- 自動生成
-
setInitSeedIndexes
public void setInitSeedIndexes​(MatOfInt initSeedIndexes)
Initial seed indexes for the k-means algorithm.- 引数:
initSeedIndexes- 自動生成
-
getInitSeedCount
public int getInitSeedCount()
Number of initial seeds (initial number of clusters) for the k-means algorithm.- 戻り値:
- 自動生成
-
getIterationCount
public int 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).- 戻り値:
- 自動生成
-
setIterationCount
public void setIterationCount​(int 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).- 引数:
iterationCount- 自動生成
-
getMaxClustersCount
public int getMaxClustersCount()
Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.- 戻り値:
- 自動生成
-
setMaxClustersCount
public void setMaxClustersCount​(int maxClustersCount)
Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.- 引数:
maxClustersCount- 自動生成
-
getClusterMinSize
public int 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.- 戻り値:
- 自動生成
-
setClusterMinSize
public void setClusterMinSize​(int 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.- 引数:
clusterMinSize- 自動生成
-
getJoiningDistance
public float 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.- 戻り値:
- 自動生成
-
setJoiningDistance
public void setJoiningDistance​(float 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.- 引数:
joiningDistance- 自動生成
-
getDropThreshold
public float getDropThreshold()
Remove centroids in k-means whose weight is lesser or equal to given threshold.- 戻り値:
- 自動生成
-
setDropThreshold
public void setDropThreshold​(float dropThreshold)
Remove centroids in k-means whose weight is lesser or equal to given threshold.- 引数:
dropThreshold- 自動生成
-
getDistanceFunction
public int getDistanceFunction()
Distance function selector used for measuring distance between two points in k-means.- 戻り値:
- 自動生成
-
setDistanceFunction
public void setDistanceFunction​(int 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.- 引数:
distanceFunction- 自動生成
-
-