From 5796d708fbdbabcc0a060a3ac7996b4180b67d25 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 27 May 2014 17:31:56 -0400 Subject: [PATCH] added sanity check to matrix format for br -eval --- openbr/core/eval.cpp | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/openbr/core/eval.cpp b/openbr/core/eval.cpp index d2f2f67..128bc09 100644 --- a/openbr/core/eval.cpp +++ b/openbr/core/eval.cpp @@ -130,6 +130,12 @@ float Evaluate(const Mat &simmat, const Mat &mask, const QString &csv) qFatal("Similarity matrix (%ix%i) differs in size from mask matrix (%ix%i).", simmat.rows, simmat.cols, mask.rows, mask.cols); + if (simmat.type() != CV_32FC1) + qFatal("Invalid simmat format"); + + if (mask.type() != CV_8UC1) + qFatal("Invalid mask format"); + float result = -1; // Make comparisons -- libgit2 0.21.4