22#include <opencv2/objdetect/objdetect.hpp>
30 JEVOIS_SHARE_PATH
"/facedetector/haarcascade_frontalface_alt.xml", ParamCateg);
34 JEVOIS_SHARE_PATH
"/facedetector/haarcascade_eye_tree_eyeglasses.xml", ParamCateg);
41 public jevois::Parameter<facedetector::face_cascade, facedetector::eye_cascade>
63 void process(cv::Mat
const & img, std::vector<cv::Rect> & faces, std::vector<std::vector<cv::Rect> > & eyes,
64 bool detect_eyes =
false);
Face detection using OpenCV.
std::shared_ptr< cv::CascadeClassifier > itsFaceCascade
~FaceDetector()
Destructor.
JEVOIS_DECLARE_PARAMETER(face_cascade, std::string, "File name of the face cascade", JEVOIS_SHARE_PATH "/facedetector/haarcascade_frontalface_alt.xml", ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(eye_cascade, std::string, "File name of the eye cascade, or empty to not detect eyes", JEVOIS_SHARE_PATH "/facedetector/haarcascade_eye_tree_eyeglasses.xml", ParamCateg)
Parameter.
std::shared_ptr< cv::CascadeClassifier > itsEyesCascade
void process(cv::Mat const &img, std::vector< cv::Rect > &faces, std::vector< std::vector< cv::Rect > > &eyes, bool detect_eyes=false)
Process an image, results are held in our data members.