digiKam
Loading...
Searching...
No Matches
fullobjectdetection.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 : 16/08/2016
7 * Description : Full object detection class representing the output of the
8 * shape predictor class, containing 64 facial point including
9 * eye, nose, and mouth.
10 *
11 * SPDX-FileCopyrightText: 2016 by Omar Amin <Omar dot moh dot amin at gmail dot com>
12 * SPDX-FileCopyrightText: 2016-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
13 *
14 * SPDX-License-Identifier: GPL-2.0-or-later
15 *
16 * ============================================================ */
17
18#pragma once
19
20// C++ includes
21
22#include <vector>
23
24// Local includes
25
26#include "digikam_opencv.h"
27#include "digikam_export.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_EXPORT FullObjectDetection
33{
34public:
35
37 explicit FullObjectDetection(const cv::Rect& rect_);
38 FullObjectDetection(const cv::Rect& rect_,
39 const std::vector<std::vector<float> >& parts_);
40
41 const cv::Rect& get_rect() const;
42
43 cv::Rect& get_rect();
44
45 unsigned long num_parts() const;
46
47 const std::vector<float>& part(unsigned long idx) const;
48
49 std::vector<float>& part(unsigned long idx);
50
51private:
52
53 cv::Rect rect;
54 std::vector<std::vector<float> > parts;
55};
56
57// -------------------------------------------------------------------
58
59std::vector<cv::Rect> getEyes(const FullObjectDetection& shape);
60
61} // namespace Digikam
Definition fullobjectdetection.h:33
Definition datefolderview.cpp:34
std::vector< cv::Rect > getEyes(const FullObjectDetection &shape)
Definition fullobjectdetection.cpp:62