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.
btw, you can't equalizeHist a 4 channel img, only a 1chan, grayscale one.
thanks, but this does not solve my problem
sorry, ofc that was unrelated.
What version of OpenCV?
can you try to specify cv::Rect and cv::Size explicitly ?
i can use only OpenCV version which supported Microsoft for Windows phone platform here
berak thanks you were right , it should look like std::vector<cv::rect> faces; face_cascade.detectMultiScale(mat, faces, 1.1, 2, 0, cv::Size(30, 30));
You can go to specific tag, like 2.4.10, that is the last release (3.0.0 is in beta version)
You are missing a Size at the end. Should look like this:
face_cascade.detectMultiScale(mat, faces, 1.1, 2, 0, Size(30, 30), Size(500,500));
@ArcadeBit , that should be handled by the default values to this argument, also i don't see, how this would trigger a compile time error.
@Fačko , if you could make an answer (or, even a comment, we'll progress that to an actual answer) about what was the actual solution to it, we could mark it as 'solved !