diff --git a/README.md b/README.md index 38b53a3..f7475c9 100755 --- a/README.md +++ b/README.md @@ -49,7 +49,11 @@ base datastructure in OpenCV. Things like images are just matrices of pixels. #### Creation - new Matrix(width, height) + new Matrix(cols, rows) + +Or if you're thinking of a Matrix as an image: + + new Matrix(height, width) Or you can use opencv to read in image files. Supported formats are in the OpenCV docs, but jpgs etc are supported. diff --git a/src/Matrix.cc b/src/Matrix.cc index f4e096b..01f1527 100755 --- a/src/Matrix.cc +++ b/src/Matrix.cc @@ -105,10 +105,8 @@ Matrix::Matrix(): ObjectWrap() { } -Matrix::Matrix(int w, int h): ObjectWrap() { - mat = cv::Mat(w, h, CV_32FC3); - //TODO:Parametrizar esto - //mat = cv::Mat(h, w, CV_8UC3); +Matrix::Matrix(int cols, int rows): ObjectWrap() { + mat = cv::Mat(cols, rows, CV_32FC3); } Matrix::Matrix(cv::Mat m, cv::Rect roi): ObjectWrap() {