digiKam
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 :
7  * Description : Image Quality Parser - Abtrait class for detector
8  *
9  * Copyright (C) 2013-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_DETECTOR_H
26 #define DIGIKAM_DETECTOR_H
27 
28 // Qt includes
29 
30 #include <QThread>
31 
32 // Local includes
33 
34 #include "dimg.h"
35 #include "digikam_opencv.h"
36 
37 namespace Digikam
38 {
39 
40 class DetectorDistortion : public QObject
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit DetectorDistortion(QObject* const parent = nullptr);
47  virtual ~DetectorDistortion() = default;
48 
49  virtual float detect(const cv::Mat& image) const = 0;
50 
51 public:
52 
53  static cv::Mat prepareForDetection(const DImg& inputImage);
54 };
55 
56 } // namespace Digikam
57 
58 #endif // DIGIKAM_DETECTOR_H
Definition: dimg.h:62
Definition: detector.h:41
virtual float detect(const cv::Mat &image) const =0
DetectorDistortion(QObject *const parent=nullptr)
Definition: detector.cpp:39
static cv::Mat prepareForDetection(const DImg &inputImage)
Definition: detector.cpp:46
virtual ~DetectorDistortion()=default
Definition: datefolderview.cpp:43