From a12c011108170d68b555d73e1332a35d8c77c79f Mon Sep 17 00:00:00 2001 From: lbestrowden Date: Sun, 3 Mar 2013 13:56:55 -0500 Subject: [PATCH] DownsampleTransform and adding myself to openbr.bib --- sdk/plugins/reduce.cpp | 2 ++ share/openbr/openbr.bib | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/sdk/plugins/reduce.cpp b/sdk/plugins/reduce.cpp index 1702875..6038e61 100644 --- a/sdk/plugins/reduce.cpp +++ b/sdk/plugins/reduce.cpp @@ -132,6 +132,8 @@ class DownsampleTransform : public UntrainableTransform void project(const Template &src, Template &dst) const { + if (src.m().channels() != 1) + qFatal("Expected 1 channel matrix."); Mat input = src.m(); Mat output(ceil((double)input.rows/k), ceil((double)input.cols/k), CV_32FC1); for (int r=0; r