In the previous section, we examined ways to produce a composite image from two pictures, without applying any preprocessing to them. Now, it is time to bring forward some of the techniques covered in previous chapters, so that we make our resulting images more sophisticated. Let's start with an easy example. We will try to blend two images of the same size, by first setting a part of their pixels to zero. We will use two pictures taken in a subway station of Berlin. Let's first load and see them:
>> A = imread('bench1.jpg'); >> B = imread('bench2.jpg'); >> imshowpair(A,B,'montage')
As you can observe in the montage of these images, the closer bench (in the right picture) seems to have its upper edge just above the railway ridge of the left picture. If we place a Data Cursor (tenth icon) at its upper edge, we see that it is located at approximately the 796th row. Now, we can try our trick: we will make all pixels below...