Image Processing Reference
In-Depth Information
function normalised=normalise(image)
%Histogram normalisation to stretch from black to white
%Usage: [new image]=normalise(image)
%Parameters: image-array of integers
%Author: Mark S. Nixon
%get dimensions
[rows, cols]=size(image);
%set minimum
minim=min(min(image));
%work out range of input levels
range=max(max(image))-minim;
%normalise the image
for x=1:cols %address all columns
for y=1:rows %address all rows
normalised(y, x)=floor((image(y,x)-minim)*255/range);
end
end
Code 3.2
Intensity normalisation
400
200
n_hi st bright
0
50
100
150
200
250
bright
(a) Intensity normalised eye
(b) Histogram of intensity normalised eye
400
200
e_h ist bright
0
50
100
150
200
250
bright
(c) Histogram equalised eye
(d) Histogram of histogram equalised eye
Figure 3.6
Illustrating intensity normalisation and histogram equalisation
Search WWH ::




Custom Search