diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index e21e373..ec78c8b 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -433,22 +433,11 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) // of target images to every partition newTemplates[i].file.set("Partition", -1); } else { - const QByteArray md5 = QCryptographicHash::hash(newTemplates[i].file.get("Subject").toLatin1(), QCryptographicHash::Md5); - // Select the right 8 hex characters so that it can be represented as a 64 bit integer without overflow - newTemplates[i].file.set("Partition", md5.toHex().right(8).toULongLong(0, 16) % crossValidate); - } -<<<<<<< HEAD -======= - } else if (newTemplates[i].file.getBool("allPartitions")) { - // The allPartitions flag is used to add an extended set - // of target images to every partition - newTemplates[i].file.set("Partition", -1); - } else { // Direct use of "Label" is not general -cao const QByteArray md5 = QCryptographicHash::hash(newTemplates[i].file.get("Label").toLatin1(), QCryptographicHash::Md5); // Select the right 8 hex characters so that it can be represented as a 64 bit integer without overflow newTemplates[i].file.set("Partition", md5.toHex().right(8).toULongLong(0, 16) % crossValidate); ->>>>>>> c2b1835e05d3b229db72d8829fb9ebf7e3cf31d8 + } } } } diff --git a/openbr/plugins/cascade.cpp b/openbr/plugins/cascade.cpp index e05d9d2..f9d8178 100644 --- a/openbr/plugins/cascade.cpp +++ b/openbr/plugins/cascade.cpp @@ -84,6 +84,7 @@ class CascadeTransform : public UntrainableMetaTransform foreach (const Template &t, src) { const bool enrollAll = t.file.getBool("enrollAll"); + qDebug() << enrollAll; for (int i=0; i rects; diff --git a/openbr/plugins/format.cpp b/openbr/plugins/format.cpp index 816b7f2..ec6b2f3 100644 --- a/openbr/plugins/format.cpp +++ b/openbr/plugins/format.cpp @@ -236,6 +236,7 @@ class DefaultFormat : public Format videoWriter.file = file; videoWriter.write(t); } else if (t.size() == 1) { + QtUtils::touchDir(QDir(file.path())); imwrite(file.name.toStdString(), t); } } diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 85a307b..a2699ba 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -135,7 +135,7 @@ class EmptyGallery : public Gallery { Q_OBJECT Q_PROPERTY(QString regexp READ get_regexp WRITE set_regexp RESET reset_regexp STORED false) - BR_PROPERTY(QString, regexp, "") + BR_PROPERTY(QString, regexp, QString()) void init() { @@ -184,7 +184,10 @@ class EmptyGallery : public Gallery // Enrolling a null file is used as an idiom to initialize an algorithm if (file.name.isEmpty()) return; - const QString destination = file.name + "/" + (file.getBool("preservePath") ? t.file.name : t.file.fileName()); + const QString newFormat = file.get("newFormat",QString()); + QString destination = file.name + "/" + (file.getBool("preservePath") ? t.file.path()+"/" : QString()); + destination += (newFormat.isEmpty() ? t.file.fileName() : t.file.baseName()+newFormat); + QMutexLocker diskLocker(&diskLock); // Windows prefers to crash when writing to disk in parallel if (t.isNull()) { QtUtils::copyFile(t.file.resolved(), destination);