node-opencv/src/FaceRecognizer.h
Keegan Brown a0faef9e65 Here goes nothing...
So apparently Nan v2 has removed Handle and uses Local instead. Not
sure wtf that’s all about. I have no idea if this works, but it builds
in both node v4.1.1 and v0.12.7 and passes the included tests in both.
2015-10-05 13:53:34 -05:00

39 lines
760 B
C++

#include "OpenCV.h"
#if ((CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >=4))
#include "opencv2/contrib/contrib.hpp"
class FaceRecognizerWrap: public Nan::ObjectWrap {
public:
cv::Ptr<cv::FaceRecognizer> rec;
int typ;
static Nan::Persistent<FunctionTemplate> constructor;
static void Init(Local<Object> target);
static NAN_METHOD(New);
FaceRecognizerWrap(cv::Ptr<cv::FaceRecognizer> f, int type);
JSFUNC(CreateLBPH)
JSFUNC(CreateEigen)
JSFUNC(CreateFisher)
JSFUNC(TrainSync)
//JSFUNC(Train)
JSFUNC(UpdateSync)
//JSFUNC(Update)
JSFUNC(PredictSync)
// JSFUNC(Predict)
//static void EIO_Predict(eio_req *req);
//static int EIO_AfterPredict(eio_req *req);
JSFUNC(SaveSync)
JSFUNC(LoadSync)
JSFUNC(GetMat)
};
#endif