File: FaceRecognizer.h

package info (click to toggle)
node-opencv 6.0.0+git20180416.cfc96ba0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 24,632 kB
  • sloc: xml: 476,707; cpp: 5,950; makefile: 114; sh: 59; ansic: 20
file content (46 lines) | stat: -rw-r--r-- 872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "OpenCV.h"

#ifdef HAVE_OPENCV_FACE

#if CV_MAJOR_VERSION >= 3
#include <opencv2/face.hpp>
namespace cv {
  using cv::face::FaceRecognizer;
}
#else
#warning using opencv2 contrib
#include "opencv2/contrib/contrib.hpp"
#endif

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