Computer Vision - Homework #2
by Benjamin Berger
ID: 4513
Part 1.1 - Gaussian and Laplacian Pyramids
1.1.1 - Gaussian pyramid
- gaussian_pyramid.m: functions that returns array of the Gaussian pyramid images
- reduce.m: returns a gaussian filtered and reduced version of an image (half)
- pad1.m: adds a one pixel border to the bottom and left side of an image to adapt it to 2^N+1
1.1.2 - Laplacian pyramid
- laplacian_pyramid.m: functions that returns array of the Laplacian pyramid images
- reduce.m: returns an expanded and gaussian filtered version of an image (double)
- do_zebra.m: driver using the functions above to create the required pyramid images for the two zebra pictures
1.1.3 - Synthesize Image from a Laplacian pyramid
- synthesize_image.m: synthesizes an image by adding and expanding the layers of its Laplacian pyramid
Comments to matlab functions:
The algorithm in the paper (Burt/Adelson) only works for images with dimensions of N^2+1 pixel.
But because most of the pictures provided are N^2 pixel wide, they had to be made bigger. This was done by
adding an one pixel wide border with the algorithm for padding described in the paper. For more detailed
information see the comments in the matlab files. The following image files are returned by the script file do_zebra.m:
Gaussian and Laplacian pyramid for zebragray image (level 1-8)
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Gaussian and Laplacian pyramid for zebra color image (level 1-8)
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Comments to result images:
The brightness of the Laplacian pyramid images shown is increased for better visibility.
Negative values in the Laplacian pictures would not be shown, so there is 50% gray added
(i.e. 0.5 in double images) to each pixel of each level except the last, because this is
identical to the last level of the Gaussian pyramid.
Part 1.2 - Blending of two images using Multiresolution Spline
1.2.1 - Horizontal blending in middle line
Comments to "better" blending:
Below the results for the function horizontalblend are show.
The second picture is achieved by blending (averaging) each level of the Laplacian
pyramid using one transistion line, whereas the third picture uses three transistion lines
(with 1/4 and 3/4 weight) according to the method described in the paper (p.226 bottom, "apple and orange method").
This leads to a slightly smoother transition between the two images.
Horizontalblend: Hard combined vs. blended and
better blended face images
1.2.2 - Mask blending
Maskblend: Hard combined vs. blended face images
Part 1.3 - Creating non-blended and blended Mosaics
1.3.1 - Non-blended and blended mosaics from memorialhall
Comments to blending:
Horizontalstitch vs. blended_horizontalstitch on memorial images:
Horizontalstitch vs. blended_horizontalstitch on Memorial hall images with different brightness:
This two pictures are a good example for the ability of the Multiresolution Spline to blend images with great photometric differences together.
1.3.2 - Non-blended and blended mosaics from Kent- and New Castle Hall
Horizontalstitch vs. blended_horizontalstitch on two images of Kent- and New Castle Hall:
Part 2 - Estimating translational offset using normalized correlation
- estimate_offset.m: estimates translational offset of N images using normalized correlation
- do_estimate.m: demonstration for estimate_offset using ud1-ud4 images producing blended mosaic (shown below)
Horizontalstitch vs. blended_horizontalstitch on Kent- and New Castle Hall images:
used subimages (templates) for normalized correlation (interactively picked):
Horizontal- and vertical stitch of images using displacement vectores
- horzvertstitch.m: stitches mosaic together from N images using both horizontal and vertical displacement vectors dx and dy
- do_ud_hvstitch.m: demonstrate function above stitching the Kent/New Castle Hall images horizontally and vertically together
- do_mh_hvstitch.m: do the same with memorial hall images
Horizontal- and vertical stitch on Kent- and New Castle Hall images:
Horizontal and vertical stitch of Memorial hall images:
Bonus picture demonstrating full color ability of maskblend.m function:

Christopher van Borg - Resistance is futile!
Now I am totally done, exhausted and tired. Too good that the next homework is already waiting...
created 03/17/03 by Benjamin Berger