Added interpolation constants

This commit is contained in:
Max Ehrlich 2015-01-27 12:22:05 -05:00
parent a66d95b537
commit 51be174b6e

View File

@ -4,6 +4,9 @@
#define CONST(C) \
obj->Set(NanNew<String>(#C), NanNew<Integer>(C));
#define CONST_ENUM(C) \
obj->Set(NanNew<String>(#C), NanNew<Integer>((int)(cv::C)));
void
Constants::Init(Handle<Object> target) {
Persistent<Object> inner;
@ -54,6 +57,12 @@ Constants::Init(Handle<Object> target) {
CONST(CV_64FC3);
CONST(CV_64FC4);
CONST_ENUM(INTER_NEAREST);
CONST_ENUM(INTER_LINEAR);
CONST_ENUM(INTER_AREA);
CONST_ENUM(INTER_CUBIC);
CONST_ENUM(INTER_LANCZOS4);
target->Set(NanNew("Constants"), obj);
}