digiKam
Loading...
Searching...
No Matches
kd_treeopenface.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
21namespace Digikam
22{
23
25{
26
27public:
28
29 explicit KDTreeOpenFace(
30 int dim,
31 int threshold = KDTREE_MAP_THRESHOLD
32 );
33 ~KDTreeOpenFace() override;
34
35private:
36
37 // Disable
38 KDTreeOpenFace(const KDTreeOpenFace&) = delete;
39 KDTreeOpenFace& operator=(const KDTreeOpenFace&) = delete;
40
41private:
42
43 virtual KDNodeBase* createNode(const cv::Mat& nodePos,
44 const int identity,
45 int splitAxis,
46 int dimension) override;
47
48 virtual float getCosThreshold(float sqRange) const override
49 {
50 Q_UNUSED(sqRange);
51
52 return 0.8;
53 }
54};
55
56} // namespace Digikam
Definition kd_nodebase.h:34
Definition kd_treebase.h:44
Definition kd_treeopenface.h:25
~KDTreeOpenFace() override
Definition kd_treeopenface.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