File: init.cc

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 (73 lines) | stat: -rwxr-xr-x 1,666 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include "OpenCV.h"

#include "Point.h"
#include "Matrix.h"
#include "CascadeClassifierWrap.h"
#include "VideoCaptureWrap.h"
#include "VideoWriterWrap.h"
#include "Contours.h"
#include "CamShift.h"
#include "HighGUI.h"
#include "FaceRecognizer.h"
#include "Features2d.h"
#include "Constants.h"
#include "Calib3D.h"
#include "ImgProc.h"
#include "Stereo.h"
#include "BackgroundSubtractor.h"
#include "LDAWrap.h"
#include "Histogram.h"

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
#pragma message ( "Building with OpenCV" STR(CV_MAJOR_VERSION) "." STR(CV_MINOR_VERSION) )

extern "C" void init(Local<Object> target) {
  Nan::HandleScope scope;
  OpenCV::Init(target);

  Point::Init(target);
  Matrix::Init(target);
#ifdef HAVE_OPENCV_OBJDETECT
  CascadeClassifierWrap::Init(target);
#endif
#ifdef HAVE_OPENCV_VIDEOIO
  VideoCaptureWrap::Init(target);
  VideoWriterWrap::Init(target);
#endif
  Contour::Init(target);
#ifdef HAVE_OPENCV_VIDEO
  TrackedObject::Init(target);
#endif
#ifdef HAVE_OPENCV_HIGHGUI
  NamedWindow::Init(target);
#endif
  Constants::Init(target);
#ifdef HAVE_OPENCV_CALIB3D
  Calib3D::Init(target);
#endif
#ifdef HAVE_OPENCV_IMGPROC
  ImgProc::Init(target);
  Histogram::Init(target);
#endif
#if CV_MAJOR_VERSION < 3
  StereoBM::Init(target);
  StereoSGBM::Init(target);
  StereoGC::Init(target);

#if CV_MAJOR_VERSION == 2 && CV_MINOR_VERSION >=4
  #ifdef HAVE_OPENCV_FEATURES2D
    Features::Init(target);
  #endif
  LDAWrap::Init(target);
#endif
#endif
#ifdef HAVE_BACKGROUNDSUBTRACTOR
  BackgroundSubtractorWrap::Init(target);
#endif
#ifdef HAVE_OPENCV_FACE
  FaceRecognizerWrap::Init(target);
#endif
};

NODE_MODULE(opencv, init)