Is grayscale image still required in CascadeClassifier::detectMultiScale? [closed]

asked 2015-07-30 11:32:39 -0600

binbin gravatar image

updated 2015-07-30 11:33:58 -0600

I noticed that both methods below are working with 'haarcascade_frontalface_alt.xml' dataset. In most tutorial samples they always convert the source frame into grayscale, so my questions is if the conversion will improve either performance or accuracy, or if it is not needed anymore. Thank you.


Mat frame_gray;
cvtColor(frame, frame_gray, CV_BGR2GRAY);
cascade.detectMultiScale(frame_gray, faces, 1.1, 3, 0, Size(50, 50)); // works
 

cascade.detectMultiScale(frame, faces, 1.1, 3, 0, Size(50, 50)); // still works
 
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by binbin
close date 2015-07-30 11:41:39.503214

Comments

1

it is needed, but if you don't do it, they will do it for you later under the hood.

berak gravatar imageberak ( 2015-07-30 11:36:27 -0600 )edit

Thanks berak for the answer.

binbin gravatar imagebinbin ( 2015-07-30 11:41:16 -0600 )edit