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.
35 lines
634 B
C++
Executable File
35 lines
634 B
C++
Executable File
#include "OpenCV.h"
|
|
|
|
using namespace std;
|
|
|
|
class Contour: public Nan::ObjectWrap {
|
|
public:
|
|
cv::Mat mat;
|
|
vector<vector<cv::Point> > contours;
|
|
vector<cv::Vec4i> hierarchy;
|
|
|
|
static Nan::Persistent<FunctionTemplate> constructor;
|
|
static void Init(Local<Object> target);
|
|
static NAN_METHOD(New);
|
|
|
|
Contour();
|
|
|
|
JSFUNC(Point)
|
|
JSFUNC(Points)
|
|
JSFUNC(Size)
|
|
JSFUNC(CornerCount)
|
|
JSFUNC(Area)
|
|
JSFUNC(ArcLength)
|
|
JSFUNC(ApproxPolyDP)
|
|
JSFUNC(ConvexHull)
|
|
JSFUNC(BoundingRect)
|
|
JSFUNC(MinAreaRect)
|
|
JSFUNC(FitEllipse)
|
|
JSFUNC(IsConvex)
|
|
JSFUNC(Moments)
|
|
JSFUNC(Hierarchy)
|
|
JSFUNC(Serialize)
|
|
JSFUNC(Deserialize)
|
|
};
|
|
|