#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDetectorFace.h>
#include <visp/vpVideoReader.h>
int main(int argc, const char* argv[])
{
#if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020200)
try {
std::string opt_face_cascade_name = "./haarcascade_frontalface_alt.xml";
std::string opt_video = "video.mpeg";
for (int i=0; i<argc; i++) {
if (std::string(argv[i]) == "--haar")
opt_face_cascade_name = std::string(argv[i+1]);
else if (std::string(argv[i]) == "--video")
opt_video = std::string(argv[i+1]);
else if (std::string(argv[i]) == "--help") {
std::cout << "Usage: " << argv[0] << " [--haar <haarcascade xml filename>] [--video <input video file>] [--help]" << std::endl;
return 0;
}
}
#if defined(VISP_HAVE_X11)
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_OPENCV)
#endif
bool exit_requested = false;
while( ! g.
end() && ! exit_requested) {
bool face_found = face_detector.
detect(I);
if (face_found) {
std::ostringstream text;
text <<
"Found " << face_detector.
getNbObjects() <<
" face(s)";
std::vector<vpImagePoint> p = face_detector.
getPolygon(i);
}
}
exit_requested = true;
}
if (! exit_requested)
}
}
#else
(void)argc;
(void)argv;
#endif
}