Hybrid Images - Kayle Gishen

Overview

Hybrid images are the result of combining high frequency components of one image with low frequency components of another. The interpretation of the resulting image changes depending on viewing distance, the high frequency parts are visible when near (or large). At a distance (or small) the high frequency components are no longer visible and a a result only the low frequency pieces are.

Algorithm

The general flow of the algorithm involves computing 2 image pyramids per image, for a total of 4 image pyramids. For each image a gaussian pyramid and a laplacian pyramid are generated. Then, using a cuttoff, the gaussian pyramid of one image is combined with the laplacian pyramid of the other. The cuttoff simply defines how many levels of each pyramid we use.

Pyramid Algorithm

During the creation of the pyramid, the gaussian blur parameters are modified on a per level basis. This avoids subsampling a blurred image and then resizing it back to the original dimension so it can be combined. Since only 8 pyramid levels were used, there is very little additional overhead of increasing the blur. Results of this method where compared to the resizing method, and yielded more convincing results (the hybrid image illusion could be better seen). The laplacian pyramid was constructed simultaneously with the gaussian by subtracting the gaussian of the current level from that of the level before and using the result as the laplacian of the level before. At the end the last level of the laplacian is set to the last level of the gaussian.

Hybridizing Algorithm

The hybridizing function takes the last N levels of the gaussian of one image and the first N levels of the laplacian pyramid of the other image.

Extras

Color was added to the image results to see how the effect is perceived. When the color disparity of the subject of the two images is large, color seems to be distracting and degrades the effect. When two images share the same colors in the same places, as with the iMac and MacBook Pro, the effect is enhanced since the high frequency and low frequency components are present.

Results

Conclusions

When the image subject matter is similar, the hybridizing seems to work better and there is less visual noise from blurs. When choosing the image whose high frequencies will be preserved, it is best to choose the one with cleaner edges and little background information. Images with a lot of high frequency structure (fur) seem to have a harder time standing up to the low frequencies of the other image. When using two structurally similar images (apple and orange), the hybridizing appears to texturize the low frequency image with that of the high frequency image. Alignment seems to be a very large factor and when images cannot be aligned in a structurally similar manner, the effect is negatively impacted by visual noise.