mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
add the type function in Matrix class
This commit is contained in:
parent
a36fee5227
commit
12e3c6e25c
@ -35,6 +35,7 @@ void Matrix::Init(Local<Object> target) {
|
||||
Nan::SetPrototypeMethod(ctor, "pixel", Pixel);
|
||||
Nan::SetPrototypeMethod(ctor, "width", Width);
|
||||
Nan::SetPrototypeMethod(ctor, "height", Height);
|
||||
Nan::SetPrototypeMethod(ctor, "type", Type);
|
||||
Nan::SetPrototypeMethod(ctor, "size", Size);
|
||||
Nan::SetPrototypeMethod(ctor, "clone", Clone);
|
||||
Nan::SetPrototypeMethod(ctor, "crop", Crop);
|
||||
@ -497,6 +498,12 @@ NAN_METHOD(Matrix::Size) {
|
||||
info.GetReturnValue().Set(arr);
|
||||
}
|
||||
|
||||
NAN_METHOD(Matrix::Type) {
|
||||
SETUP_FUNCTION(Matrix)
|
||||
|
||||
info.GetReturnValue().Set(Nan::New<Int32>(self->mat.type()));
|
||||
}
|
||||
|
||||
NAN_METHOD(Matrix::Clone) {
|
||||
SETUP_FUNCTION(Matrix)
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ public:
|
||||
JSFUNC(Size)
|
||||
JSFUNC(Width)
|
||||
JSFUNC(Height)
|
||||
JSFUNC(Type)
|
||||
JSFUNC(Channels)
|
||||
JSFUNC(Clone)
|
||||
JSFUNC(Ellipse)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user