Different image operation (Addition, Subtraction, Multiplication, Division) of images using MATLAB

1.Introduction:-
In image processing many image operations are required including addition, subtraction, multiplication, division of images.


2.Problem Statement:-
To study different image operation.


3.Program:-

clc;
clear all;
close all;
a=imread('C:\Users\akshay\Pictures\desert.jpg');
subplot(3,2,1);
imshow(a)
title('1st input image')
b=imread('C:\Users\akshay\Pictures\koala.jpg');
subplot(3,2,2);
imshow(b)
title('2nd input image')
c=imadd(a,b);
subplot(3,2,3);
imshow(c)
title('Addition of images')
d=imsubtract(a,b);
subplot(3,2,4);
imshow(d)
title('Subtraction of images')
e=immultiply(a,b);
subplot(3,2,5);
imshow(e)
title('Multiplication of images')
f=imdivide(a,b);
subplot(3,2,6);
imshow(f)
title('Division of images')


4.How to use this code:-
Here you have to only copy the code to MATLAB and and give the location of the images on which you wants to perform given operation.


5.Output :-



 Figure Window  


                              

6.Conclusion -


Here we have successfully perform operation (Addition, Subtraction, Multiplication, Division) of images  using MATLAB .

Comments

Popular post

How to add ,read,insert IMAGE in MATLAB

How to plot different discrete signal using MATLAB

How to do Frequency Shift Keying (FSK) using MATLAB