Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Conflicts:
	src/Matrix.cc
	src/Matrix.h
  • Loading branch information
Alexander Milchev committed May 18, 2016
commit e6f01f7ce892bb62bc56ae60752454497879d4a2
18 changes: 18 additions & 0 deletions src/Matrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ void Matrix::Init(Local<Object> target) {
Nan::SetPrototypeMethod(ctor, "shift", Shift);
Nan::SetPrototypeMethod(ctor, "reshape", Reshape);
Nan::SetPrototypeMethod(ctor, "release", Release);
<<<<<<< HEAD
Nan::SetPrototypeMethod(ctor, "inpaint", Inpaint);
=======
Nan::SetPrototypeMethod(ctor, "subtract", Subtract);
>>>>>>> df9959ae7dbfa57fb39147dcb745e67775154b11

target->Set(Nan::New("Matrix").ToLocalChecked(), ctor->GetFunction());
};
Expand Down Expand Up @@ -2606,3 +2610,17 @@ NAN_METHOD(Matrix::Inpaint) {

info.GetReturnValue().Set(img_to_return);
}

NAN_METHOD(Matrix::Subtract) {
SETUP_FUNCTION(Matrix)

if (info.Length() < 1) {
Nan::ThrowTypeError("Invalid number of arguments");
}

Matrix *other = Nan::ObjectWrap::Unwrap<Matrix>(info[0]->ToObject());

self->mat -= other->mat;

return;
}
2 changes: 2 additions & 0 deletions src/Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class Matrix: public node_opencv::Matrix{
JSFUNC(Release)

JSFUNC(Inpaint)

JSFUNC(Subtract)
/*
static Handle<Value> Val(const Arguments& info);
static Handle<Value> RowRange(const Arguments& info);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.