How to forward declare dlib::frontal_face_detector?

Viewed 39

I'm trying to forward declare couple of dlib classes, but it seems what I'm doing is wrong. Currently I have tried this:

"myheader.h":

namespace dlib 
{
    class frontal_face_detector;
    class shape_predictor;
    class full_object_detection;
}

class MyClass:
{
public: 
    void start();

private:
    void test(dlib::full_object_detection* result);

dlib::fronta_face_detector* detector;
dlib::shape_predictor predictor;
dlib:: full_object_detection result;
};

and in myheader.cpp:

#include <dlib/image_io.h>
#include <dlib/opencv.h>
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/render_face_detections.h>
#include "myheader.h"

MyClass::MyClass()
{
    this->detector = new dlib::frontal_face_detector();
    this->predictor = new dlib::shape_predictor();
}
void MyClass:test(dlib::full_object_detection * result)
{
  //...
}

but this doesn't work apparently, what am I missing here? Is it because it's defined not as a class but as a typedef?

    typedef object_detector<scan_fhog_pyramid<pyramid_down<6> > > frontal_face_detector;

If so, how should I go about this aside from pimpling MyClass?

0 Answers
Related