digiKam
Loading...
Searching...
No Matches
lensdistortionfilter.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 : 2005-05-25
7 * Description : lens distortion algorithm.
8 *
9 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2001-2003 by David Hodson <hodsond@acm.org>
11 * SPDX-FileCopyrightText: 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Local includes
20
21#include "dimgthreadedfilter.h"
22#include "digikam_export.h"
23
24namespace Digikam
25{
26
27class DIGIKAM_EXPORT LensDistortionFilter : public DImgThreadedFilter
28{
29 Q_OBJECT
30
31public:
32
33 explicit LensDistortionFilter(QObject* const parent = nullptr);
34 explicit LensDistortionFilter(DImg* const orgImage, QObject* const parent = nullptr, double main = 0.0,
35 double edge = 0.0, double rescale = 0.0, double brighten = 0.0,
36 int center_x = 0, int center_y = 0);
37
38 ~LensDistortionFilter() override;
39
40 static QString FilterIdentifier()
41 {
42 return QLatin1String("digikam:LensDistortionFilter");
43 }
44
45 static QString DisplayableName();
46
47 static QList<int> SupportedVersions()
48 {
49 return QList<int>() << 1;
50 }
51
52 static int CurrentVersion()
53 {
54 return 1;
55 }
56
57 QString filterIdentifier() const override
58 {
59 return FilterIdentifier();
60 }
61
62 FilterAction filterAction() override;
63 void readParameters(const FilterAction& action) override;
64
65private:
66
67 void filterImage() override;
68
69private:
70
71 int m_centre_x = 0;
72 int m_centre_y = 0;
73
74 double m_main = 0.0;
75 double m_edge = 0.0;
76 double m_rescale = 0.0;
77 double m_brighten = 0.0;
78};
79
80} // namespace Digikam
int main(int argc, char *argv[])
Definition CMakeCCompilerId.c:877
Definition dimgthreadedfilter.h:31
Definition dimg.h:52
Definition filteraction.h:33
Definition lensdistortionfilter.h:28
static int CurrentVersion()
Definition lensdistortionfilter.h:52
static QList< int > SupportedVersions()
Definition lensdistortionfilter.h:47
QString filterIdentifier() const override
Definition lensdistortionfilter.h:57
static QString FilterIdentifier()
Definition lensdistortionfilter.h:40
Definition datefolderview.cpp:34