- Implement the simple 5 X 5 kernel in the Multi-Spline paper
- Implement REDUCE function in the paper.
- Implement EXPAND function in the paper. This was a little tricky,
because of the different pixel-pair combinations.
- Make binary "boundary image or mask : S(i,j) = 1 for A, S(i,j) =
0 for B. In my case, this was simple : 1 on the left and 0 on the right.
- Compute Gaussian pyramid for the mask.
- Compute Laplacian pyramids for images A and B.
- Blend each pyramid layer using the formula Lout = (GS)LA + (1-GS)LB
- Collapse or rebuild Lout pyramid by expanding each level and adding
it to the level above.
This project had horrible complexities, the major ones and the solutions
of which were :
- the colormap issue : How do you handle the calculations with
a 3-element wide color vector.
In order to solve this, I divided each image into
3 layers for red, green and blue, and individually did the Gaussian / Laplacian
calculations for each layer).
- the image mapping issue : How do you combine 2 images and
a mask image, when each one could have a different size and colormap ?
In order to wimp out of this, I used the same image
mirrored, thereby getting the same size and colormap.
- the "nasty number" issue : How do you prevent MATLAB from
getting nasty computation results that can cause atrocities such as non-integer
indexes etc ?
In order to scrape out from this one, I resized
my images to have the size 2^n - 1.
Figure 1: These are the left and right images respectively. They are 513 X 513 images. Unfortunately, because of running times, I had to shrink these images to 129 X 129 images and spline them. In case, the picture on the left does not show properly (It does not on Netscape 4.0), please understand that is the exact mirror image of the right.
Figure 2: This is the result maginfied by 2 ( ie the original result
was 129 X 129, and I used XV to double the size)
It is obvious that I have something "flaky" in either my REDUCE or EXPAND
functions, especially where the smoothing is involved.