diff --git a/openbr/core/core.cpp b/openbr/core/core.cpp index 5365503..5f449de 100644 --- a/openbr/core/core.cpp +++ b/openbr/core/core.cpp @@ -56,11 +56,6 @@ struct AlgorithmCore TemplateList data(TemplateList::fromGallery(input)); - // set the Train bool metadata, in case a Transform's project - // needs to know if it's called during train or enroll - for (int i=0; i o(Factory::make(outputFile)); o->initialize(targetFiles, queryFiles); diff --git a/openbr/core/fuse.cpp b/openbr/core/fuse.cpp index f2a6e53..146fa90 100644 --- a/openbr/core/fuse.cpp +++ b/openbr/core/fuse.cpp @@ -30,6 +30,9 @@ using namespace cv; static void normalizeMatrix(Mat &matrix, const Mat &mask, const QString &method) { + if (matrix.rows != mask.rows && matrix.cols != mask.cols) + qFatal("Similarity matrix (%d, %d) and mask (%d, %d) size mismatch.", matrix.rows, matrix.cols, mask.rows, mask.cols); + if (method == "None") return; QList vals; vals.reserve(matrix.rows*matrix.cols); diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index 6cb0189..d74d87e 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -483,7 +483,7 @@ struct TemplateList : public QList