Commit 774940f8281809512c42b38deb23dfffa2f938c8

Authored by Scott Klum
1 parent 3a0e73ac

Reverting to previous stasm4 colorspace conversion

Showing 1 changed file with 4 additions and 1 deletions
openbr/plugins/stasm4.cpp
... ... @@ -77,7 +77,10 @@ class StasmTransform : public UntrainableTransform
77 77  
78 78 void project(const Template &src, Template &dst) const
79 79 {
80   - if (src.m().channels() != 1)
  80 + Mat stasmSrc(src);
  81 + if (src.m().channels() == 3)
  82 + cvtColor(src, stasmSrc, CV_BGR2GRAY);
  83 + else if (src.m().channels() != 1)
81 84 qFatal("Stasm expects single channel matrices.");
82 85  
83 86 dst = src;
... ...