im8 = imread('car1.tif'); %this image is included in Matlab

car1=double(im8); %for further processing you need to convert the image into double

im8 = imread('car2.tif'); %this image is included in Matlab

car2=double(im8); %for further processing you need to convert the image into double


figure; imagesc(car1); colormap(gray);%displays image

%figure; colormap(gray(256)); image(car1); %displays image withouth Image Proc. TB

figure; imagesc(car2); colormap(gray);%displays image

imdiff=((car2-car1)+255)./2;



figure; image(imdiff); colormap(gray);



a=zeros(160,160);
figure; image(a); colormap(gray);

a=zeros(160,160)+255;
figure; image(a); colormap(gray);