From 774940f8281809512c42b38deb23dfffa2f938c8 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Thu, 25 Sep 2014 16:08:10 -0400 Subject: [PATCH] Reverting to previous stasm4 colorspace conversion --- openbr/plugins/stasm4.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/stasm4.cpp b/openbr/plugins/stasm4.cpp index a295384..eafb374 100644 --- a/openbr/plugins/stasm4.cpp +++ b/openbr/plugins/stasm4.cpp @@ -77,7 +77,10 @@ class StasmTransform : public UntrainableTransform void project(const Template &src, Template &dst) const { - if (src.m().channels() != 1) + Mat stasmSrc(src); + if (src.m().channels() == 3) + cvtColor(src, stasmSrc, CV_BGR2GRAY); + else if (src.m().channels() != 1) qFatal("Stasm expects single channel matrices."); dst = src; -- libgit2 0.21.4