#include "FaceRecognizer.h" #ifndef __FF_EIGENFACERECOGNIZER_H__ #define __FF_EIGENFACERECOGNIZER_H__ class EigenFaceRecognizer : public FaceRecognizer { public: cv::Ptr faceRecognizer; void save(std::string path) { faceRecognizer->save(path); } void load(std::string path) { #if CV_VERSION_GREATER_EQUAL(3, 3, 0) faceRecognizer = cv::Algorithm::load(path); #else faceRecognizer->load(path); #endif } static NAN_MODULE_INIT(Init); static NAN_METHOD(New); static Nan::Persistent constructor; cv::Ptr getFaceRecognizer() { return faceRecognizer; } }; #endif