From 8b418541d8cc1faafd58ec431baedb6ba396865b Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 27 May 2014 15:29:58 -0400 Subject: [PATCH] janus_finalize_template should skip over empty templates --- openbr/janus.cpp | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/openbr/janus.cpp b/openbr/janus.cpp index 2b1eadb..f427e59 100644 --- a/openbr/janus.cpp +++ b/openbr/janus.cpp @@ -77,6 +77,9 @@ janus_error janus_finalize_template(janus_template template_, janus_flat_templat { *bytes = 0; foreach (const cv::Mat &m, *template_) { + if (!m.data) + continue; + if (!m.isContinuous()) return JANUS_UNKNOWN_ERROR; -- libgit2 0.21.4