digiKam
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  * Copyright (C) 2016 by Omar Amin <Omar dot moh dot amin at gmail dot com>
12  * Copyright (C) 2016-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_FULL_OBJECT_DETECTION_H
28 #define DIGIKAM_FULL_OBJECT_DETECTION_H
29 
30 // C++ includes
31 
32 #include <vector>
33 
34 // Local includes
35 
36 #include "digikam_opencv.h"
37 #include "digikam_export.h"
38 
39 namespace Digikam
40 {
41 
42 class DIGIKAM_EXPORT FullObjectDetection
43 {
44 public:
45 
47  explicit FullObjectDetection(const cv::Rect& rect_);
48  FullObjectDetection(const cv::Rect& rect_,
49  const std::vector<std::vector<float> >& parts_);
50 
51  const cv::Rect& get_rect() const;
52 
53  cv::Rect& get_rect();
54 
55  unsigned long num_parts() const;
56 
57  const std::vector<float>& part(unsigned long idx) const;
58 
59  std::vector<float>& part(unsigned long idx);
60 
61 private:
62 
63  cv::Rect rect;
64  std::vector<std::vector<float> > parts;
65 };
66 
67 // -------------------------------------------------------------------
68 
69 std::vector<cv::Rect> getEyes(const FullObjectDetection& shape);
70 
71 } // namespace Digikam
72 
73 #endif // DIGIKAM_FULL_OBJECT_DETECTION_H
Definition: fullobjectdetection.h:43
Definition: datefolderview.cpp:43
std::vector< cv::Rect > getEyes(const FullObjectDetection &shape)
Definition: fullobjectdetection.cpp:75