mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Now building and passing tests locally in node v0.10.40 v0.12.7 and v4.1.1. Other modules would not build at node lower than v0.10, so I stopped there.
22 lines
504 B
C++
22 lines
504 B
C++
#include "OpenCV.h"
|
|
|
|
#if ((CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >=4))
|
|
|
|
#include <opencv2/video/background_segm.hpp>
|
|
|
|
class BackgroundSubtractorWrap: public Nan::ObjectWrap {
|
|
public:
|
|
cv::Ptr<cv::BackgroundSubtractor> subtractor;
|
|
|
|
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(ApplyMOG);
|
|
};
|
|
|
|
#endif
|