CSCI1430 : Project 1 - Hybrid Images

rdfong

In this project we create hybrid images described in the siggraph paper, Hybrid Images. The goal was to combine two pictures together in such a way such that from a distance the image looks like one of the images, but from close up, looks like the other. This was done by creating gaussian and laplacian pyramids of both images and adding different levels of different pyramids together.

Gaussian and Laplacian pyramids

  1. We start by creating a gaussian and laplacian pyramids for both images. We first define a pyramid of depth N.
  2. Apply a gaussian blur to the original image. This image is the first level of the gaussian pyramid.
  3. Subtract the blurred image from the original. This is the first level of the laplacian pyramid. Each level of the laplacian pyramid represents edges at different frequency ranges of the original image. The higher up the pyramid we are the lower the frequency. This is because we are taking the highest frequency edges of the image we are subtracting from, but as we move up the pyramid, said image gets blurred more and more, removing the new highest frequency edges at each level.
  4. Scale the blurred image down to half its original width/height. Treat this as your new original image.
  5. Repeat the last 3 steps until you have N pyramid levels to get your gaussian and laplacian pyramids.

  6. The process can be visualized as follows:

    Combining Images

    1. Now we want to combine levels of the pyramids together to get our hybrid image. We start with the top level (smallest and most blurred) of the gaussian of one of the images, A. Let's call this image I.
    2. Choose some number of top levels of the laplacian pyramid (lower frequency edges) of the same image and add it to I. Make sure all the levels are rescaled up to the size of the original image.
    3. Choose some number of bottom levels of the laplacian pyramid (higher frequency edges) of the other image, B, and add those to I as well. This is your final image. From afar you should see A and from close you should see B. Note that the number of levels that should be used for each pyramid will vary based on the image.

    4. My results are shown below. The algorithm worked fairly well for these examples with enough tweaking of parameters (pyramid depth and pyramid levels used for each image). It obviously would not work as well for images that are too disimilar in shape as none of object boundary edges would line up properly. It works especially well ror combining faces.

      Results