Professional Documents
Culture Documents
end
end
end
subplot(2,1,1);
imshow(r);
title('original image');
subplot(2,1,2);
imshow(uint8(z));
title('image after slicing');
OUTPUT:
Image Negative
clear all;
a=imread('Cameraman.tif');
[row col]=size(a);
b=max(a);
l=max(b);
for i=1:row
for j=1:col
p(i,j)=l-a(i,j);
end
end
subplot(1,2,1);
imshow(a);
title('original image')
subplot(1,2,2);
imshow(uint8(p));
title('negative image')
OUTPUT: