diff --git a/src/Matrix.cc b/src/Matrix.cc index 5fb6c43..90a2db4 100755 --- a/src/Matrix.cc +++ b/src/Matrix.cc @@ -1349,13 +1349,13 @@ Matrix::AdaptiveThreshold(const v8::Arguments& args) { double blockSize = args[3]->NumberValue(); double C = args[4]->NumberValue(); - Local img_to_return = Matrix::constructor->GetFunction()->NewInstance(); - Matrix *img = ObjectWrap::Unwrap(img_to_return); - self->mat.copyTo(img->mat); + Local img_to_return = Matrix::constructor->GetFunction()->NewInstance(); + Matrix *img = ObjectWrap::Unwrap(img_to_return); + self->mat.copyTo(img->mat); cv::adaptiveThreshold(self->mat, img->mat, maxVal, adaptiveMethod, thresholdType, blockSize, C); - return scope.Close(img_to_return); + return scope.Close(img_to_return); } Handle