AsyncDetectMultiScale: use input matrix if color conversion was not required.

This commit is contained in:
Michael Vines 2015-08-21 13:34:04 -07:00
parent d376062737
commit dece21619f

View File

@ -61,6 +61,8 @@ class AsyncDetectMultiScale : public NanAsyncWorker {
if(this->im->mat.channels() != 1) {
cvtColor(this->im->mat, gray, CV_BGR2GRAY);
} else {
gray = this->im->mat;
}
equalizeHist( gray, gray);
this->cc->cc.detectMultiScale(gray, objects, this->scale, this->neighbors, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(this->minw, this->minh));