Matlab Code to Get Negative of an Image

clear all;
clc;
close all;

OriImg=imread('lena.tif'); %This will reads the image to i

NegImg=imcomplement(OriImg); %This will moves complement of image i into y



%The below statements will produce the output
subplot(1,2,1);imshow(OriImg);title('Original image');
subplot(1,2,2);imshow(NegImg);title('Negative image');

RESULT:

Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com
Share:

Total Pageviews

CONTACT US

Prof. Roshan P. Helonde
Mobile: +917276355704
WhatsApp: +917276355704
Email: roshanphelonde@rediffmail.com

Enter Project Title

Popular Projects

All Archive

Contact Form

Name

Email *

Message *