From 8516f55ba4ecac93cbdc47b08c445fb2789b104d Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Mon, 24 Dec 2012 11:45:23 -0500 Subject: [PATCH] updated shared folder location --- sdk/core/core.cpp | 7 ++----- sdk/plugins/cascade.cpp | 2 +- sdk/plugins/eyes.cpp | 2 +- sdk/plugins/meta.cpp | 7 ++----- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sdk/core/core.cpp b/sdk/core/core.cpp index 81dc1c4..29cdd7a 100644 --- a/sdk/core/core.cpp +++ b/sdk/core/core.cpp @@ -213,11 +213,8 @@ private: QString getFileName(const QString &description) const { - foreach (const QString &folder, QDir(Globals->sdkPath + "/share").entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name)) { - const QString file = Globals->sdkPath + "/share/" + folder + "/models/algorithms/" + description; - if (QFileInfo(file).exists()) return file; - } - return ""; + const QString file = Globals->sdkPath + "/share/openbr/models/algorithms/" + description; + return QFileInfo(file).exists() ? file : QString(); } void init(QString description) diff --git a/sdk/plugins/cascade.cpp b/sdk/plugins/cascade.cpp index 4a4cc9a..18d171f 100644 --- a/sdk/plugins/cascade.cpp +++ b/sdk/plugins/cascade.cpp @@ -30,7 +30,7 @@ class CascadeResourceMaker : public ResourceMaker public: CascadeResourceMaker(const QString &model) { - file = Globals->sdkPath + "/share/mm/models/"; + file = Globals->sdkPath + "/share/openbr/models/"; if (model == "Ear") file += "haarcascades/haarcascade_ear.xml"; else if (model == "Eye") file += "haarcascades/eye_tree_eyeglasses.xml"; else if (model == "FrontalFace") file += "haarcascades/haarcascade_frontalface_alt2.xml"; diff --git a/sdk/plugins/eyes.cpp b/sdk/plugins/eyes.cpp index 54ae88e..445f68d 100644 --- a/sdk/plugins/eyes.cpp +++ b/sdk/plugins/eyes.cpp @@ -68,7 +68,7 @@ public: Scalar t1, t2; // Open the eye locator model - file.setFileName(Globals->sdkPath + "/share/mm/models/EyeLocatorASEF128x128.fel"); + file.setFileName(Globals->sdkPath + "/share/openbr/models/EyeLocatorASEF128x128.fel"); bool success = file.open(QFile::ReadOnly); if (!success) qFatal("ASEFEyes::ASEFEyes failed to open %s for reading.", qPrintable(file.fileName())); // Check the first line diff --git a/sdk/plugins/meta.cpp b/sdk/plugins/meta.cpp index 24cdeb6..aa76fef 100644 --- a/sdk/plugins/meta.cpp +++ b/sdk/plugins/meta.cpp @@ -362,11 +362,8 @@ class LoadStoreTransform : public MetaTransform QString getFileName() const { - foreach (const QString &folder, QDir(Globals->sdkPath + "/share").entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name)) { - const QString file = Globals->sdkPath + "/share/" + folder + "/models/transforms/" + baseName; - if (QFileInfo(file).exists()) return file; - } - return ""; + const QString file = Globals->sdkPath + "/share/openbr/models/transforms/" + baseName; + return QFileInfo(file).exists() ? file : QString(); } bool tryLoad() -- libgit2 0.21.4