mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Added pushBack
This commit is contained in:
parent
021a4bf9d8
commit
e66e0d250e
@ -96,6 +96,8 @@ Matrix::Init(Handle<Object> target) {
|
|||||||
NODE_SET_PROTOTYPE_METHOD(constructor, "matchTemplate", MatchTemplate);
|
NODE_SET_PROTOTYPE_METHOD(constructor, "matchTemplate", MatchTemplate);
|
||||||
NODE_SET_PROTOTYPE_METHOD(constructor, "minMaxLoc", MinMaxLoc);
|
NODE_SET_PROTOTYPE_METHOD(constructor, "minMaxLoc", MinMaxLoc);
|
||||||
|
|
||||||
|
NODE_SET_PROTOTYPE_METHOD(constructor, "pushBack", PushBack);
|
||||||
|
|
||||||
NODE_SET_METHOD(constructor, "Eye", Eye);
|
NODE_SET_METHOD(constructor, "Eye", Eye);
|
||||||
|
|
||||||
|
|
||||||
@ -1633,3 +1635,19 @@ Matrix::MinMaxLoc(const v8::Arguments& args) {
|
|||||||
|
|
||||||
return scope.Close(result);
|
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(MatchTemplate)
|
||||||
JSFUNC(MinMaxLoc)
|
JSFUNC(MinMaxLoc)
|
||||||
|
|
||||||
|
JSFUNC(PushBack)
|
||||||
/*
|
/*
|
||||||
static Handle<Value> Val(const Arguments& args);
|
static Handle<Value> Val(const Arguments& args);
|
||||||
static Handle<Value> RowRange(const Arguments& args);
|
static Handle<Value> RowRange(const Arguments& args);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user