digiKam
Loading...
Searching...
No Matches
blur_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 - Blur basic factor detection
8 *
9 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2021-2022 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Local includes
19
20#include "abstract_detector.h"
21
22namespace Digikam
23{
24
26{
27 Q_OBJECT
28
29public:
30
31 explicit BlurDetector(const DImg& image);
33
34 float detect(const cv::Mat& image) const override;
35
36private:
37
38 cv::Mat edgeDetection(const cv::Mat& image) const;
39 cv::Mat detectDefocusMap(const cv::Mat& edgesMap) const;
40 cv::Mat detectMotionBlurMap(const cv::Mat& edgesMap) const;
41 bool isMotionBlur(const cv::Mat& frag) const;
42
43 bool haveFocusRegion(const DImg& image) const;
44 cv::Mat detectBackgroundRegion(const cv::Mat& image) const;
45 cv::Mat getWeightMap(const cv::Mat& image) const;
46
47 // Disable
48 explicit BlurDetector(QObject*);
49
50private:
51
52 class Private;
53 Private* const d = nullptr;
54};
55
56} // namespace Digikam
Definition abstract_detector.h:31
Definition blur_detector.h:26
~BlurDetector()
Definition blur_detector.cpp:68
float detect(const cv::Mat &image) const override
Definition blur_detector.cpp:73
Definition dimg.h:52
Definition datefolderview.cpp:34