digiKam
Loading...
Searching...
No Matches
openfacepreprocessor.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2019-07-09
7 * Description : Preprocessor for openface nn model
8 *
9 * SPDX-FileCopyrightText: 2019 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com>
10 * SPDX-FileCopyrightText: 2019-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// C++ includes
19
20#include <array>
21
22// Qt includes
23
24#include <QMutex>
25
26// Local includes
27
28#include "digikam_opencv.h"
29#include "shapepredictor.h"
30
31namespace Digikam
32{
33
35{
36
37public:
38
41
45 bool loadModels();
46
47 cv::Mat process(const cv::Mat& image);
48
49private:
50
51 // Disable
53 OpenfacePreprocessor& operator=(const OpenfacePreprocessor&) = delete;
54
55private:
56
57 cv::Size outImageSize;
58
59 cv::Mat faceTemplate;
60 std::array<int, 3> outerEyesNosePositions;
61
63
64 QMutex mutex;
65};
66
67} // namespace Digikam
Definition openfacepreprocessor.h:35
bool loadModels()
Definition openfacepreprocessor.cpp:57
cv::Mat process(const cv::Mat &image)
Definition openfacepreprocessor.cpp:96
OpenfacePreprocessor()
Definition openfacepreprocessor.cpp:50
Definition shapepredictor.h:180
Definition datefolderview.cpp:34