![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Public Member Functions | |
KDTreeBase (int dim, int kdtreeThreshold=KDTREE_MAP_THRESHOLD) | |
Constructor of the class implementing the KD-Tree for vector space partitioning. | |
virtual KDNodeBase * | add (const cv::Mat &position, const int identity) |
add new node to KD-Tree | |
virtual KDNodeBase * | createNode (const cv::Mat &nodePos, const int identity, int splitAxis, int dimension)=0 |
create an ew node | |
virtual QMap< double, QVector< int > > | getClosestNeighbors (const cv::Mat &position, float sqRange, int maxNbNeighbors) const |
|
explicit |
dim | The dimmension of the tree. |
kdtreeThreshold | The KD-Tree threshold. Above this value, we start using the KD-Tree instead of the vector. If the vector grows to default KDTREE_MAP_THRESHOLD items, start using the KDTree. |
Using this to compare brute force vs kdtree performance due to sparse data in k-dimensions (128 dimensions for face features).
|
virtual |
position | K-dimension vector |
identity | identity of this face vector |
|
pure virtual |
nodePos | extracted face vectors |
identity | identity of this face vector |
splitAxis | current axis/dimension of the vector |
dimension | number of dimensions (usually 128) |
|
virtual |