diff --git a/src/Histogram.cc b/src/Histogram.cc index 5faf297..77e774a 100644 --- a/src/Histogram.cc +++ b/src/Histogram.cc @@ -20,7 +20,6 @@ NAN_METHOD(Histogram::CalcHist) { Matrix* m0 = Nan::ObjectWrap::Unwrap(info[0]->ToObject()); cv::Mat inputImage = m0->mat; - //int dims = 3; // Arg 1 is the channel Local nodeChannels = Local::Cast(info[1]->ToObject()); const unsigned int dims = nodeChannels->Length(); @@ -29,8 +28,6 @@ NAN_METHOD(Histogram::CalcHist) { channels[i] = nodeChannels->Get(i)->IntegerValue(); } - //int channels[] = {0, 1, 2}; - // Arg 2 is histogram sizes in each dimension Local nodeHistSizes = Local::Cast(info[2]->ToObject()); int histSize[dims]; @@ -39,7 +36,6 @@ NAN_METHOD(Histogram::CalcHist) { } // Arg 3 is array of the histogram bin boundaries in each dimension - Local nodeRanges = Local::Cast(info[3]->ToObject()); /// Set the ranges ( for B,G,R) ) float histRanges[dims][2]; @@ -54,8 +50,6 @@ NAN_METHOD(Histogram::CalcHist) { ranges[i] = histRanges[i]; } - //const float** histRanges1 = const_cast(histRanges); - // Arg 4 is uniform flag bool uniform = info[4]->BooleanValue(); @@ -65,13 +59,6 @@ NAN_METHOD(Histogram::CalcHist) { // Perform calcHist cv::calcHist(&inputImage, 1, channels, cv::Mat(), outputHist, dims, histSize, ranges, uniform); - // Wrap the output image - /*Local outMatrixWrap = Nan::NewInstance(Nan::GetFunction(Nan::New(Matrix::constructor)).ToLocalChecked()).ToLocalChecked(); - Matrix *outMatrix = Nan::ObjectWrap::Unwrap(outMatrixWrap); - outMatrix->mat = outputHist; - - info.GetReturnValue().Set(outMatrixWrap);*/ - v8::Local arr = Nan::New(histSize[0]); if(dims < 1 || dims > 3){