Write a MATLAB program for image addition


Hints: Both image have the same size and class or Second image  must be a scalar double.

Code:

clear;
clc;
I=imread('d:/matimage/arithmetic/baby1.jpg');
J=imread('d:/matimage/arithmetic/nature.jpg');
K=imadd(I,J);
imshow(K)
%subplot(1,3,1),imshow(I),title('Baby image');
%subplot(1,3,2),imshow(J),title('Nature image');
%subplot(1,3,3),imshow(K),title('Added image');

Output:




No comments

Powered by Blogger.