digiKam
exposure_detector.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 : 28/08/2021
7  * Description : Image Quality Parser - Exposure detection
8  *
9  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2021 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_EXPOSURE_DETECTOR_H
26 #define DIGIKAM_EXPOSURE_DETECTOR_H
27 
28 // Local includes
29 
30 #include "dimg.h"
31 #include "digikam_opencv.h"
32 #include "detector.h"
33 
34 namespace Digikam
35 {
36 
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit ExposureDetector();
45 
46  float detect(const cv::Mat& image) const override;
47 
48 private:
49 
50  float percent_underexposed(const cv::Mat& image) const;
51  float percent_overexposed(const cv::Mat& image) const;
52 
53  int count_by_condition(const cv::Mat& image,
54  int minVal, int maxVal) const;
55 
56 private:
57 
58  class Private;
59  Private* const d;
60 };
61 
62 } // namespace Digikam
63 
64 #endif // DIGIKAM_EXPOSURE_DETECTOR_H
Definition: detector.h:41
Definition: exposure_detector.h:38
float detect(const cv::Mat &image) const override
Definition: exposure_detector.cpp:80
ExposureDetector()
Definition: exposure_detector.cpp:69
~ExposureDetector()
Definition: exposure_detector.cpp:75
Definition: datefolderview.cpp:43