Professional Documents
Culture Documents
AIM:
Write a generalised function called normalisation any colored or gray image
to perform image to perform image normalisation of following types.
a) Pixel Normalisation
b) Pixel Centering
c) Pixel standardization
SOFTWARE USED:
MATLAB
CODE:
C=imread("lena.jpg");
imshow(C);
D=double(im2gray(C));
pixelnorm = normalise(D);
minmax1 = minmax(pixelnorm);
M = mean2(D);
pixelcentring = centering(D,M);
standard = std2(pixelcentring);
pixstandard = standardising(pixelcentring,standard);
stdpix = std2(pixstandard);
meanpix = mean2(pixstandard);
meancentring = mean2(pixelcentring);
RESULT:
workspace:
CONCLUSION:
This MATLAB experiment processes the Lena image by normalizing, centering,
and standardizing its pixel values. The normalized pixel matrix exhibits
values between 0 and 1. Centering involves subtracting the mean, while
standardizing involves dividing by the standard deviation. The experiment
outputs statistics such as the min and max values of the normalized matrix,
mean of the centered matrix, mean and variance of the standardized matrix.
These transformations are fundamental in image processing for enhancing
comparability and statistical analysis of pixel values.