Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

opencv

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.

like image 620
user1179510 Avatar asked Aug 19 '12 03:08

user1179510


People also ask

What does CV normalize do?

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. What do alpha and beta mean in the image.

How do I normalize an image in OpenCV?

Then we are reading the image which is to be normalized using the imread() function. Then we making use of normalize() function by specifying the source_array, destination_array, alpha, beta, and normalization type which normalizes the given image. Then the normalized image is displayed as the output on the screen.

How do I normalize an image in Python OpenCV?

Fellow coders, in this tutorial we will normalize images using OpenCV's “cv2. normalize()” function in Python. Image Normalization is a process in which we change the range of pixel intensity values to make the image more familiar or normal to the senses, hence the term normalization.


1 Answers

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

like image 78
carlosdc Avatar answered Sep 22 '22 23:09

carlosdc