Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is grayscale conversion still needed in CascadeClassifier::detectMulti

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
 

Is grayscale conversion image still needed required in CascadeClassifier::detectMultiCascadeClassifier::detectMultiScale?

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