mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Merge pull request #115 from ytham/master
Adding method pushBack for Matrices
This commit is contained in:
commit
37b3b1bfe3
@ -96,6 +96,8 @@ Matrix::Init(Handle<Object> target) {
|
||||
NODE_SET_PROTOTYPE_METHOD(constructor, "matchTemplate", MatchTemplate);
|
||||
NODE_SET_PROTOTYPE_METHOD(constructor, "minMaxLoc", MinMaxLoc);
|
||||
|
||||
NODE_SET_PROTOTYPE_METHOD(constructor, "pushBack", PushBack);
|
||||
|
||||
NODE_SET_METHOD(constructor, "Eye", Eye);
|
||||
|
||||
|
||||
@ -1633,3 +1635,19 @@ Matrix::MinMaxLoc(const v8::Arguments& args) {
|
||||
|
||||
return scope.Close(result);
|
||||
}
|
||||
|
||||
|
||||
// @author ytham
|
||||
// Pushes some matrix (argument) the back of a matrix (self)
|
||||
Handle<Value>
|
||||
Matrix::PushBack(const v8::Arguments& args) {
|
||||
HandleScope scope;
|
||||
|
||||
Matrix *self = ObjectWrap::Unwrap<Matrix>(args.This());
|
||||
|
||||
Matrix *m_input = ObjectWrap::Unwrap<Matrix>(args[0]->ToObject());
|
||||
|
||||
self->mat.push_back(m_input->mat);
|
||||
|
||||
return scope.Close(args.This());
|
||||
}
|
||||
@ -88,6 +88,8 @@ class Matrix: public node::ObjectWrap {
|
||||
|
||||
JSFUNC(MatchTemplate)
|
||||
JSFUNC(MinMaxLoc)
|
||||
|
||||
JSFUNC(PushBack)
|
||||
/*
|
||||
static Handle<Value> Val(const Arguments& args);
|
||||
static Handle<Value> RowRange(const Arguments& args);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user