In this example, we will demonstrate how we can perform image blending without actually preprocessing the two input images. Let's start:
As always, our first step is to import the two images in MATLAB. As already mentioned, we will use the two images that do not need preprocessing, named
seagull1.jpg
andseagull2.jpg
:>> A = imread('seagull1.jpg'); >> B = imread('seagull2.jpg');
Now that we have loaded our images, we can display them next to each other, to see if they fit our purpose:
>> figure,imshowpair(A,B,'montage');
It is apparent that the images are quite suitable for our purposes. They have almost identical backgrounds and the seagull is at a different part of the image in each picture. So, we can give it a go, by asking MATLAB to blend the two images:
>> imshowpair(A,B,'blend');
Let's now say that we want to achieve a more psychedelic result, with pseudo colored elements. Well, I have good news for you! MATLAB provides this without...