Source Code: a=imread('C:\Users\Desktop\lena.png'); subplot(2,2,1); imshow(a); title('original image'); b=rgb2gray(a); subplot(2,2,2); imshow(b); title('gray scale image'); c=255-a; subplot(2,2,3); imshow(c); title('negative of image'); d=255-b; subplot(2,2,4); imshow(d); title('negaative of gray scale image'); Output: |
Sem 7 > Digital Image Processing >