File: BackgroundSubtractor.h

package info (click to toggle)
node-opencv 6.0.0+git20180416.cfc96ba0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 24,632 kB
  • sloc: xml: 476,707; cpp: 5,950; makefile: 114; sh: 59; ansic: 20
file content (40 lines) | stat: -rw-r--r-- 916 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
#include "OpenCV.h"

#ifdef HAVE_OPENCV_VIDEO

#if ((CV_MAJOR_VERSION == 2) && (CV_MINOR_VERSION >=4)) || (CV_MAJOR_VERSION >= 3)
#define HAVE_BACKGROUNDSUBTRACTOR

#include <opencv2/video/background_segm.hpp>

#ifdef HAVE_OPENCV_BGSEGM
#include <opencv2/bgsegm.hpp>
#endif

class BackgroundSubtractorWrap: public Nan::ObjectWrap {
public:
  cv::Ptr<cv::BackgroundSubtractor> subtractor;
  cv::Mutex applymutex;

  static Nan::Persistent<FunctionTemplate> constructor;
  static void Init(Local<Object> target);
  static NAN_METHOD(New);

  BackgroundSubtractorWrap(cv::Ptr<cv::BackgroundSubtractor> bg);

  static NAN_METHOD(CreateMOG);
  static NAN_METHOD(CreateMOG2);
  static NAN_METHOD(CreateGMG);
  
  static NAN_METHOD(ApplyMOG);
  static NAN_METHOD(Apply);
  static NAN_METHOD(History);
  static NAN_METHOD(Mixtures);
  static NAN_METHOD(NoiseSigma);
  static NAN_METHOD(BackgroundRatio);

};

#endif

#endif