1 | initial version |
my guess(more a c++ guy, no idea about andoid ):
mat.convertTo(mat2, CvType.CV_8U); // it is probably not doing, what you want it to (mat2 might still have the original number of channels(4, most likely))
imho, you've got to pass a grayscale(1 channel,8bit) image to detectMultiScale in c++, i'd use
cvtColor(src,dst, CV_RGB2GRAY);
to achieve that, but no idea about the android wrapper here
2 | No.2 Revision |
my guess(more a c++ guy, no idea about andoid ):
mat.convertTo(mat2, CvType.CV_8U); CvType.CV_8U);
// it this is probably not doing, what you want it to
(mat2 to, as it's not changing
the number of channels in the output img,
so, mat2 might still have the original number of channels(4, most likely))likely)
imho, you've got to pass a grayscale(1 channel,8bit) image to detectMultiScale in c++, i'd use
cvtColor(src,dst, CV_RGB2GRAY);
to achieve that, but no idea about the android wrapper here