|
|
|
@ -0,0 +1,448 @@
|
|
|
|
|
commit 2ad23dae290c64c293d9c3d3ae2c8734c99f902b
|
|
|
|
|
Author: Gilles Caulier <caulier.gilles@gmail.com>
|
|
|
|
|
Date: Tue Sep 2 17:06:33 2014 +0200
|
|
|
|
|
|
|
|
|
|
Make digiKam ready to use next Lensfun API where CII correction have been removed.
|
|
|
|
|
BUGS: 331523
|
|
|
|
|
CCBUGS: 319383
|
|
|
|
|
CCBUGS: 333540
|
|
|
|
|
FIXED-IN: 4.3.0
|
|
|
|
|
|
|
|
|
|
diff --git a/imageplugins/enhance/lensautofixtool.cpp b/imageplugins/enhance/lensautofixtool.cpp
|
|
|
|
|
index 55bbc3a..b1e6510 100644
|
|
|
|
|
--- imageplugins/enhance/lensautofixtool.cpp.orig
|
|
|
|
|
+++ imageplugins/enhance/lensautofixtool.cpp
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
* Description : a plugin to fix automatically camera lens aberrations
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2008 by Adrian Schroeter <adrian at suse dot de>
|
|
|
|
|
- * Copyright (C) 2008-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2008-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
@@ -153,7 +153,6 @@ void LensAutoFixTool::slotLensChanged()
|
|
|
|
|
{
|
|
|
|
|
d->settingsView->setEnabledCCA(d->cameraSelector->iface()->supportsCCA());
|
|
|
|
|
d->settingsView->setEnabledVig(d->cameraSelector->iface()->supportsVig());
|
|
|
|
|
- d->settingsView->setEnabledCCI(d->cameraSelector->iface()->supportsVig());
|
|
|
|
|
d->settingsView->setEnabledDist(d->cameraSelector->iface()->supportsDistortion());
|
|
|
|
|
d->settingsView->setEnabledGeom(d->cameraSelector->iface()->supportsDistortion());
|
|
|
|
|
slotTimer();
|
|
|
|
|
diff --git a/imageplugins/enhance/lensautofixtool.h b/imageplugins/enhance/lensautofixtool.h
|
|
|
|
|
index 994d45a..7225101 100644
|
|
|
|
|
--- imageplugins/enhance/lensautofixtool.h.orig
|
|
|
|
|
+++ imageplugins/enhance/lensautofixtool.h
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
* Description : a plugin to fix automatically camera lens aberrations
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2008 by Adrian Schroeter <adrian at suse dot de>
|
|
|
|
|
- * Copyright (C) 2008-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2008-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
diff --git a/libs/dimg/filters/lens/lensfunfilter.cpp b/libs/dimg/filters/lens/lensfunfilter.cpp
|
|
|
|
|
index 21bfd2d..4f3eb68 100644
|
|
|
|
|
--- libs/dimg/filters/lens/lensfunfilter.cpp.orig
|
|
|
|
|
+++ libs/dimg/filters/lens/lensfunfilter.cpp
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
* Description : a tool to fix automatically camera lens aberrations
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2008 by Adrian Schroeter <adrian at suse dot de>
|
|
|
|
|
- * Copyright (C) 2008-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2008-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
@@ -123,11 +123,6 @@ void LensFunFilter::filterImage()
|
|
|
|
|
modifyFlags |= LF_MODIFY_VIGNETTING;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (d->iface->settings().filterCCI)
|
|
|
|
|
- {
|
|
|
|
|
- modifyFlags |= LF_MODIFY_CCI;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// Init lensfun lib, we are working on the full image.
|
|
|
|
|
|
|
|
|
|
lfPixelFormat colorDepth = m_orgImage.bytesDepth() == 4 ? LF_PF_U8 : LF_PF_U16;
|
|
|
|
|
@@ -156,7 +151,7 @@ void LensFunFilter::filterImage()
|
|
|
|
|
// Calc necessary steps for progress bar
|
|
|
|
|
|
|
|
|
|
int steps = ((d->iface->settings().filterCCA) ? 1 : 0) +
|
|
|
|
|
- ((d->iface->settings().filterVIG || d->iface->settings().filterCCI) ? 1 : 0) +
|
|
|
|
|
+ ((d->iface->settings().filterVIG) ? 1 : 0) +
|
|
|
|
|
((d->iface->settings().filterDST || d->iface->settings().filterGEO) ? 1 : 0);
|
|
|
|
|
|
|
|
|
|
kDebug() << "LensFun Modifier Flags: " << modflags << " Steps:" << steps;
|
|
|
|
|
@@ -216,7 +211,7 @@ void LensFunFilter::filterImage()
|
|
|
|
|
|
|
|
|
|
// Stage 2: Color Corrections: Vignetting and Color Contribution Index
|
|
|
|
|
|
|
|
|
|
- if (d->iface->settings().filterVIG || d->iface->settings().filterCCI)
|
|
|
|
|
+ if (d->iface->settings().filterVIG)
|
|
|
|
|
{
|
|
|
|
|
uchar* data = m_destImage.bits();
|
|
|
|
|
loop = 0;
|
|
|
|
|
@@ -318,8 +313,6 @@ bool LensFunFilter::registerSettingsToXmp(KExiv2Data& data) const
|
|
|
|
|
str.append("\n");
|
|
|
|
|
str.append(i18n("VIG Correction: %1", prm.filterVIG && d->iface->supportsVig() ? i18n("enabled") : i18n("disabled")));
|
|
|
|
|
str.append("\n");
|
|
|
|
|
- str.append(i18n("CCI Correction: %1", prm.filterCCI && d->iface->supportsCCI() ? i18n("enabled") : i18n("disabled")));
|
|
|
|
|
- str.append("\n");
|
|
|
|
|
str.append(i18n("DST Correction: %1", prm.filterDST && d->iface->supportsDistortion() ? i18n("enabled") : i18n("disabled")));
|
|
|
|
|
str.append("\n");
|
|
|
|
|
str.append(i18n("GEO Correction: %1", prm.filterGEO && d->iface->supportsGeometry() ? i18n("enabled") : i18n("disabled")));
|
|
|
|
|
@@ -340,7 +333,6 @@ FilterAction LensFunFilter::filterAction()
|
|
|
|
|
LensFunContainer prm = d->iface->settings();
|
|
|
|
|
action.addParameter("ccaCorrection", prm.filterCCA);
|
|
|
|
|
action.addParameter("vigCorrection", prm.filterVIG);
|
|
|
|
|
- action.addParameter("cciCorrection", prm.filterCCI);
|
|
|
|
|
action.addParameter("dstCorrection", prm.filterDST);
|
|
|
|
|
action.addParameter("geoCorrection", prm.filterGEO);
|
|
|
|
|
action.addParameter("cropFactor", prm.cropFactor);
|
|
|
|
|
@@ -359,7 +351,6 @@ void LensFunFilter::readParameters(const Digikam::FilterAction& action)
|
|
|
|
|
LensFunContainer prm = d->iface->settings();
|
|
|
|
|
prm.filterCCA = action.parameter("ccaCorrection").toBool();
|
|
|
|
|
prm.filterVIG = action.parameter("vigCorrection").toBool();
|
|
|
|
|
- prm.filterCCI = action.parameter("cciCorrection").toBool();
|
|
|
|
|
prm.filterDST = action.parameter("dstCorrection").toBool();
|
|
|
|
|
prm.filterGEO = action.parameter("geoCorrection").toBool();
|
|
|
|
|
prm.cropFactor = action.parameter("cropFactor").toDouble();
|
|
|
|
|
diff --git a/libs/dimg/filters/lens/lensfunfilter.h b/libs/dimg/filters/lens/lensfunfilter.h
|
|
|
|
|
index 665046d..65819c0 100644
|
|
|
|
|
--- libs/dimg/filters/lens/lensfunfilter.h.orig
|
|
|
|
|
+++ libs/dimg/filters/lens/lensfunfilter.h
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
* Description : a tool to fix automatically camera lens aberrations
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2008 by Adrian Schroeter <adrian at suse dot de>
|
|
|
|
|
- * Copyright (C) 2008-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2008-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
@@ -44,7 +44,6 @@ public:
|
|
|
|
|
{
|
|
|
|
|
filterCCA = true;
|
|
|
|
|
filterVIG = true;
|
|
|
|
|
- filterCCI = true;
|
|
|
|
|
filterDST = true;
|
|
|
|
|
filterGEO = true;
|
|
|
|
|
focalLength = -1.0;
|
|
|
|
|
@@ -64,7 +63,6 @@ public:
|
|
|
|
|
|
|
|
|
|
bool filterCCA; /// Chromatic Aberation Corrections
|
|
|
|
|
bool filterVIG; /// Vigneting Corrections
|
|
|
|
|
- bool filterCCI; /// Color Contribution Index Corrections
|
|
|
|
|
bool filterDST; /// Distortion Corrections
|
|
|
|
|
bool filterGEO; /// Geometry Corrections
|
|
|
|
|
|
|
|
|
|
@@ -102,12 +100,12 @@ public:
|
|
|
|
|
|
|
|
|
|
static QList<int> SupportedVersions()
|
|
|
|
|
{
|
|
|
|
|
- return QList<int>() << 1;
|
|
|
|
|
+ return QList<int>() << 1 << 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int CurrentVersion()
|
|
|
|
|
{
|
|
|
|
|
- return 1;
|
|
|
|
|
+ return 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual QString filterIdentifier() const
|
|
|
|
|
diff --git a/libs/dimg/filters/lens/lensfuniface.cpp b/libs/dimg/filters/lens/lensfuniface.cpp
|
|
|
|
|
index 78badc6..36ad91d 100644
|
|
|
|
|
--- libs/dimg/filters/lens/lensfuniface.cpp.orig
|
|
|
|
|
+++ libs/dimg/filters/lens/lensfuniface.cpp
|
|
|
|
|
@@ -133,7 +133,6 @@ void LensFunIface::setFilterSettings(const LensFunContainer& other)
|
|
|
|
|
{
|
|
|
|
|
d->settings.filterCCA = other.filterCCA;
|
|
|
|
|
d->settings.filterVIG = other.filterVIG;
|
|
|
|
|
- d->settings.filterCCI = other.filterCCI;
|
|
|
|
|
d->settings.filterDST = other.filterDST;
|
|
|
|
|
d->settings.filterGEO = other.filterGEO;
|
|
|
|
|
}
|
|
|
|
|
@@ -478,6 +477,7 @@ bool LensFunIface::supportsDistortion() const
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lfLensCalibDistortion res;
|
|
|
|
|
+
|
|
|
|
|
return d->usedLens->InterpolateDistortion(d->settings.focalLength, res);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -489,6 +489,7 @@ bool LensFunIface::supportsCCA() const
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lfLensCalibTCA res;
|
|
|
|
|
+
|
|
|
|
|
return d->usedLens->InterpolateTCA(d->settings.focalLength, res);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -500,6 +501,7 @@ bool LensFunIface::supportsVig() const
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lfLensCalibVignetting res;
|
|
|
|
|
+
|
|
|
|
|
return d->usedLens->InterpolateVignetting(d->settings.focalLength,
|
|
|
|
|
d->settings.aperture,
|
|
|
|
|
d->settings.subjectDistance, res);
|
|
|
|
|
@@ -510,11 +512,6 @@ bool LensFunIface::supportsGeometry() const
|
|
|
|
|
return supportsDistortion();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-bool LensFunIface::supportsCCI() const
|
|
|
|
|
-{
|
|
|
|
|
- return supportsVig();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
QString LensFunIface::lensFunVersion()
|
|
|
|
|
{
|
|
|
|
|
return QString("%1.%2.%3-%4").arg(LF_VERSION_MAJOR).arg(LF_VERSION_MINOR).arg(LF_VERSION_MICRO).arg(LF_VERSION_BUGFIX);
|
|
|
|
|
diff --git a/libs/dimg/filters/lens/lensfuniface.h b/libs/dimg/filters/lens/lensfuniface.h
|
|
|
|
|
index 612af38..ad137ff 100644
|
|
|
|
|
--- libs/dimg/filters/lens/lensfuniface.h.orig
|
|
|
|
|
+++ libs/dimg/filters/lens/lensfuniface.h
|
|
|
|
|
@@ -82,7 +82,6 @@ public:
|
|
|
|
|
bool supportsCCA() const;
|
|
|
|
|
bool supportsVig() const;
|
|
|
|
|
bool supportsGeometry() const;
|
|
|
|
|
- bool supportsCCI() const;
|
|
|
|
|
|
|
|
|
|
/** Return Camera maker string description found in metadata
|
|
|
|
|
*/
|
|
|
|
|
diff --git a/libs/dimg/filters/lens/lensfunsettings.cpp b/libs/dimg/filters/lens/lensfunsettings.cpp
|
|
|
|
|
index c892f0d..9aada79 100644
|
|
|
|
|
--- libs/dimg/filters/lens/lensfunsettings.cpp.orig
|
|
|
|
|
+++ libs/dimg/filters/lens/lensfunsettings.cpp
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
* Description : a tool to fix automatically camera lens aberrations
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2008 by Adrian Schroeter <adrian at suse dot de>
|
|
|
|
|
- * Copyright (C) 2008-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2008-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
@@ -45,27 +45,23 @@ public:
|
|
|
|
|
Private() :
|
|
|
|
|
filterCCA(0),
|
|
|
|
|
filterVIG(0),
|
|
|
|
|
- filterCCI(0),
|
|
|
|
|
filterDST(0),
|
|
|
|
|
filterGEO(0)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
static const QString configCCAEntry;
|
|
|
|
|
static const QString configVignettingEntry;
|
|
|
|
|
- static const QString configCCIEntry;
|
|
|
|
|
static const QString configDistortionEntry;
|
|
|
|
|
static const QString configGeometryEntry;
|
|
|
|
|
|
|
|
|
|
QCheckBox* filterCCA;
|
|
|
|
|
QCheckBox* filterVIG;
|
|
|
|
|
- QCheckBox* filterCCI;
|
|
|
|
|
QCheckBox* filterDST;
|
|
|
|
|
QCheckBox* filterGEO;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const QString LensFunSettings::Private::configCCAEntry("CCA");
|
|
|
|
|
const QString LensFunSettings::Private::configVignettingEntry("Vignetting");
|
|
|
|
|
-const QString LensFunSettings::Private::configCCIEntry("CCI");
|
|
|
|
|
const QString LensFunSettings::Private::configDistortionEntry("Distortion");
|
|
|
|
|
const QString LensFunSettings::Private::configGeometryEntry("Geometry");
|
|
|
|
|
|
|
|
|
|
@@ -86,10 +82,6 @@ LensFunSettings::LensFunSettings(QWidget* const parent)
|
|
|
|
|
d->filterVIG->setWhatsThis(i18n("Vignetting refers to an image darkening, mostly in the corners. "
|
|
|
|
|
"Optical and natural vignetting can be canceled out with this option, "
|
|
|
|
|
"whereas mechanical vignetting will not be cured."));
|
|
|
|
|
- d->filterCCI = new QCheckBox(i18n("Color"));
|
|
|
|
|
- d->filterCCI->setWhatsThis(i18n("All lenses have a slight color tinge to them, "
|
|
|
|
|
- "mostly due to the anti-reflective coating. "
|
|
|
|
|
- "The tinge can be canceled when the respective data is known for the lens."));
|
|
|
|
|
d->filterDST = new QCheckBox(i18n("Distortion"));
|
|
|
|
|
d->filterDST->setWhatsThis(i18n("Distortion refers to an image deformation, which is most pronounced "
|
|
|
|
|
"towards the corners. These Seidel aberrations are known as pincushion "
|
|
|
|
|
@@ -107,7 +99,6 @@ LensFunSettings::LensFunSettings(QWidget* const parent)
|
|
|
|
|
grid->addWidget(title, 0, 0, 1, 2);
|
|
|
|
|
grid->addWidget(d->filterCCA, 1, 0, 1, 2);
|
|
|
|
|
grid->addWidget(d->filterVIG, 2, 0, 1, 2);
|
|
|
|
|
- grid->addWidget(d->filterCCI, 3, 0, 1, 2);
|
|
|
|
|
grid->addWidget(d->filterDST, 4, 0, 1, 2);
|
|
|
|
|
grid->addWidget(d->filterGEO, 5, 0, 1, 2);
|
|
|
|
|
grid->addWidget(note, 6, 0, 1, 2);
|
|
|
|
|
@@ -121,9 +112,6 @@ LensFunSettings::LensFunSettings(QWidget* const parent)
|
|
|
|
|
connect(d->filterVIG, SIGNAL(toggled(bool)),
|
|
|
|
|
this, SIGNAL(signalSettingsChanged()));
|
|
|
|
|
|
|
|
|
|
- connect(d->filterCCI, SIGNAL(toggled(bool)),
|
|
|
|
|
- this, SIGNAL(signalSettingsChanged()));
|
|
|
|
|
-
|
|
|
|
|
connect(d->filterDST, SIGNAL(toggled(bool)),
|
|
|
|
|
this, SIGNAL(signalSettingsChanged()));
|
|
|
|
|
|
|
|
|
|
@@ -146,11 +134,6 @@ void LensFunSettings::setEnabledVig(bool b)
|
|
|
|
|
d->filterVIG->setEnabled(b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-void LensFunSettings::setEnabledCCI(bool b)
|
|
|
|
|
-{
|
|
|
|
|
- d->filterCCI->setEnabled(b);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void LensFunSettings::setEnabledDist(bool b)
|
|
|
|
|
{
|
|
|
|
|
d->filterDST->setEnabled(b);
|
|
|
|
|
@@ -165,7 +148,6 @@ void LensFunSettings::assignFilterSettings(LensFunContainer& prm)
|
|
|
|
|
{
|
|
|
|
|
prm.filterCCA = (d->filterCCA->isChecked() && d->filterCCA->isEnabled());
|
|
|
|
|
prm.filterVIG = (d->filterVIG->isChecked() && d->filterVIG->isEnabled());
|
|
|
|
|
- prm.filterCCI = (d->filterCCI->isChecked() && d->filterCCI->isEnabled());
|
|
|
|
|
prm.filterDST = (d->filterDST->isChecked() && d->filterDST->isEnabled());
|
|
|
|
|
prm.filterGEO = (d->filterGEO->isChecked() && d->filterGEO->isEnabled());
|
|
|
|
|
}
|
|
|
|
|
@@ -175,7 +157,6 @@ void LensFunSettings::setFilterSettings(const LensFunContainer& settings)
|
|
|
|
|
blockSignals(true);
|
|
|
|
|
d->filterCCA->setChecked(settings.filterCCA);
|
|
|
|
|
d->filterVIG->setChecked(settings.filterVIG);
|
|
|
|
|
- d->filterCCI->setChecked(settings.filterCCI);
|
|
|
|
|
d->filterDST->setChecked(settings.filterDST);
|
|
|
|
|
d->filterGEO->setChecked(settings.filterGEO);
|
|
|
|
|
blockSignals(false);
|
|
|
|
|
@@ -198,7 +179,6 @@ void LensFunSettings::readSettings(KConfigGroup& group)
|
|
|
|
|
LensFunContainer defaultPrm = defaultSettings();
|
|
|
|
|
prm.filterCCA = group.readEntry(d->configCCAEntry, defaultPrm.filterCCA);
|
|
|
|
|
prm.filterVIG = group.readEntry(d->configVignettingEntry, defaultPrm.filterVIG);
|
|
|
|
|
- prm.filterCCI = group.readEntry(d->configCCIEntry, defaultPrm.filterCCI);
|
|
|
|
|
prm.filterDST = group.readEntry(d->configDistortionEntry, defaultPrm.filterDST);
|
|
|
|
|
prm.filterGEO = group.readEntry(d->configGeometryEntry, defaultPrm.filterGEO);
|
|
|
|
|
setFilterSettings(prm);
|
|
|
|
|
@@ -219,11 +199,6 @@ void LensFunSettings::writeSettings(KConfigGroup& group)
|
|
|
|
|
group.writeEntry(d->configVignettingEntry, (prm.filterVIG));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (d->filterCCI->isEnabled())
|
|
|
|
|
- {
|
|
|
|
|
- group.writeEntry(d->configCCIEntry, (prm.filterCCI));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if (d->filterDST->isEnabled())
|
|
|
|
|
{
|
|
|
|
|
group.writeEntry(d->configDistortionEntry, (prm.filterDST));
|
|
|
|
|
diff --git a/libs/dimg/filters/lens/lensfunsettings.h b/libs/dimg/filters/lens/lensfunsettings.h
|
|
|
|
|
index 9f79684..193bce9 100644
|
|
|
|
|
--- libs/dimg/filters/lens/lensfunsettings.h.orig
|
|
|
|
|
+++ libs/dimg/filters/lens/lensfunsettings.h
|
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
* Description : a tool to fix automatically camera lens aberrations
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2008 by Adrian Schroeter <adrian at suse dot de>
|
|
|
|
|
- * Copyright (C) 2008-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2008-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
@@ -47,7 +47,6 @@ public:
|
|
|
|
|
|
|
|
|
|
void setEnabledCCA(bool b);
|
|
|
|
|
void setEnabledVig(bool b);
|
|
|
|
|
- void setEnabledCCI(bool b);
|
|
|
|
|
void setEnabledDist(bool b);
|
|
|
|
|
void setEnabledGeom(bool b);
|
|
|
|
|
|
|
|
|
|
diff --git a/utilities/queuemanager/basetools/enhance/lensautofix.cpp b/utilities/queuemanager/basetools/enhance/lensautofix.cpp
|
|
|
|
|
index 21c4822..3fc60cf 100644
|
|
|
|
|
--- utilities/queuemanager/basetools/enhance/lensautofix.cpp.orig
|
|
|
|
|
+++ utilities/queuemanager/basetools/enhance/lensautofix.cpp
|
|
|
|
|
@@ -6,7 +6,7 @@
|
|
|
|
|
* Date : 2010-09-18
|
|
|
|
|
* Description : lens auto-fix batch tool.
|
|
|
|
|
*
|
|
|
|
|
- * Copyright (C) 2010-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2010-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|
|
|
|
|
@@ -75,19 +75,19 @@ LensAutoFix::~LensAutoFix()
|
|
|
|
|
|
|
|
|
|
void LensAutoFix::registerSettingsWidget()
|
|
|
|
|
{
|
|
|
|
|
- m_settingsWidget = new QWidget;
|
|
|
|
|
- QLabel* note = new QLabel(i18n("<b>Use Metadata</b> option will parse images' information at "
|
|
|
|
|
- "queue run-time to find relevant lens features."));
|
|
|
|
|
+ m_settingsWidget = new QWidget;
|
|
|
|
|
+ QLabel* const note = new QLabel(i18n("<b>Use Metadata</b> option will parse images' information at "
|
|
|
|
|
+ "queue run-time to find relevant lens features."));
|
|
|
|
|
note->setWordWrap(true);
|
|
|
|
|
note->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
|
|
|
|
|
|
|
|
|
|
- d->cameraSelector = new LensFunCameraSelector();
|
|
|
|
|
- KSeparator* line = new KSeparator(Qt::Horizontal);
|
|
|
|
|
- d->settingsView = new LensFunSettings();
|
|
|
|
|
+ d->cameraSelector = new LensFunCameraSelector();
|
|
|
|
|
+ KSeparator* const line = new KSeparator(Qt::Horizontal);
|
|
|
|
|
+ d->settingsView = new LensFunSettings();
|
|
|
|
|
d->cameraSelector->setPassiveMetadataUsage(true);
|
|
|
|
|
d->cameraSelector->setEnabledUseMetadata(true);
|
|
|
|
|
|
|
|
|
|
- QGridLayout* grid = new QGridLayout(m_settingsWidget);
|
|
|
|
|
+ QGridLayout* const grid = new QGridLayout(m_settingsWidget);
|
|
|
|
|
grid->addWidget(note, 0, 0, 1, 2);
|
|
|
|
|
grid->addWidget(d->cameraSelector, 1, 0, 1, 2);
|
|
|
|
|
grid->addWidget(line, 2, 0, 1, 2);
|
|
|
|
|
@@ -112,7 +112,6 @@ BatchToolSettings LensAutoFix::defaultSettings()
|
|
|
|
|
prm.insert("UseMetadata", true);
|
|
|
|
|
prm.insert("filterCCA", true);
|
|
|
|
|
prm.insert("filterVIG", true);
|
|
|
|
|
- prm.insert("filterCCI", true);
|
|
|
|
|
prm.insert("filterDST", true);
|
|
|
|
|
prm.insert("filterGEO", true);
|
|
|
|
|
|
|
|
|
|
@@ -134,7 +133,6 @@ void LensAutoFix::slotAssignSettings2Widget()
|
|
|
|
|
LensFunContainer lfPrm;
|
|
|
|
|
lfPrm.filterCCA = settings()["filterCCA"].toBool();
|
|
|
|
|
lfPrm.filterVIG = settings()["filterVIG"].toBool();
|
|
|
|
|
- lfPrm.filterCCI = settings()["filterCCI"].toBool();
|
|
|
|
|
lfPrm.filterDST = settings()["filterDST"].toBool();
|
|
|
|
|
lfPrm.filterGEO = settings()["filterGEO"].toBool();
|
|
|
|
|
|
|
|
|
|
@@ -155,7 +153,6 @@ void LensAutoFix::slotSettingsChanged()
|
|
|
|
|
// Update checkbox options about Lens corrections available.
|
|
|
|
|
d->settingsView->setEnabledCCA(d->cameraSelector->useMetadata() ? true : d->cameraSelector->iface()->supportsCCA());
|
|
|
|
|
d->settingsView->setEnabledVig(d->cameraSelector->useMetadata() ? true : d->cameraSelector->iface()->supportsVig());
|
|
|
|
|
- d->settingsView->setEnabledCCI(d->cameraSelector->useMetadata() ? true : d->cameraSelector->iface()->supportsVig());
|
|
|
|
|
d->settingsView->setEnabledDist(d->cameraSelector->useMetadata() ? true : d->cameraSelector->iface()->supportsDistortion());
|
|
|
|
|
d->settingsView->setEnabledGeom(d->cameraSelector->useMetadata() ? true : d->cameraSelector->iface()->supportsDistortion());
|
|
|
|
|
|
|
|
|
|
@@ -166,7 +163,6 @@ void LensAutoFix::slotSettingsChanged()
|
|
|
|
|
|
|
|
|
|
prm.insert("filterCCA", (bool)settings.filterCCA);
|
|
|
|
|
prm.insert("filterVIG", (bool)settings.filterVIG);
|
|
|
|
|
- prm.insert("filterCCI", (bool)settings.filterCCI);
|
|
|
|
|
prm.insert("filterDST", (bool)settings.filterDST);
|
|
|
|
|
prm.insert("filterGEO", (bool)settings.filterGEO);
|
|
|
|
|
|
|
|
|
|
@@ -210,7 +206,6 @@ bool LensAutoFix::toolOperations()
|
|
|
|
|
{
|
|
|
|
|
prm.filterCCA = settings()["filterCCA"].toBool();
|
|
|
|
|
prm.filterVIG = settings()["filterVIG"].toBool();
|
|
|
|
|
- prm.filterCCI = settings()["filterCCI"].toBool();
|
|
|
|
|
prm.filterDST = settings()["filterDST"].toBool();
|
|
|
|
|
prm.filterGEO = settings()["filterGEO"].toBool();
|
|
|
|
|
|
|
|
|
|
diff --git a/utilities/queuemanager/basetools/enhance/lensautofix.h b/utilities/queuemanager/basetools/enhance/lensautofix.h
|
|
|
|
|
index d6ab8b4..6d4bf19 100644
|
|
|
|
|
--- utilities/queuemanager/basetools/enhance/lensautofix.h.orig
|
|
|
|
|
+++ utilities/queuemanager/basetools/enhance/lensautofix.h
|
|
|
|
|
@@ -6,7 +6,7 @@
|
|
|
|
|
* Date : 2010-09-18
|
|
|
|
|
* Description : lens auto-fix batch tool.
|
|
|
|
|
*
|
|
|
|
|
- * Copyright (C) 2010-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
+ * Copyright (C) 2010-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
|
* and/or modify it under the terms of the GNU General
|