mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
With OpenCV >3.1 and 2.4.13, OpenCV can now be installed without specific modules. This makes it so that `node-opencv` will still be able to compile.
29 lines
602 B
C++
Executable File
29 lines
602 B
C++
Executable File
/*
|
|
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<node_opencv::Matrix>(info[0]->ToObject())->mat;
|
|
// ...
|
|
}
|
|
|
|
*/
|
|
#ifndef NODE_OPENCV_MATRIX_H
|
|
#define NODE_OPENCV_MATRIX_H
|
|
#include <opencv2/opencv.hpp>
|
|
#include <node_object_wrap.h>
|
|
|
|
namespace node_opencv {
|
|
|
|
class Matrix: public Nan::ObjectWrap {
|
|
public:
|
|
cv::Mat mat;
|
|
protected:
|
|
Matrix(): Nan::ObjectWrap() {};
|
|
};
|
|
|
|
}
|
|
|
|
#endif // NODE_OPENCV_MATRIX_H
|