问题描述
我正在尝试转发声明几个dlib类,但是看来我在做什么是错误的。目前,我已经尝试过:
"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;
};
和在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)
{
//...
}
但这显然不起作用,我在这里想念什么?是不是因为它不是定义为类而是定义为typedef?
typedef object_detector<scan_fhog_pyramid<pyramid_down<6> > > frontal_face_detector;
如果是这样,除了pimpl
设置MyClass之外,我还应该怎么做?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)