Commit 8516f55ba4ecac93cbdc47b08c445fb2789b104d
1 parent
455d1c0b
updated shared folder location
Showing
4 changed files
with
6 additions
and
12 deletions
sdk/core/core.cpp
| ... | ... | @@ -213,11 +213,8 @@ private: |
| 213 | 213 | |
| 214 | 214 | QString getFileName(const QString &description) const |
| 215 | 215 | { |
| 216 | - foreach (const QString &folder, QDir(Globals->sdkPath + "/share").entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name)) { | |
| 217 | - const QString file = Globals->sdkPath + "/share/" + folder + "/models/algorithms/" + description; | |
| 218 | - if (QFileInfo(file).exists()) return file; | |
| 219 | - } | |
| 220 | - return ""; | |
| 216 | + const QString file = Globals->sdkPath + "/share/openbr/models/algorithms/" + description; | |
| 217 | + return QFileInfo(file).exists() ? file : QString(); | |
| 221 | 218 | } |
| 222 | 219 | |
| 223 | 220 | void init(QString description) | ... | ... |
sdk/plugins/cascade.cpp
| ... | ... | @@ -30,7 +30,7 @@ class CascadeResourceMaker : public ResourceMaker<CascadeClassifier> |
| 30 | 30 | public: |
| 31 | 31 | CascadeResourceMaker(const QString &model) |
| 32 | 32 | { |
| 33 | - file = Globals->sdkPath + "/share/mm/models/"; | |
| 33 | + file = Globals->sdkPath + "/share/openbr/models/"; | |
| 34 | 34 | if (model == "Ear") file += "haarcascades/haarcascade_ear.xml"; |
| 35 | 35 | else if (model == "Eye") file += "haarcascades/eye_tree_eyeglasses.xml"; |
| 36 | 36 | else if (model == "FrontalFace") file += "haarcascades/haarcascade_frontalface_alt2.xml"; | ... | ... |
sdk/plugins/eyes.cpp
| ... | ... | @@ -68,7 +68,7 @@ public: |
| 68 | 68 | Scalar t1, t2; |
| 69 | 69 | |
| 70 | 70 | // Open the eye locator model |
| 71 | - file.setFileName(Globals->sdkPath + "/share/mm/models/EyeLocatorASEF128x128.fel"); | |
| 71 | + file.setFileName(Globals->sdkPath + "/share/openbr/models/EyeLocatorASEF128x128.fel"); | |
| 72 | 72 | bool success = file.open(QFile::ReadOnly); if (!success) qFatal("ASEFEyes::ASEFEyes failed to open %s for reading.", qPrintable(file.fileName())); |
| 73 | 73 | |
| 74 | 74 | // Check the first line | ... | ... |
sdk/plugins/meta.cpp
| ... | ... | @@ -362,11 +362,8 @@ class LoadStoreTransform : public MetaTransform |
| 362 | 362 | |
| 363 | 363 | QString getFileName() const |
| 364 | 364 | { |
| 365 | - foreach (const QString &folder, QDir(Globals->sdkPath + "/share").entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name)) { | |
| 366 | - const QString file = Globals->sdkPath + "/share/" + folder + "/models/transforms/" + baseName; | |
| 367 | - if (QFileInfo(file).exists()) return file; | |
| 368 | - } | |
| 369 | - return ""; | |
| 365 | + const QString file = Globals->sdkPath + "/share/openbr/models/transforms/" + baseName; | |
| 366 | + return QFileInfo(file).exists() ? file : QString(); | |
| 370 | 367 | } |
| 371 | 368 | |
| 372 | 369 | bool tryLoad() | ... | ... |