differece image of 2 images

Illustration
Sajitha K.N. - 2022-02-24T12:50:23+00:00
Question: differece image of 2 images

How to calculate difference image of 2 images read from different folders?

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

MATLAB provides imabsdiff function to find the absolute difference of two images. The following code might help you.

 

% read image from folder 1 
image1=imread('yourImage1.webp'); 
% read image from folder 2 
image2=imread('yourImage2.webp'); 
% calculate the absolute difference 
absDiffImage=imabsdiff(image1,image2); 
% plot the absolute difference image 
figure; 
imshow(absDiffImage,[]); 
colormap(jet); 
colorbar; 

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!