OpenCV 4.5.3(日本語機械翻訳)
クラス | 関数
Clustering and Search in Multi-Dimensional Spaces

クラス

struct cv::flann::CvType< T >
struct cv::flann::CvType< unsigned char >
struct cv::flann::CvType< char >
struct cv::flann::CvType< unsigned short >
struct cv::flann::CvType< short >
struct cv::flann::CvType< int >
struct cv::flann::CvType< float >
struct cv::flann::CvType< double >
class cv::flann::GenericIndex< Distance >
FLANNの最近傍インデックスクラスです.このクラスは,インデックスが作成される要素の種類でテンプレート化されています.[【詳解】(英語]

関数

template<typename Distance >
int cv::flann::hierarchicalClustering (const Mat &features, Mat &centers, const ::cvflann::KMeansIndexParams &params, Distance d=Distance())
階層型k-meansアルゴリズムを用いて,特徴量をクラスタリングします.[【詳解】(英語]

詳解

This section documents OpenCV's interface to the FLANN library. FLANN (Fast Library for Approximate Nearest Neighbors) is a library that contains a collection of algorithms optimized for fast nearest neighbor search in large datasets and for high dimensional features. More information about FLANN can be found in [Muja2009] .

関数詳解

hierarchicalClustering()

template<typename Distance >
int cv::flann::hierarchicalClustering ( const Mat & features,
Mat & centers,
const ::cvflann::KMeansIndexParams & params,
Distance d = Distance()
)

階層型k-meansアルゴリズムを用いて,特徴量をクラスタリングします.

引数
features クラスタリングの対象となる点.この行列は,Distance::ElementType 型の要素を持たなければいけません.
centers 得られたクラスタの中心。この行列は,Distance::CentersType型の要素を持たなければいけません.この行列の行数は,希望するクラスタ数を表しますが,階層木の切り口が選択されるため,計算されるクラスタ数は,(branching-1)*k+1の形で,希望するクラスタ数よりも少ない最大の数になります.
params 階層化されたk-meansツリーの構築に使用されるパラメータ。
d クラスタリングに使用する距離。

このメソッドは,階層的な k-means ツリーを構築し,クラスタの分散を最小化するツリーの切り口を選択することで,与えられた特徴ベクトルをクラスタリングします.見つかったクラスターの数を返します.