CS 7321 Winter 1998

PS#3 Solutions by Gabriel J. Brostow

Images & Splicing


Index


How I solved it

  1. Read in the two images to be spliced:Normalized them (by dividing by 255).
  2. Then I obtained three separate images: R, G, B for both input images: Left & Right.
  3. Genereated the Gaussian and Laplacian Pyramids for each:
    1. Ran Reduce.m recursively on each image --> Gaussian Pyramid for: left image and right image (one color at a time).
    2. Used Expand.m to subtract an Expanded version of each pyramid layer from the (prev) layer which was that size originally.
    3. Note: Reduce() consists of Gaussian-low-pass filtering, and subsampling odd columns and rows,
    4.           Expand() consists of supersampling the small version to the next higher power(2) size, followed by filtering by the same  Gaussian filter, and then a gain adjustment of 4x.
  4. Spliced the Laplacian Images into an Output Pyramid:
    1. Allocated Output image (Out) and its Laplacian pyramid.
    2. For each level of the pyramid:
      1. pixels left of the center column get copied from the Left image,
      2. pixels to the right of the center column get copied from the Right image
      3. pixels in the center column are ave. of the two intensities of Left and Right at that position
  5. Expanded and accumulated the Laplacian pyramid of Out, resulting in a spliced image for each color channel.
  6. Combined color channels (R,G,B) of Out to result in a single image matrix (W, H, 3channels).
to TOP


Assumptions and Weaknesses

I made the following assumptions
  1. Images are square, and have dimensions of (1+2^N).
  2. Left and right were the same size, and that images aren't 24 bit.
  3. Images overlap, and splicing will occur in the horizontal middle of the images.
I think the major weakness of my solutions is:
  1. Program isn't very useful in current form: Sizes must be correct, and images must be overlapping.
  2. Program could be improved if some form of correlation algorithm was used to shift/scale/rotate the neighboring & overlapping images so that splicing would be most effective.
  3. Program is missing the ability to splice images of arbitrary shape, or images that are obviously non-overlapping.
  4. Program doesn't pad the edges of the images, so filtering can resultin flawed edges - ringing.
  5. Technique itself work best for grayscale images, and combining separately processed RGB channels results in apparent edges along the splicing border, even though intensities there do not constitute an actual edge.

to TOP


Results

 
Figure 1:Left and Right input images. These are taken from two different points along the Atlantic City Boardwalk, under different weather conditions. 
 

 

Figure 2: Final image which is the result of splicing the two input images together, and then cropping the output.
 
 
Figure 3: (A) Regular output of applying the splicing algorithm to the two images - this is before cropping. (B) Another output image - this one is the result of spatially shifting one of the input images. Notice that there are two oddly similar buildings just left of the center of the Boardwalk. 
 
 
 
Fig 4: (Left) Gaussian Pramid of Left input image. (Right) Laplacian Pyramid of Left input image. Note: The last four rows of the pictured pyramids are being scaled for display purposes.
 
 
 
Fig 5: Extra images I spliced together...
 

to TOP


Source Code