digiKam
Loading...
Searching...
No Matches
kd_treesface.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam
4 *
5 * Date : 2019-06-08
6 * Description : Implementation of KD-Tree for vector space partitioning.
7 *
8 * SPDX-FileCopyrightText: 2020 by Nghia Duong <minhnghiaduong997 at gmail dot com>
9 * SPDX-FileCopyrightText: 2024 by Michael Miller <michael underscore miller at msn dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Local includes
18
19#include "kd_treebase.h"
20#include "kd_nodesface.h"
21
22namespace Digikam
23{
24
26{
27
28public:
29
30 explicit KDTreeSFace(
31 int dim,
32 int threshold = KDTREE_MAP_THRESHOLD
33 );
34 ~KDTreeSFace() override;
35
36private:
37
38 // Disable
39 KDTreeSFace(const KDTreeSFace&) = delete;
40 KDTreeSFace& operator=(const KDTreeSFace&) = delete;
41
42private:
43
44 virtual KDNodeBase* createNode(const cv::Mat& nodePos,
45 const int identity,
46 int splitAxis,
47 int dimension) override;
48
49 virtual float getCosThreshold(float sqRange) const override
50 {
51 return 1.0 + (sqRange / 10.0);
52 }
53};
54
55} // namespace Digikam
Definition kd_nodebase.h:34
Definition kd_treebase.h:44
Definition kd_treesface.h:26
~KDTreeSFace() override
Definition kd_treesface.cpp:40
#define KDTREE_MAP_THRESHOLD
Size of the vector before we start using the tree.
Definition kd_treebase.h:38
Definition datefolderview.cpp:34