Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Wrong arguments for CascadeClassifier detection

I work on CascadeClassifier MultiScale detection for WindowsPhone 8.1 C# using Windows Runtime Component. (Visual Studio 2013) Here is my code in WinRT:

cv::Mat mat(width, height, CV_8UC4);
cv::CascadeClassifier face_cascade;
face_cascade.load("haarcascade_frontalface_alt.xml");
std::vector<Rect> faces;
.
.
.
equalizeHist(mat, mat);
face_cascade.detectMultiScale(mat, faces, 1.1, 2, 0, Size(30, 30));

And I still get error: error C2664: 'void cv::CascadeClassifier::detectMultiScale(cv::InputArray,std::vector<_Ty> &,double,int,int,cv::Size,cv::Size)' : cannot convert parameter 2 from 'std::vector<_Ty>' to 'std::vector<_Ty> &'

I follow the tutorial on OpenCV website and I do not why my parameters should be wrong.

Thanks for reply.