cv::normalize not working for 16UC1
I am trying to scale the values of my matrix ucm which is of type 16UC1. The current min and max of ucm is 0 and 1 respectively.
cv::normalize(ucm, ucm, 0, 65535, cv::NORM_L2, CV_16UC1);
double min, max;
cv::minMaxLoc(ucm, &min, &max);
cout << min << " " << max << endl;
The above line of code however, results in a min and max of 0. I never experienced this problem before when scaling matrices of type 8UC1.