Documente Academic
Documente Profesional
Documente Cultură
I = imread('brain_contrast.png');
figure;imhist(I);
b)
J = im2double(I);
[m n] = size (J);
c =1;
r = 0.4;
for i = 1:m
for j = 1:n
g(i,j) = c*(J(i,j).^r);
end
end;
'imshow(J),figure,imshow(g);
c)
k = histeq(I,256);
imwrite(k,'histeq.jpg');
h = imhist(k);
d)
power law
e)
a = imread('brain_contrast_big.png');
b = histeq(a);
figure; imhist(b)
8)
'AVERAGING
d = imread('brain_noise_gaussian.png');
e = imread('brain_noise_pepsalt.png');
h1 = ones(3,3)/9;
h2 = ones(5,5)/25;
o1 = imfilter (d,h1);
o2 = imfilter (d,h2);
p1 = imfilter (e,h1);
p2 = imfilter (e,h2);
figure, imshow(o1), title('avg 3x3 gaussian');
figure, imshow(o2), title('avg 5x5 gaussian');
figure, imshow(p1), title('avg 3x3 pepsalt');
figure, imshow(p2), title('avg 5x5 pepsalt');
'MEDIAN
A1 = medfilt2(d, [3
A2 = medfilt2(d, [5
B1 = medfilt2(e, [3
B2 = medfilt2(e, [5
figure, imshow(A1),
figure, imshow(A2),
figure, imshow(B1),
figure, imshow(B2),
3]);
5]);
3]);
5]);
title('med
title('med
title('med
title('med
3x3
5x5
3x3
5x5
gaussian');
gaussian');
pepsalt');
pepsalt');
9)