What does cv::normalize(_src, dst, 0, 255, NORM_MINMAX, CV_8UC1);

Opencv

Opencv Problem Overview


What does the cv::normalize(_src, dst, 0, 255, NORM_MINMAX, CV_8UC1); do in OpenCV?

I went through the documentation and was unable to understand what alpha, beta, NORM_MINMAX and CV_8UC1 actually do. I am aware alpha sets the lower and beta the higher bound. CV_8UC1 stands for an 8-bit unsigned single channel. But what exactly these arguments do to the picture is what I am unable to comprehend.

Opencv Solutions


Solution 1 - Opencv

When the normType is NORM_MINMAX, cv::normalize normalizes _src in such a way that the min value of dst is alpha and max value of dst is beta. cv::normalize does its magic using only scales and shifts (i.e. adding constants and multiplying by constants).

CV_8UC1 says how many channels dst has.

The documentation here is pretty clear: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#normalize

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1179510View Question on Stackoverflow
Solution 1 - OpencvcarlosdcView Answer on Stackoverflow