<< minMaxLoc Image operations subtract >>

scicv >> Image operations > normalize

normalize

Normalizes an image

Syntax

img_out = normalize(img, alpha, beta, normType)

Parameters

img

Image (Mat).

alpha

Norm value or range minimum value (double).

beta

Maximal range value (double).

normType

Norm type (double, NORM_1, NORM_2, NORM_INF or NORM_MINMAX).

img_out

Output image (Mat).

Description

normalize normalizes an image or a histogram, so that the image or histogram has a specified norm or range.

There are two modes of normalization, depending on normType argument:

Examples

scicv_Init();

img = imread(getSampleImage("puffins.png"));

img_template = imread(getSampleImage("puffin_pattern.png"));
img_result = matchTemplate(img, img_template, CV_TM_SQDIFF_NORMED);

gcf().color_map = graycolormap(255);
colorbar(0, 255);

// Normalize the match template result
img_out = normalize(img_result, 0, 255, NORM_MINMAX);

matplot(img_out);

delete_Mat(img);
delete_Mat(img_template);
delete_Mat(img_result);

See also


Report an issue
<< minMaxLoc Image operations subtract >>