Merge pull request #289 from mvines/master

Only run equalizeHist() if an BGR matrix was provided
This commit is contained in:
Peter Braden 2015-08-31 12:25:26 +02:00
commit e8eaef2e1f

View File

@ -61,10 +61,10 @@ class AsyncDetectMultiScale : public NanAsyncWorker {
if(this->im->mat.channels() != 1) {
cvtColor(this->im->mat, gray, CV_BGR2GRAY);
equalizeHist( gray, gray);
} 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));
res = objects;
}