mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
- make API more natural (breaks compatiblity, but passes test)
This commit is contained in:
parent
7d4b72e17a
commit
089024bb41
@ -1167,8 +1167,8 @@ NAN_METHOD(Matrix::SaveAsync) {
|
||||
NAN_METHOD(Matrix::Zeros) {
|
||||
Nan::HandleScope scope;
|
||||
|
||||
int w = info[0]->Uint32Value();
|
||||
int h = info[1]->Uint32Value();
|
||||
int h = info[0]->Uint32Value();
|
||||
int w = info[1]->Uint32Value();
|
||||
int type = (info.Length() > 2) ? info[2]->IntegerValue() : CV_64FC1;
|
||||
|
||||
cv::Mat mat = cv::Mat::zeros(h, w, type);
|
||||
@ -1179,8 +1179,8 @@ NAN_METHOD(Matrix::Zeros) {
|
||||
NAN_METHOD(Matrix::Ones) {
|
||||
Nan::HandleScope scope;
|
||||
|
||||
int w = info[0]->Uint32Value();
|
||||
int h = info[1]->Uint32Value();
|
||||
int h = info[0]->Uint32Value();
|
||||
int w = info[1]->Uint32Value();
|
||||
int type = (info.Length() > 2) ? info[2]->IntegerValue() : CV_64FC1;
|
||||
|
||||
cv::Mat mat = cv::Mat::ones(h, w, type);
|
||||
@ -1192,8 +1192,8 @@ NAN_METHOD(Matrix::Ones) {
|
||||
NAN_METHOD(Matrix::Eye) {
|
||||
Nan::HandleScope scope;
|
||||
|
||||
int w = info[0]->Uint32Value();
|
||||
int h = info[1]->Uint32Value();
|
||||
int h = info[0]->Uint32Value();
|
||||
int w = info[1]->Uint32Value();
|
||||
int type = (info.Length() > 2) ? info[2]->IntegerValue() : CV_64FC1;
|
||||
|
||||
cv::Mat mat = cv::Mat::eye(h, w, type);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user