Merge pull request #282 from mvines/3950c04

detectMultiScale now works if a grayscale matrix is provided
This commit is contained in:
Peter Braden 2015-08-22 18:03:25 +02:00
commit 5026afaf08

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));