mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Only run equalizeHist() if an BGR matrix was provided
Grayscale matrices are used unmodified.
This commit is contained in:
parent
6988381bfa
commit
20807d6284
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user