I am trying to make a face detection software using OpenCV 2.3.0. While OpenCV 2.4 has the face recognizer class 2.3.0 is devoid of this feature. I checked the documentation and is specifies that the detectMultiScale function has the following declaration
void CascadeClassifier::detectMultiScale(const Mat& image, vector<Rect>& objects, double
scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size())
Now I am giving the image, that is the camera feed, but don't know what to fill in vector block. Here is the code that I have written.
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include<iostream>
using namespace cv;
using namespace std;
int main()
{
std::vector<Rect> faces;
VideoCapture cap(0);
if(!cap.isOpened())
cout<<"Camera is not connected"<<endl;
cv::CascadeClassifier* cascade=0;
if(cascade.empty())
return -1;
Mat edges;
namedWindow("Camera Feed",1);
for(;;)
{
Mat frame;
cap >> frame;
imshow("Camera Feed", frame);
if(waitKey(10)==27)
break;
cascade.detectMultiScale(frame,faces);
}
return 0;
}
Question: How to proceed further?