diff --git a/inc/Matrix.h b/inc/Matrix.h new file mode 100755 index 0000000..beed998 --- /dev/null +++ b/inc/Matrix.h @@ -0,0 +1,28 @@ +/* + This file defines the public native interface into an node-opencv Matrix + object. This is used to retrieve the wrapped OpenCV cv:Mat object from other + native code: + + NAN_METHOD(UnwrapMatrix) { + cv::Mat mat = Nan::ObjectWrap::Unwrap(info[0]->ToObject())->mat; + // ... + } + + */ +#ifndef NODE_OPENCV_MATRIX_H +#define NODE_OPENCV_MATRIX_H +#include +#include + +namespace node_opencv { + +class Matrix: public Nan::ObjectWrap { +public: + cv::Mat mat; +protected: + Matrix(): Nan::ObjectWrap() {}; +}; + +} + +#endif // NODE_OPENCV_MATRIX_H diff --git a/include_dirs.js b/include_dirs.js new file mode 100644 index 0000000..8d72392 --- /dev/null +++ b/include_dirs.js @@ -0,0 +1,14 @@ +// Outputs the path to public node-opencv header files. This is used when +// building other native node modules that require access to the +// node-opencv Matrix base class. +// +// To use this file, add something like the following to your binding.gyp: +// +// "include_dirs": [ +// " constructor; static void Init(Local target); static NAN_METHOD(New);