Skip to content

Commit e8eaef2

Browse files
committed
Merge pull request peterbraden#289 from mvines/master
Only run equalizeHist() if an BGR matrix was provided
2 parents 6988381 + 20807d6 commit e8eaef2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/CascadeClassifierWrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ class AsyncDetectMultiScale : public NanAsyncWorker {
6161

6262
if(this->im->mat.channels() != 1) {
6363
cvtColor(this->im->mat, gray, CV_BGR2GRAY);
64+
equalizeHist( gray, gray);
6465
} else {
6566
gray = this->im->mat;
6667
}
67-
equalizeHist( gray, gray);
6868
this->cc->cc.detectMultiScale(gray, objects, this->scale, this->neighbors, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(this->minw, this->minh));
6969
res = objects;
7070
}

0 commit comments

Comments
 (0)