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
Add Matrix(Matrix*) constructor (comes for memory stuff).
  • Loading branch information
btsimonh committed Mar 2, 2018
commit 7875fe1cc7e41d5af7d890b840fcc82969b60b90
5 changes: 5 additions & 0 deletions src/Matrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ Matrix::Matrix(int rows, int cols, int type) :
mat = cv::Mat(rows, cols, type);
}

Matrix::Matrix(Matrix *m) :
node_opencv::Matrix() {
mat = cv::Mat(m->mat);
}

Matrix::Matrix(cv::Mat m, cv::Rect roi) :
node_opencv::Matrix() {
mat = cv::Mat(m, roi);
Expand Down
1 change: 1 addition & 0 deletions src/Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Matrix: public node_opencv::Matrix{
Matrix(cv::Mat other, cv::Rect roi);
Matrix(int rows, int cols);
Matrix(int rows, int cols, int type);
Matrix(Matrix *m);
Matrix(int rows, int cols, int type, Local<Object> scalarObj);

static double DblGet(cv::Mat mat, int i, int j);
Expand Down