[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [digikam] /: new debug space
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2015-11-01 7:29:16
Message-ID: E1Zsn4m-0007KE-Pu () scm ! kde ! org
[Download RAW message or body]
Git commit a314b464c6a0958157e77ba0e61458f64f54e3c8 by Gilles Caulier.
Committed on 01/11/2015 at 07:27.
Pushed by cgilles into branch 'master'.
new debug space
M +1 -0 app/utils/digikam_debug.cpp
M +1 -0 app/utils/digikam_debug.h
M +7 -7 libs/facesengine/alignment-congealing/funnelreal.cpp
M +3 -3 libs/facesengine/alignment-flandmark/flandmarkaligner.cpp
M +2 -2 libs/facesengine/database/databasefaceaccess.cpp
M +15 -15 libs/facesengine/database/databasefaceconfigelement.cpp
M +2 -2 libs/facesengine/database/databasefacecontainers.cpp
M +29 -29 libs/facesengine/database/databasefacecorebackend.cpp
M +3 -3 libs/facesengine/database/databasefaceschemaupdater.cpp
M +9 -9 libs/facesengine/database/trainingdb.cpp
M +20 -20 libs/facesengine/detection/opencvfacedetector.cpp
M +3 -3 libs/facesengine/facedetector.cpp
M +4 -4 libs/facesengine/recognition-opencv-lbph/facerec_borrowed.cpp
M +2 -2 libs/facesengine/recognition-opencv-lbph/lbphfacemodel.cpp
M +1 -1 libs/facesengine/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp
M +13 -13 libs/facesengine/recognitiondatabase.cpp
http://commits.kde.org/digikam/a314b464c6a0958157e77ba0e61458f64f54e3c8
diff --git a/app/utils/digikam_debug.cpp b/app/utils/digikam_debug.cpp
index abf587a..9af9747 100644
--- a/app/utils/digikam_debug.cpp
+++ b/app/utils/digikam_debug.cpp
@@ -30,6 +30,7 @@ Q_LOGGING_CATEGORY(DIGIKAM_DATABASESERVER_LOG, \
"digikam.databaseserver") Q_LOGGING_CATEGORY(DIGIKAM_IMPORTUI_LOG, \
"digikam.import") Q_LOGGING_CATEGORY(DIGIKAM_METAENGINE_LOG, \
"digikam.metaengine") Q_LOGGING_CATEGORY(DIGIKAM_RAWENGINE_LOG, \
"digikam.rawengine") +Q_LOGGING_CATEGORY(DIGIKAM_FACESENGINE_LOG, \
"digikam.facesengine") Q_LOGGING_CATEGORY(DIGIKAM_GEOIFACE_LOG, \
"digikam.geoiface")
// NOTE: per default only warnings and more severe messages are logged for other \
than general category
diff --git a/app/utils/digikam_debug.h b/app/utils/digikam_debug.h
index e5d34d1..8a1a7e6 100644
--- a/app/utils/digikam_debug.h
+++ b/app/utils/digikam_debug.h
@@ -38,6 +38,7 @@ DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_IMAGEPLUGINS_LOG)
DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_DATABASESERVER_LOG)
DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_IMPORTUI_LOG)
DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_METAENGINE_LOG)
+DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_FACESENGINE_LOG)
DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_RAWENGINE_LOG)
DIGIKAM_EXPORT Q_DECLARE_LOGGING_CATEGORY(DIGIKAM_GEOIFACE_LOG)
diff --git a/libs/facesengine/alignment-congealing/funnelreal.cpp \
b/libs/facesengine/alignment-congealing/funnelreal.cpp index 0c26dc2..a4942e4 100644
--- a/libs/facesengine/alignment-congealing/funnelreal.cpp
+++ b/libs/facesengine/alignment-congealing/funnelreal.cpp
@@ -76,25 +76,25 @@ public:
/*
if(outerDimW - innerDimW < 2*windowSize)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "difference between outerDimW and \
innerDimW is not greater than window size for SIFT descriptor)"; + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "difference between outerDimW and innerDimW is \
not greater than window size for SIFT descriptor)"; return -1;
}
if( (outerDimW - innerDimW) % 2 != 0)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "shrinking innerDimW by 1 so outerDimW - \
innerDimW is divisible by 2"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"shrinking innerDimW by 1 so outerDimW - innerDimW is divisible by \
2";
--innerDimW;
}
if(outerDimH - innerDimH < 2*windowSize)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "difference between outerDimH and \
innerDimH is not greater than window size for SIFT descriptor)"; + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "difference between outerDimH and innerDimH is \
not greater than window size for SIFT descriptor)"; return -1;
}
if( (outerDimH - innerDimH) % 2 != 0)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "shrinking innerDimH by 1 so outerDimH - \
innerDimH is divisible by 2"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"shrinking innerDimH by 1 so outerDimH - innerDimH is divisible by \
2";
--innerDimH;
}
*/
@@ -170,7 +170,7 @@ FunnelReal::FunnelReal()
if (!QFileInfo(trainingFile).exists())
{
- qCritical(DIGIKAM_GENERAL_LOG) << "Training data for Congealing/Funnel not \
found. Should be at" << trainingFile; + qCritical(DIGIKAM_FACESENGINE_LOG) << \
"Training data for Congealing/Funnel not found. Should be at" << trainingFile; \
return; }
@@ -270,11 +270,11 @@ void FunnelReal::Private::loadTrainingData(const QString& path)
}
catch (const std::ifstream::failure& e)
{
- qCritical(DIGIKAM_GENERAL_LOG) << "Error loading Congealing/Funnel training \
data:" << e.what(); + qCritical(DIGIKAM_FACESENGINE_LOG) << "Error loading \
Congealing/Funnel training data:" << e.what(); }
catch(...)
{
- qCritical(DIGIKAM_GENERAL_LOG) << "Default exception";
+ qCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception";
}
computeGaussian(Gaussian, windowSize);
diff --git a/libs/facesengine/alignment-flandmark/flandmarkaligner.cpp \
b/libs/facesengine/alignment-flandmark/flandmarkaligner.cpp index 67089da..d926f46 \
100644
--- a/libs/facesengine/alignment-flandmark/flandmarkaligner.cpp
+++ b/libs/facesengine/alignment-flandmark/flandmarkaligner.cpp
@@ -80,7 +80,7 @@ FlandmarkAligner::FlandmarkAligner()
if (!QFileInfo(modelData).exists())
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Model data for Congealing/Funnel not \
found. Should be at" << modelData; + qCCritical(DIGIKAM_FACESENGINE_LOG) << \
"Model data for Congealing/Funnel not found. Should be at" << modelData; return;
}
@@ -111,7 +111,7 @@ cv::Mat FlandmarkAligner::align(const cv::Mat& inputImage)
image = inputImage;
}
- qCDebug(DIGIKAM_GENERAL_LOG) << "Detecting" << d->model->data.options.M << \
"landmarks"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Detecting" << \
d->model->data.options.M << "landmarks"; QVector<double> \
landmarks(2*d->model->data.options.M);
// bbox with detected face (format: top_left_col top_left_row bottom_right_col \
bottom_right_row)
int bbox[] = {30,30,120,120}; //{ 0, 0, image.cols, image.rows };
@@ -120,7 +120,7 @@ cv::Mat FlandmarkAligner::align(const cv::Mat& inputImage)
for (int i = 0; i < d->model->data.options.M; i++)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Landmark" << i << landmarks.at(2*i) << ", " \
<< landmarks.at(2*i+1); + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Landmark" << i \
<< landmarks.at(2*i) << ", " << landmarks.at(2*i+1); }
return inputImage;
diff --git a/libs/facesengine/database/databasefaceaccess.cpp \
b/libs/facesengine/database/databasefaceaccess.cpp index 4e10d7e..6d0ccbb 100644
--- a/libs/facesengine/database/databasefaceaccess.cpp
+++ b/libs/facesengine/database/databasefaceaccess.cpp
@@ -202,7 +202,7 @@ bool DatabaseFaceAccess::checkReadyForUse(DatabaseFaceAccessData* \
const d, Datab
if (!drivers.contains(QString::fromLatin1("QSQLITE")))
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "No SQLite3 driver available. List of \
QSqlDatabase drivers: " << drivers; + qCWarning(DIGIKAM_FACESENGINE_LOG) << \
"No SQLite3 driver available. List of QSqlDatabase drivers: " << \
drivers;
d->lastError = i18n("The driver \"SQLITE\" for SQLite3 databases is not \
available.\n"
"digiKam depends on the drivers provided by the SQL \
module of Qt."); return false;
@@ -213,7 +213,7 @@ bool DatabaseFaceAccess::checkReadyForUse(DatabaseFaceAccessData* \
const d, Datab
if (!d->backend)
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "No database backend available in \
checkReadyForUse. " + qCWarning(DIGIKAM_FACESENGINE_LOG) << "No database \
backend available in checkReadyForUse. " "Did you call setParameters before?";
return false;
}
diff --git a/libs/facesengine/database/databasefaceconfigelement.cpp \
b/libs/facesengine/database/databasefaceconfigelement.cpp index f5904bc..ba1b7f7 \
100644
--- a/libs/facesengine/database/databasefaceconfigelement.cpp
+++ b/libs/facesengine/database/databasefaceconfigelement.cpp
@@ -74,7 +74,7 @@ DatabaseFaceConfigElementLoader::DatabaseFaceConfigElementLoader()
if (!isValid)
{
- qCWarning(DIGIKAM_GENERAL_LOG) << errorMessage;
+ qCWarning(DIGIKAM_FACESENGINE_LOG) << errorMessage;
}
}
@@ -85,7 +85,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (!databaseElement.hasAttribute(QString::fromLatin1("name")))
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing statement attribute <name>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing statement attribute <name>.";
}
configElement.databaseID = \
databaseElement.attribute(QString::fromLatin1("name")); @@ -93,7 +93,7 @@ \
DatabaseFaceConfigElement DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <databaseName>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <databaseName>.";
}
configElement.databaseName = element.text();
@@ -101,7 +101,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <userName>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <userName>.";
}
configElement.userName = element.text();
@@ -109,7 +109,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <password>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <password>.";
}
configElement.password = element.text();
@@ -117,7 +117,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <hostName>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <hostName>.";
}
configElement.hostName = element.text();
@@ -125,7 +125,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <port>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <port>.";
}
configElement.port = element.text();
@@ -133,7 +133,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <connectoptions>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <connectoptions>.";
}
configElement.connectOptions = element.text();
@@ -141,7 +141,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <dbservercmd>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <dbservercmd>.";
}
configElement.dbServerCmd = element.text();
@@ -149,7 +149,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <dbinitcmd>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <dbinitcmd>.";
}
configElement.dbInitCmd = element.text();
@@ -157,7 +157,7 @@ DatabaseFaceConfigElement \
DatabaseFaceConfigElementLoader::readDatabase(QDomElem
if (element.isNull())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing element <dbactions>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing element <dbactions>.";
}
readDBActions(element, configElement);
@@ -173,12 +173,12 @@ void \
DatabaseFaceConfigElementLoader::readDBActions(QDomElement& sqlStatementEle {
if (!dbActionElement.hasAttribute(QString::fromLatin1("name")))
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing statement attribute <name>.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing statement attribute \
<name>."; }
DatabaseAction action;
action.name = dbActionElement.attribute(QString::fromLatin1("name"));
- //qCDebug(DIGIKAM_GENERAL_LOG) << "Getting attribute " << \
dbActionElement.attribute("name"); + //qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"Getting attribute " << dbActionElement.attribute("name");
if (dbActionElement.hasAttribute(QString::fromLatin1("mode")))
{
@@ -191,7 +191,7 @@ void DatabaseFaceConfigElementLoader::readDBActions(QDomElement& \
sqlStatementEle {
if (!databaseElement.hasAttribute(QString::fromLatin1("mode")))
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Missing statement attribute \
<mode>."; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Missing statement \
attribute <mode>."; }
DatabaseActionElement actionElement;
@@ -251,7 +251,7 @@ bool DatabaseFaceConfigElementLoader::readConfig()
QDomElement versionElement = \
element.namedItem(QString::fromLatin1("version")).toElement(); int version = 0;
- qCDebug(DIGIKAM_GENERAL_LOG) << versionElement.isNull() << versionElement.text() \
<< versionElement.text().toInt() << dbconfig_xml_version; + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << versionElement.isNull() << versionElement.text() \
<< versionElement.text().toInt() << dbconfig_xml_version;
if (!versionElement.isNull())
{
diff --git a/libs/facesengine/database/databasefacecontainers.cpp \
b/libs/facesengine/database/databasefacecontainers.cpp index 0b85c97..5cff7b5 100644
--- a/libs/facesengine/database/databasefacecontainers.cpp
+++ b/libs/facesengine/database/databasefacecontainers.cpp
@@ -55,12 +55,12 @@ cv::Mat OpenCVMatData::toMat() const
if (data.isEmpty())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Array data to clone is empty.";
+ qCWarning(DIGIKAM_FACESENGINE_LOG) << "Array data to clone is empty.";
}
cv::Mat mat(rows, cols, type, (void*)data.constData());
- qCDebug(DIGIKAM_GENERAL_LOG) << "Clone Array size [" << rows << ", " << cols << \
"] of type " << type; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Clone Array size [" \
<< rows << ", " << cols << "] of type " << type;
return mat.clone();
}
diff --git a/libs/facesengine/database/databasefacecorebackend.cpp \
b/libs/facesengine/database/databasefacecorebackend.cpp index 4074cf5..e448a53 100644
--- a/libs/facesengine/database/databasefacecorebackend.cpp
+++ b/libs/facesengine/database/databasefacecorebackend.cpp
@@ -101,7 +101,7 @@ DatabaseThreadData::~DatabaseThreadData()
{
if (transactionCount)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "WARNING !!! Transaction count is" << \
transactionCount << "when destroying database!!!"; + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "WARNING !!! Transaction count is" << \
transactionCount << "when destroying database!!!"; }
closeDatabase();
}
@@ -188,7 +188,7 @@ QSqlDatabase DatabaseFaceCoreBackendPrivate::databaseForThread()
}
else
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error while opening the database. Error \
was" << threadData->database.lastError(); + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error while opening the database. Error was" << \
threadData->database.lastError(); }
}
@@ -325,7 +325,7 @@ bool \
DatabaseFaceCoreBackendPrivate::checkRetrySQLiteLocqCritical(int retries) {
if (!(retries % 25))
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Database is locked. Waited" << retries*10;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Database is locked. Waited" << \
retries*10; }
const int uiMaxRetries = 50;
@@ -335,7 +335,7 @@ bool \
DatabaseFaceCoreBackendPrivate::checkRetrySQLiteLocqCritical(int retries) {
if (retries > (isInUIThread() ? uiMaxRetries : maxRetries))
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Detected locked database file. There \
is an active transaction. Waited but giving up now."; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "Detected locked database file. There is an \
active transaction. Waited but giving up now."; return false;
}
}
@@ -347,7 +347,7 @@ bool \
DatabaseFaceCoreBackendPrivate::checkRetrySQLiteLocqCritical(int retries)
void DatabaseFaceCoreBackendPrivate::debugOutputFailedQuery(const QSqlQuery& query) \
const {
- qCDebug(DIGIKAM_GENERAL_LOG) << "Failure executing query:\n"
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Failure executing query:\n"
<< query.executedQuery()
<< "\nError messages:" << query.lastError().driverText() << \
query.lastError().databaseText() << query.lastError().number() << \
query.lastError().type() @@ -356,7 +356,7 @@ void \
DatabaseFaceCoreBackendPrivate::debugOutputFailedQuery(const QSqlQuery& que
void DatabaseFaceCoreBackendPrivate::debugOutputFailedTransaction(const QSqlError& \
error) const {
- qCDebug(DIGIKAM_GENERAL_LOG) << "Failure executing transaction. Error \
messages:\n" + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Failure executing transaction. \
Error messages:\n" << error.driverText() << error.databaseText()
<< error.number() << error.type();
}
@@ -446,7 +446,7 @@ bool DatabaseFaceCoreBackendPrivate::handleWithErrorHandler(const \
SqlQuery* cons }
else
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Failed to invoke \
DatabaseErrorHandler. Aborting all queries."; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "Failed to invoke DatabaseErrorHandler. \
Aborting all queries."; operationStatus = DatabaseFaceCoreBackend::AbortQueries;
}
@@ -599,7 +599,7 @@ DatabaseAction DatabaseFaceCoreBackend::getDBAction(const \
QString& actionName) c
if (action.name.isNull())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "No DB action defined for" << actionName \
<< "! Implementation missing for this database type."; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "No DB action defined for" << actionName << "! \
Implementation missing for this database type."; }
return action;
@@ -633,12 +633,12 @@ DatabaseFaceCoreBackend::QueryState \
DatabaseFaceCoreBackend::execDBAction(const
if (action.name.isNull())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Attempt to execute null action";
+ qCWarning(DIGIKAM_FACESENGINE_LOG) << "Attempt to execute null action";
return DatabaseFaceCoreBackend::SQLError;
}
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Executing DBAction ["<< action.name <<"]";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Executing DBAction ["<< action.name \
<<"]"; #endif
bool wrapInTransaction = (action.mode == QString::fromLatin1("transaction"));
@@ -663,13 +663,13 @@ DatabaseFaceCoreBackend::QueryState \
DatabaseFaceCoreBackend::execDBAction(const
if (result != DatabaseFaceCoreBackend::NoErrors)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error while executing DBAction ["<< \
action.name <<"] Statement ["<<actionElement.statement<<"]"; + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error while executing DBAction ["<< action.name \
<<"] Statement ["<<actionElement.statement<<"]"; returnResult = result;
/*
if (wrapInTransaction && !db.rollback())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error while rollback changes of \
previous DBAction."; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error \
while rollback changes of previous DBAction."; }
*/
@@ -685,7 +685,7 @@ DatabaseFaceCoreBackend::QueryState \
DatabaseFaceCoreBackend::execDBAction(const /*
if (returnResult==DatabaseFaceCoreBackend::NoErrors && wrapInTransaction && \
!db.commit()) {
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error while committing changes of previous \
DBAction."; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error while committing \
changes of previous DBAction."; }
*/
@@ -704,7 +704,7 @@ QSqlQuery DatabaseFaceCoreBackend::execDBActionQuery(const \
DatabaseAction& actio QSqlDatabase db = d->databaseForThread();
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Executing DBAction ["<< action.name <<"]";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Executing DBAction ["<< action.name \
<<"]"; #endif
QSqlQuery result;
@@ -717,12 +717,12 @@ QSqlQuery DatabaseFaceCoreBackend::execDBActionQuery(const \
DatabaseAction& actio }
else
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error, only DBActions with mode 'query' \
are allowed at this call!"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error, \
only DBActions with mode 'query' are allowed at this call!"; }
if (result.lastError().isValid() && result.lastError().number())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error while executing DBAction [" << \
action.name + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error while executing \
DBAction [" << action.name
<< "] Statement [" << actionElement.statement
<< "] Errornr. [" << result.lastError() << "]";
break;
@@ -761,7 +761,7 @@ bool DatabaseFaceCoreBackend::open(const DatabaseFaceParameters& \
parameters)
if (!database.isOpen())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Error while opening the database. \
Trying again."; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Error while opening \
the database. Trying again.";
if (connectionErrorHandling(retries++))
{
@@ -857,7 +857,7 @@ QList<QVariant> DatabaseFaceCoreBackend::readToList(SqlQuery& \
query) }
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Setting result value list ["<< list <<"]";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Setting result value list ["<< list <<"]";
#endif
return list;
}
@@ -994,7 +994,7 @@ SqlQuery DatabaseFaceCoreBackend::execQuery(const QString& sql, \
const QVariant& {
SqlQuery query = prepareQuery(sql);
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Trying to sql ["<< sql <<"] query \
["<<query.lastQuery()<<"]"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Trying to sql \
["<< sql <<"] query ["<<query.lastQuery()<<"]"; #endif
execQuery(query, boundValue1);
return query;
@@ -1036,7 +1036,7 @@ SqlQuery DatabaseFaceCoreBackend::execQuery(const QString& sql)
{
SqlQuery query = prepareQuery(sql);
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG)<<"execQuery: Using statement ["<< query.lastQuery() \
<<"]"; + qCDebug(DIGIKAM_FACESENGINE_LOG)<<"execQuery: Using statement ["<< \
query.lastQuery() <<"]"; #endif
exec(query);
return query;
@@ -1099,7 +1099,7 @@ SqlQuery DatabaseFaceCoreBackend::execQuery(const QString& sql, \
const QMap<QStri if (!bindingMap.isEmpty())
{
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG)<<"Prepare statement ["<< preparedString <<"] \
with binding map ["<< bindingMap <<"]"; + \
qCDebug(DIGIKAM_FACESENGINE_LOG)<<"Prepare statement ["<< preparedString <<"] with \
binding map ["<< bindingMap <<"]"; #endif
QRegExp identifierRegExp(QString::fromLatin1(":[A-Za-z0-9]+"));
@@ -1111,7 +1111,7 @@ SqlQuery DatabaseFaceCoreBackend::execQuery(const QString& sql, \
const QMap<QStri
if (!bindingMap.contains(namedPlaceholder))
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Missing place holder" << \
namedPlaceholder + qCWarning(DIGIKAM_FACESENGINE_LOG) << "Missing \
place holder" << namedPlaceholder
<< "in binding map. The following values are \
defined for this action:"
<< bindingMap.keys() <<". This is a setup \
error!";
//TODO What should we do here? How can we cancel that action?
@@ -1214,7 +1214,7 @@ SqlQuery DatabaseFaceCoreBackend::execQuery(const QString& sql, \
const QMap<QStri else
{
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG)<<"Bind key ["<< namedPlaceholder <<"] \
to value ["<< bindingMap[namedPlaceholder] <<"]"; + \
qCDebug(DIGIKAM_FACESENGINE_LOG)<<"Bind key ["<< namedPlaceholder <<"] to value ["<< \
bindingMap[namedPlaceholder] <<"]"; #endif
valuesToBind.append(placeHolderValue);
@@ -1227,7 +1227,7 @@ SqlQuery DatabaseFaceCoreBackend::execQuery(const QString& sql, \
const QMap<QStri }
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG)<<"Prepared statement ["<< preparedString <<"] \
values ["<< valuesToBind <<"]"; + qCDebug(DIGIKAM_FACESENGINE_LOG)<<"Prepared \
statement ["<< preparedString <<"] values ["<< valuesToBind <<"]"; #endif
SqlQuery query = prepareQuery(preparedString);
@@ -1404,7 +1404,7 @@ bool DatabaseFaceCoreBackend::exec(SqlQuery& query)
forever
{
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Trying to query ["<<query.lastQuery()<<"] \
values ["<< query.boundValues() <<"]"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"Trying to query ["<<query.lastQuery()<<"] values ["<< query.boundValues() <<"]"; \
#endif
if (query.exec())
@@ -1474,7 +1474,7 @@ SqlQuery DatabaseFaceCoreBackend::prepareQuery(const QString& \
sql) }
else
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Prepare failed!";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Prepare failed!";
if (queryErrorHandling(query, retries++))
{
@@ -1492,7 +1492,7 @@ SqlQuery DatabaseFaceCoreBackend::copyQuery(const SqlQuery& \
old) {
SqlQuery query = getQuery();
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Last query was ["<<old.lastQuery()<<"]";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Last query was ["<<old.lastQuery()<<"]";
#endif
query.prepare(old.lastQuery());
query.setForwardOnly(old.isForwardOnly());
@@ -1503,7 +1503,7 @@ SqlQuery DatabaseFaceCoreBackend::copyQuery(const SqlQuery& \
old) foreach(const QVariant& value, boundValues)
{
#ifdef DATABASCOREBACKEND_DEBUG
- qCDebug(DIGIKAM_GENERAL_LOG) << "Bind value to query ["<<value<<"]";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Bind value to query ["<<value<<"]";
#endif
query.addBindValue(value);
}
@@ -1591,7 +1591,7 @@ DatabaseFaceCoreBackend::QueryState \
DatabaseFaceCoreBackend::commitTransaction() }
else
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Failed to commit transaction. \
Starting rollback."; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Failed \
to commit transaction. Starting rollback."; db.rollback();
if (lastError.type() == QSqlError::ConnectionError)
diff --git a/libs/facesengine/database/databasefaceschemaupdater.cpp \
b/libs/facesengine/database/databasefaceschemaupdater.cpp index d11e844..0fc4789 \
100644
--- a/libs/facesengine/database/databasefaceschemaupdater.cpp
+++ b/libs/facesengine/database/databasefaceschemaupdater.cpp
@@ -110,7 +110,7 @@ bool DatabaseFaceSchemaUpdater::startUpdates()
// Find out schema version of db file
QString version = \
d->access->db()->setting(QString::fromLatin1("DBVersion"));
QString versionRequired = \
d->access->db()->setting(QString::fromLatin1("DBVersionRequired"));
- qCDebug(DIGIKAM_GENERAL_LOG) << "Have a database structure version " << \
version; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Have a database structure \
version " << version;
// mini schema update
if (version.isEmpty() && d->access->parameters().isSQLite())
@@ -122,7 +122,7 @@ bool DatabaseFaceSchemaUpdater::startUpdates()
if (version.isEmpty())
{
// Something is damaged. Give up.
- qCWarning(DIGIKAM_GENERAL_LOG) << "DBVersion not available! Giving up \
schema upgrading."; + qCWarning(DIGIKAM_FACESENGINE_LOG) << "DBVersion not \
available! Giving up schema upgrading.";
QString errorMsg = i18n("The database is not valid: "
"the \"DBVersion\" setting does not exist. "
@@ -177,7 +177,7 @@ bool DatabaseFaceSchemaUpdater::startUpdates()
}
else
{
- //qCDebug(DIGIKAM_GENERAL_LOG) << "No database file available";
+ //qCDebug(DIGIKAM_FACESENGINE_LOG) << "No database file available";
DatabaseFaceParameters parameters = d->access->parameters();
// No legacy handling: start with a fresh db
diff --git a/libs/facesengine/database/trainingdb.cpp \
b/libs/facesengine/database/trainingdb.cpp index b747195..d345ae2 100644
--- a/libs/facesengine/database/trainingdb.cpp
+++ b/libs/facesengine/database/trainingdb.cpp
@@ -185,7 +185,7 @@ void TrainingDB::updateLBPHFaceModel(LBPHFaceModel& model)
if (data.data.isEmpty())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Histogram data to commit in \
database are empty for Identity " << metadata.identity; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "Histogram data to commit in database are empty \
for Identity " << metadata.identity; }
else
{
@@ -193,7 +193,7 @@ void TrainingDB::updateLBPHFaceModel(LBPHFaceModel& model)
if (compressed.isEmpty())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Cannot compress histogram \
data to commit in database for Identity " << metadata.identity; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "Cannot compress histogram data to commit in \
database for Identity " << metadata.identity; }
else
{
@@ -214,7 +214,7 @@ void TrainingDB::updateLBPHFaceModel(LBPHFaceModel& model)
model.setWrittenToDatabase(i, insertedId.toInt());
- qCDebug(DIGIKAM_GENERAL_LOG) << "Commit compressed histogram " \
<< metadata.databaseId << " for identity " << metadata.identity << " with size " << \
compressed.size(); + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Commit \
compressed histogram " << metadata.databaseId << " for identity " << \
metadata.identity << " with size " << compressed.size(); }
}
}
@@ -224,7 +224,7 @@ void TrainingDB::updateLBPHFaceModel(LBPHFaceModel& model)
LBPHFaceModel TrainingDB::lbphFaceModel() const
{
QVariantList values;
- //qCDebug(DIGIKAM_GENERAL_LOG) << "Loading LBPH model";
+ //qCDebug(DIGIKAM_FACESENGINE_LOG) << "Loading LBPH model";
d->db->execSql(QString::fromLatin1("SELECT id, version, radius, neighbors, \
grid_x, grid_y FROM OpenCVLBPHRecognizer"), &values);
for (QList<QVariant>::const_iterator it = values.constBegin(); it != \
values.constEnd();) @@ -232,14 +232,14 @@ LBPHFaceModel TrainingDB::lbphFaceModel() \
const LBPHFaceModel model;
model.databaseId = it->toInt();
++it;
- //qCDebug(DIGIKAM_GENERAL_LOG) << "Found model id" << model.databaseId;
+ //qCDebug(DIGIKAM_FACESENGINE_LOG) << "Found model id" << model.databaseId;
int version = it->toInt();
++it;
if (version > LBPHStorageVersion)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Unsupported LBPH storage version" << \
version; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Unsupported LBPH storage \
version" << version; it += 4;
continue;
}
@@ -281,11 +281,11 @@ LBPHFaceModel TrainingDB::lbphFaceModel() const
if (data.data.isEmpty())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Cannot uncompress histogram \
data to checkout from database for Identity " << metadata.identity; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "Cannot uncompress histogram data to checkout \
from database for Identity " << metadata.identity; }
else
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Checkout compressed histogram " \
<< metadata.databaseId << " for identity " << metadata.identity << " with size " << \
cData.size(); + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Checkout \
compressed histogram " << metadata.databaseId << " for identity " << \
metadata.identity << " with size " << cData.size();
histograms << data;
histogramMetadata << metadata;
@@ -293,7 +293,7 @@ LBPHFaceModel TrainingDB::lbphFaceModel() const
}
else
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Histogram data to checkout from \
database are empty for Identity " << metadata.identity; + \
qCWarning(DIGIKAM_FACESENGINE_LOG) << "Histogram data to checkout from database are \
empty for Identity " << metadata.identity; }
}
diff --git a/libs/facesengine/detection/opencvfacedetector.cpp \
b/libs/facesengine/detection/opencvfacedetector.cpp index dffa29f..51b122a 100644
--- a/libs/facesengine/detection/opencvfacedetector.cpp
+++ b/libs/facesengine/detection/opencvfacedetector.cpp
@@ -123,15 +123,15 @@ public:
if (file.isEmpty())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Failed to locate cascade " << fileName \
<< " in " << dirs; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Failed to locate \
cascade " << fileName << " in " << dirs; return;
}
- qCDebug(DIGIKAM_GENERAL_LOG) << "Loading cascade " << file;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Loading cascade " << file;
if (!load(file.toStdString()))
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Failed to load cascade " << file;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Failed to load cascade " << file;
return;
}
}
@@ -295,7 +295,7 @@ OpenCVFaceDetector::OpenCVFaceDetector(const QStringList& \
cascadeDirs) {
if (cascadeDirs.isEmpty())
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "OpenCV Haar Cascade directory cannot be \
found. Did you install OpenCV XML data files?"; + \
qCCritical(DIGIKAM_FACESENGINE_LOG) << "OpenCV Haar Cascade directory cannot be \
found. Did you install OpenCV XML data files?"; return;
}
@@ -408,7 +408,7 @@ void OpenCVFaceDetector::updateParameters(const cv::Size& \
/*scaledSize*/, const // NOTE: min size is adjusted each time
/*
- qCDebug(DIGIKAM_GENERAL_LOG) << "updateParameters: accuracy " << \
d->speedVsAccuracy + qCDebug(DIGIKAM_FACESENGINE_LOG) << "updateParameters: \
accuracy " << d->speedVsAccuracy << " sensitivity " << d->sensitivityVsSpecificity
<< " - searchIncrement " << d->primaryParams.searchIncrement
<< " grouping " << d->primaryParams.grouping
@@ -418,9 +418,9 @@ void OpenCVFaceDetector::updateParameters(const cv::Size& \
/*scaledSize*/, const
for (unsigned int i=0; i<d->cascadeProperties.size(); i++)
if (d->cascadeProperties[i].primaryCascade)
- qCDebug(DIGIKAM_GENERAL_LOG) << d->cascadeSet->getCascade(i).name << " \
"; + qCDebug(DIGIKAM_FACESENGINE_LOG) << d->cascadeSet->getCascade(i).name \
<< " ";
- qCDebug(DIGIKAM_GENERAL_LOG) << " maxDistance " << d->maxDistance << " \
minDuplicates " << d->minDuplicates; + qCDebug(DIGIKAM_FACESENGINE_LOG) << " \
maxDistance " << d->maxDistance << " minDuplicates " << \
d->minDuplicates;
*/
/*
@@ -447,14 +447,14 @@ QList<QRect> OpenCVFaceDetector::cascadeResult(const cv::Mat& \
inputImage,
// Check whether the cascade has loaded successfully. Else report and error and \
quit if (cascade.empty())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Cascade XML data are not loaded.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Cascade XML data are not loaded.";
return QList<QRect>();
}
// There can be more than one face in an image. So create a growable sequence of \
faces. // Detect the objects and store them in the sequence
- qCDebug(DIGIKAM_GENERAL_LOG) << "detectMultiScale: image size " << \
inputImage.cols << " " << inputImage.rows + qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"detectMultiScale: image size " << inputImage.cols << " " << inputImage.rows << " \
searchIncrement " << params.searchIncrement << " grouping " << params.grouping
<< " flags " << params.flags
@@ -475,7 +475,7 @@ QList<QRect> OpenCVFaceDetector::cascadeResult(const cv::Mat& \
inputImage, results << toQRect(*it);
}
- qCDebug(DIGIKAM_GENERAL_LOG) << "detectMultiScale gave " << results;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "detectMultiScale gave " << results;
return results;
}
@@ -520,7 +520,7 @@ bool OpenCVFaceDetector::verifyFace(const cv::Mat& inputImage, \
const QRect& face
for (int i=0; i<d->cascades.size(); ++i)
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Verifying face " << face << " using cascade \
" << i; + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Verifying face " << face << " \
using cascade " << i;
if (d->cascades[i].verifyingCascade)
{
@@ -532,7 +532,7 @@ bool OpenCVFaceDetector::verifyFace(const cv::Mat& inputImage, \
const QRect& face
cv::Rect roi = d->cascades[i].faceROI(faceRect);
cv::Mat feature = inputImage(roi);
- qCDebug(DIGIKAM_GENERAL_LOG) << "feature " << d->cascades[i].roi << \
toQRect(faceRect) << toQRect(roi); + qCDebug(DIGIKAM_FACESENGINE_LOG) \
<< "feature " << d->cascades[i].roi << toQRect(faceRect) << \
toQRect(roi);
foundFaces = cascadeResult(feature, d->cascades[i], \
d->verifyingParams);
if (!foundFaces.isEmpty())
@@ -545,18 +545,18 @@ bool OpenCVFaceDetector::verifyFace(const cv::Mat& inputImage, \
const QRect& face
double factor = cascade.requestedInputScaleFactor(faceSize);
IplImage* feature = LibFaceUtils::scaledSection(inputImage, roi, \
factor);
- // qCDebug(DIGIKAM_GENERAL_LOG) << "Facial feature in roi " << \
cascade.roi << "scaled up to" << feature->width << feature->height; + \
// qCDebug(DIGIKAM_FACESENGINE_LOG) << "Facial feature in roi " << cascade.roi << \
"scaled up to" << feature->width << feature->height;
foundFaces = cascadeResult(feature, cascade.cascade, \
d->verifyingParams);
for (vector<Face>::iterator it = foundFaces.begin(); it != \
foundFaces.end(); ++it) {
- qCDebug(DIGIKAM_GENERAL_LOG) << "Feature face " << it->getX1() \
<< " " << it->getY1() << " " << it->getWidth() << "x" << it->getHeight(); + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "Feature face " << it->getX1() << " " << \
it->getY1() << " " << it->getWidth() << "x" << it->getHeight();
double widthScaled = it->getWidth() / factor;
double heightScaled = it->getHeight() / factor;
- // qCDebug(DIGIKAM_GENERAL_LOG) << "Hit feature size " << \
widthScaled << " " << heightScaled << " " + // \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "Hit feature size " << widthScaled << " " << \
heightScaled << " "
// << (faceSize.width / \
CascadeProperties::faceToFeatureRelationMin()) << " "
// << (faceSize.width / \
CascadeProperties::faceToFeatureRelationMax());
@@ -569,7 +569,7 @@ bool OpenCVFaceDetector::verifyFace(const cv::Mat& inputImage, \
const QRect& face )
{
facialFeatureVotes++;
- qCDebug(DIGIKAM_GENERAL_LOG) << "voting";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "voting";
break;
}
}
@@ -586,7 +586,7 @@ bool OpenCVFaceDetector::verifyFace(const cv::Mat& inputImage, \
const QRect& face frontalFaceVotes++;
}
- //qCDebug(DIGIKAM_GENERAL_LOG) << "Verifying cascade " << cascade.name \
<< " gives " << foundFaces.size(); + //qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"Verifying cascade " << cascade.name << " gives " << foundFaces.size(); }
}
@@ -610,7 +610,7 @@ bool OpenCVFaceDetector::verifyFace(const cv::Mat& inputImage, \
const QRect& face }
/*
- qCDebug(DIGIKAM_GENERAL_LOG) << "Verification finished. Votes: Frontal " << \
frontalFaceVotes << " Features " + qCDebug(DIGIKAM_FACESENGINE_LOG) << \
"Verification finished. Votes: Frontal " << frontalFaceVotes << " Features " << \
facialFeatureVotes << ". Face verified: " << verified;
*/
@@ -683,7 +683,7 @@ QList<QRect> OpenCVFaceDetector::mergeFaces(const cv::Mat& \
inputImage, const QLi }
}
- qCDebug(DIGIKAM_GENERAL_LOG) << "Faces parsed: " << ctr << " number of final \
faces: " << results.size(); + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Faces parsed: " \
<< ctr << " number of final faces: " << results.size();
return results;
}
@@ -740,7 +740,7 @@ QList<QRect> OpenCVFaceDetector::detectFaces(const cv::Mat& \
inputImage, const cv {
if (inputImage.empty())
{
- qCDebug(DIGIKAM_GENERAL_LOG) << "Invalid image given, not detecting faces.";
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << "Invalid image given, not detecting \
faces."; return QList<QRect>();
}
diff --git a/libs/facesengine/facedetector.cpp b/libs/facesengine/facedetector.cpp
index 5b88923..da49bfd 100644
--- a/libs/facesengine/facedetector.cpp
+++ b/libs/facesengine/facedetector.cpp
@@ -71,7 +71,7 @@ public:
// Last try to find OpenCV shared files, using cmake env variables.
cascadeDirs << \
QString::fromLatin1("%1/haarcascades").arg(QString::fromLatin1(OPENCV_ROOT_PATH));
- qCDebug(DIGIKAM_GENERAL_LOG) << "Try to find OpenCV Haar Cascade files \
in these directories: " << cascadeDirs; + qCDebug(DIGIKAM_FACESENGINE_LOG) \
<< "Try to find OpenCV Haar Cascade files in these directories: " << cascadeDirs;
m_backend = new OpenCVFaceDetector(cascadeDirs);
applyParameters();
@@ -172,11 +172,11 @@ QList<QRectF> FaceDetector::detectFaces(const QImage& image, \
const QSize& origin }
catch (cv::Exception& e)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "cv::Exception:" << e.what();
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "cv::Exception:" << e.what();
}
catch(...)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Default exception from OpenCV";
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception from OpenCV";
}
return result;
diff --git a/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.cpp \
b/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.cpp index \
0963091..e5f831d 100644
--- a/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.cpp
+++ b/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.cpp
@@ -452,7 +452,7 @@ void LBPHFaceRecognizer::predict(InputArray _src, int &minClass, \
double &minDist }
}
- qCDebug(DIGIKAM_GENERAL_LOG) << s;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << s;
}
else if (m_statisticsMode == MostNearestNeighbors)
{
@@ -495,7 +495,7 @@ void LBPHFaceRecognizer::predict(InputArray _src, int &minClass, \
double &minDist }
}
- qCDebug(DIGIKAM_GENERAL_LOG) << s;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << s;
}
}
@@ -517,7 +517,7 @@ Ptr<LBPHFaceRecognizer> LBPHFaceRecognizer::create(int radius, \
int neighbors, in
if (!fr)
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "Cannot create LBPHFaceRecognizer \
instance"; + qCWarning(DIGIKAM_FACESENGINE_LOG) << "Cannot create \
LBPHFaceRecognizer instance"; return ptr;
}
@@ -525,7 +525,7 @@ Ptr<LBPHFaceRecognizer> LBPHFaceRecognizer::create(int radius, \
int neighbors, in
if (ptr.empty())
{
- qCWarning(DIGIKAM_GENERAL_LOG) << "LBPHFaceRecognizer instance is empty";
+ qCWarning(DIGIKAM_FACESENGINE_LOG) << "LBPHFaceRecognizer instance is \
empty"; }
return ptr;
diff --git a/libs/facesengine/recognition-opencv-lbph/lbphfacemodel.cpp \
b/libs/facesengine/recognition-opencv-lbph/lbphfacemodel.cpp index aa7014d..fbe665e \
100644
--- a/libs/facesengine/recognition-opencv-lbph/lbphfacemodel.cpp
+++ b/libs/facesengine/recognition-opencv-lbph/lbphfacemodel.cpp
@@ -73,7 +73,7 @@ LBPHFaceRecognizer* LBPHFaceModel::ptr()
LBPHFaceRecognizer* const ptr = cv::Ptr<LBPHFaceRecognizer>::operator \
FacesEngine::LBPHFaceRecognizer*();
if (!ptr)
- qCWarning(DIGIKAM_GENERAL_LOG) << "LBPHFaceRecognizer pointer is null";
+ qCWarning(DIGIKAM_FACESENGINE_LOG) << "LBPHFaceRecognizer pointer is null";
return ptr;
}
@@ -87,7 +87,7 @@ const LBPHFaceRecognizer* LBPHFaceModel::ptr() const
#endif
if (!ptr)
- qCWarning(DIGIKAM_GENERAL_LOG) << "LBPHFaceRecognizer pointer is null";
+ qCWarning(DIGIKAM_FACESENGINE_LOG) << "LBPHFaceRecognizer pointer is null";
return ptr;
}
diff --git a/libs/facesengine/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp \
b/libs/facesengine/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp index \
15480e3..6d7295d 100644
--- a/libs/facesengine/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp
+++ b/libs/facesengine/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp
@@ -144,7 +144,7 @@ int OpenCVLBPHFaceRecognizer::recognize(const cv::Mat& \
inputImage) int predictedLabel = -1;
double confidence = 0;
d->lbph()->predict(inputImage, predictedLabel, confidence);
- qCDebug(DIGIKAM_GENERAL_LOG) << predictedLabel << confidence;
+ qCDebug(DIGIKAM_FACESENGINE_LOG) << predictedLabel << confidence;
if (confidence > d->threshold)
{
diff --git a/libs/facesengine/recognitiondatabase.cpp \
b/libs/facesengine/recognitiondatabase.cpp index 8d09b33..6535e39 100644
--- a/libs/facesengine/recognitiondatabase.cpp
+++ b/libs/facesengine/recognitiondatabase.cpp
@@ -482,7 +482,7 @@ Identity RecognitionDatabase::addIdentity(const QMap<QString, \
QString>& attribut {
// This situation is not well defined.
- qCDebug(DIGIKAM_GENERAL_LOG) << "Called addIdentity with a given UUID, \
and there is such a UUID already in the database." + \
qCDebug(DIGIKAM_FACESENGINE_LOG) << "Called addIdentity with a given UUID, and there \
is such a UUID already in the database."
<< "The existing identity is returned \
without adjusting properties!";
return matchByUuid;
@@ -658,12 +658,12 @@ cv::Mat RecognitionDatabase::Private::preprocessingChain(const \
QImage& image) }
catch (cv::Exception& e)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "cv::Exception:" << e.what();
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "cv::Exception:" << e.what();
return cv::Mat();
}
catch(...)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Default exception from OpenCV";
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception from OpenCV";
return cv::Mat();
}
}
@@ -689,11 +689,11 @@ QList<Identity> \
RecognitionDatabase::recognizeFaces(ImageListProvider* const ima }
catch (cv::Exception& e)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "cv::Exception:" << e.what();
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "cv::Exception:" << e.what();
}
catch(...)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Default exception from OpenCV";
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception from OpenCV";
}
if (id == -1)
@@ -727,7 +727,7 @@ static void trainSingle(Recognizer* const r, const Identity& \
identity, TrainingD {
ImageListProvider* const images = data->newImages(identity);
- qCDebug(DIGIKAM_GENERAL_LOG) << "Training " << images->size() << " images for \
identity " << identity.id(); + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Training " << \
images->size() << " images for identity " << identity.id();
for (; !images->atEnd(); images->proceed())
{
@@ -737,11 +737,11 @@ static void trainSingle(Recognizer* const r, const Identity& \
identity, TrainingD }
catch (cv::Exception& e)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "cv::Exception:" << e.what();
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "cv::Exception:" << e.what();
}
catch(...)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Default exception from OpenCV";
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception from OpenCV";
}
}
}
@@ -772,15 +772,15 @@ static void trainIdentityBatch(Recognizer* const r, const \
QList<Identity>& ident }
catch (cv::Exception& e)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "cv::Exception preparing image \
for LBPH:" << e.what(); + qCCritical(DIGIKAM_FACESENGINE_LOG) << \
"cv::Exception preparing image for LBPH:" << e.what(); }
catch(...)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Default exception from OpenCV";
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception from \
OpenCV"; }
}
- qCDebug(DIGIKAM_GENERAL_LOG) << "Training " << images.size() << " images for \
identity " << identity.id(); + qCDebug(DIGIKAM_FACESENGINE_LOG) << "Training " \
<< images.size() << " images for identity " << identity.id();
try
{
@@ -788,11 +788,11 @@ static void trainIdentityBatch(Recognizer* const r, const \
QList<Identity>& ident }
catch (cv::Exception& e)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "cv::Exception training LBPH:" << \
e.what(); + qCCritical(DIGIKAM_FACESENGINE_LOG) << "cv::Exception training \
LBPH:" << e.what(); }
catch(...)
{
- qCCritical(DIGIKAM_GENERAL_LOG) << "Default exception from OpenCV";
+ qCCritical(DIGIKAM_FACESENGINE_LOG) << "Default exception from OpenCV";
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic