Image Subtraction is used to find the changes between 2 images of a same scene .
Code:
clc
clear all
close all
warning off;
x=imread('1.JPG');
y=imread('Capture.JPG');
g=size(x);
y=imresize(y,[g(1),g(2)]);
figure;
imshow(x);
title('First image');
figure;
imshow(y);
title('Second image');
figure;
imshow(x-y);
title('Difference of two images');
imsubtract documentation:
https://www.mathworks.com/help/images/ref/imsubtract.html
#ImageSubtraction #MATLAB
Download
0 formats
No download links available.
Spot the difference | Image Subtraction | MATLAB | NatokHD