From 64df774691dfb2bd3abd5fcf4a01a37d4413038e Mon Sep 17 00:00:00 2001 From: lbestrowden Date: Fri, 1 Mar 2013 17:29:29 -0500 Subject: [PATCH] DownsampleTransform and adding myself to openbr.bib --- sdk/plugins/reduce.cpp | 2 ++ share/openbr/openbr.bib | 53 ++++++++++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 21 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