Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2017-02-14 01:35:36 -0600

Nbb gravatar image

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.