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:




Comments

  1. Hi, probably our entry may be off topic but anyways, I have been surfing around your blog and it looks very professional.
    Image Processing India

    ReplyDelete
  2. Thanks a lot for Image Processing negative code.

    ReplyDelete

Post a Comment

Popular posts from this blog

To find the MSE value

Vidicon Camera Tube