Matlab – imadd Combine Two Images and Add Intensity Value

imadd overlay two images

In this post, we will learn basic command in image processing using Matlab. One of the command is imadd. Image addition will give power to superimpose or overlay an image on top of another or control the brightness of an image. This post will describe two use of imadd which is for combine, joining, adding or overlay two images and the other function of imadd which is to add value to each pixel in the image or picture to control brightness of an image.

Adding value to each pixel in the image or adding the intensity value of the image.

Below is the example imadd command that can be use for this purpose.

i1=imread(‘peppers.png’);
i2=imadd(i1,50);
subplot(2,1,1),imshow(i1);
subplot(2,1,2),imshow(i2);

imadd control brightness

Here is the second usage if imadd which to overlay an image on top of another or some people prefer to call adding two image together. There are two methods that i will provide you to achieve this purpose. Below is the matlab command that can be used to adding two image together.

The first method

i=imread(‘rice.png’);
j=imread(‘cameraman.tif’);
k=imadd(i,j);
imshow(k);

The second method

i=imread(‘rice.png’);
j=imread(‘cameraman.tif’);
k=i+j;
imshow(k);

The second method sometime known as direct addition.

imadd overlay two images

That’s all. So now you can control the brightness of an image and also adding or overlay an image on top of another. All the Matlab command has been tested and should work perfectly.

Thank You.

1 thought on “Matlab – imadd Combine Two Images and Add Intensity Value”

Leave a Reply

Your email address will not be published. Required fields are marked *