CS 7321 Winter 1998
Multiresolutions Images and Splining
Index
How I solved it
This problem set required the implementation of the multiresolution spline
method described by Burt and Adelson. The splining of images
means converting the images into Laplacain pyramid-like structures.
Methodology for creating Gaussian pyramids:
-
Filter the image using a 5 x 5 gaussian kernel
-
Sample the image by extracting only every other pixel
-
Continue the process until reduced image is no smaller than 3 x 3
These reduced images are stacked upon each other creating a pyramid-like
structure with the original image on the bottom. These layers basically
represent the various low-band pass filter images.
Once the been accomplished, we convert the pyramid into a
Laplacian.
The layers of the Laplacian pyramid represent the filter-portion, or error,
of the Gaussian.
Methodology for creating Laplacian pyramids:
-
Let the top-most layer be equal to that of the Gaussian
-
Expand the current layer og the Laplacian pyamid
-
Subtract the expaned layer from the Gaussian layer of the same size to
create the next layer of the Laplacian
This process of creating Gaussian and then Laplacain pyramids occurs
for both images to be splined. The determination of what is to be
splined is calculated using a Gaussian pyramid of a masking image.
The masking contains 1s where the images are to be splined and 0s elsewhere.
The three pyramids are multiplied together using the formula supplied
by Burt and Adelson:
LSi = Gi*LAi + (1-Gi)LBi
Where Gi are the layers of the Gaussain mask pyramid
LAi are
the layers of the Laplacian pyramid of the first image
LBi are
the layers of the Laplacian pyramid of the second image
LSi are
the layers of the output image
The layers of the final output image are summed together using the expand
function.
This reconstructed should, theoretically, be the spling image!
to TOP
Assumptions and Weaknesses
I made the following assumptions
-
The biggest assumption made is that all images are of the same size.
I also assumed that the size of those images are square with the dimension
2^n + 1 where n is a integer > 1
I think the major weakness of my solutions are:
-
The major weakness lies in my first assumption: image size. The algorithm
is highly dependent on the fact that the images must follow properties
stated above. This will exclude the majority of images publicly available.
The severness of the weakness was noted when trying to find test images
for the program.
-
The program was not developed with speed in mind. The splining of
two images with dimension of 513 x 513 required about 2 minutes of computation
on a SGI Indy. This is definetly a drawback to the process.
-
I have hard-coded the size of the convulting Gaussian filter to be 5 x
5. The program can be modified to be more dynamic.The code was not
test for variable-size filters. This is mainly because of my lack
of knowledge of photo-editing programs. If I did know photo-editing,
I'd be wearing a goatee, sipping my cappucino while using a Mac in the
IDT lab.
Improvements and Possible Future Work
I think that this can be improved by doing the following
-
Try to adjust the program to accept images of any size. This improvement
requires the uptost priority.
-
Develop a more interactive splining tool that will allow users to define
the areas to be splined. This may not be possible in Matlab, but
can be done in other languages.
Results
Here is the two images:
|
Left Image
|
Right Image
|
|
|
And here is the result: Elfan Essly!
Source Code
What I learned
Implementing the method described by Burt and Adelson gave me a better
understanding of how images can be recreated using pyramid-like structures.
When reconstructing the image by collasping the Laplacian, I noticed that
the image producd has no noticeable differences from the orignal despite
the loss of information when reducing, then expanding.
I also learned that Irfan and Elvis do not neccesarily make a good couple.