BitmapToolkit Scol plugin
|
ArFaceDetector.cpp
Go to the documentation of this file.
37 std::string facesxml = CopyFileFromAssetToSD("btdata/lbpcascade_frontalface.xml", "lbpcascade_frontalface.xml", "btdata");
38 //std::string leyexml = CopyFileFromAssetToSD("btdata/haarcascade_mcs_lefteye.xml", "haarcascade_mcs_lefteye.xml", "btdata");
39 //std::string reyexml = CopyFileFromAssetToSD("btdata/haarcascade_mcs_righteye.xml", "haarcascade_mcs_righteye.xml", "btdata");
40 //std::string nosexml = CopyFileFromAssetToSD("btdata/haarcascade_mcs_nose.xml", "haarcascade_mcs_nose.xml", "btdata");
72std::vector<cv::Rect> ArFaceDetector::DetectFaces(const cv::Mat input, std::vector<ArMarker*> faceMarkers, aruco::CameraParameters camParam, bool reversedBitmap)
80 mFaceClassifier.detectMultiScale(input, objList, 1.2, 4, cv::CASCADE_SCALE_IMAGE/*|CV_HAAR_DO_CANNY_PRUNING*/|cv::CASCADE_FIND_BIGGEST_OBJECT, cv::Size(30, 30));
120 lrect.push_back(cv::Point2f((float)objRect.x + objRect.width, (float)objRect.y + objRect.height));
138 mLeftEyeClassifier.detectMultiScale(faceMask, LeyeList, 1.3, 6, cv::CASCADE_SCALE_IMAGE, cv::Size(20, 20));
141 mRightEyeClassifier.detectMultiScale(faceMask, ReyeList, 1.3, 6, cv::CASCADE_SCALE_IMAGE, cv::Size(20, 20));
146 cv::rectangle(bMask, cv::Rect(0, 0, bMask.cols, (int)((float)bMask.rows / 2.5f)), cv::Scalar(0), cv::FILLED);
148 mNoseClassifier.detectMultiScale(bMask, noseList, 1.3, 4, cv::CASCADE_SCALE_IMAGE, cv::Size(20, 20));
151 mMouthClassifier.detectMultiScale(bMask, mouthList, 1.3, 6, cv::CASCADE_SCALE_IMAGE, cv::Size(20, 20));
259 DetectFaces(mLastData.gray, faceMarkers, mLastData.arCamParam.camParam, mLastData.reversedBitmap);
265 fmarker->Update(mLastData.gray, mLastData.image, mLastData.arCamParam.camParam, mLastData.reversedBitmap);
Definition ArFaceMarker.h:49
void SetImage(const cv::Mat image, std::vector< cv::Rect > objRects)
Definition ArFaceMarker.cpp:66
void Update(cv::Mat frame, cv::Mat color, aruco::CameraParameters &camparam, bool reverse)
Definition ArFaceMarker.cpp:574
Definition ArManager.h:44
void StartThreading(std::function< void()> threadFunction)
Definition BitmapToolkitThread.cpp:41
Generated by 1.9.8