mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
30 lines
729 B
C++
Executable File
30 lines
729 B
C++
Executable File
#include "OpenCV.h"
|
|
|
|
class VideoCaptureWrap: public node::ObjectWrap {
|
|
public:
|
|
cv::VideoCapture cap;
|
|
|
|
static Persistent<FunctionTemplate> constructor;
|
|
static void Init(Handle<Object> target);
|
|
static NAN_METHOD(New);
|
|
|
|
VideoCaptureWrap(const std::string& filename);
|
|
VideoCaptureWrap(int device);
|
|
|
|
static NAN_METHOD(Read);
|
|
static NAN_METHOD(ReadSync);
|
|
|
|
//(Optional) For setting width and height of the input video stream
|
|
static NAN_METHOD(SetWidth);
|
|
static NAN_METHOD(SetHeight);
|
|
|
|
// to set frame position
|
|
static NAN_METHOD(SetPosition);
|
|
|
|
static NAN_METHOD(GetFrameAt);
|
|
|
|
//close the stream
|
|
static NAN_METHOD(Close);
|
|
};
|
|
|