A hybrid image that looks like Albert Einstein when viewed closely, and Marilyn Monroe from afar.
A hybrid image is an image that can be viewed in two different ways, depending on a viewer's distance from the image. When closer to an image, a viewer picks up the high frequency signals in the image. When far from an image, a viewer mostly sees the lower frequency signals in the image.
The goal of this project is to create hybrid images by compositing two filtered images, one contains high frequencies, and one contains low frequencies. To achieve the goal, we first implement an image filter that works like the MATLAB native imfilter function. Second, we create low frequency and high frequency images using our custom image filter. Last, we composite the images.
Implementing an image filtering mechanism is the first step to creating hybrid images. Suppose a filter with odd sized dimensions(5x7 but not 4x7) is given, we apply the filter to the image using convolution. Alternatively, we can use Fourier Transformation to transform image signals to frequency domain and filter in the frequency domain. The steps of spatial domain filtering are as the following:
We can then obtain low frequencies of an image by applying a low pass filter such as a Gaussian filter. The high frequencies of an image is obtained by either running a Laplacian filter or subtracting the low frequencies from the original image.
The composition of two images simply requires adding the low frequencies of one image to the high frequencies of another.
![]() ![]() ![]() |
![]() ![]() ![]() |
![]() ![]() ![]() |
![]() ![]() ![]() |
![]() ![]() ![]() |
![]() ![]() ![]() |
In addition to changing viewing distances, another way to view the hybrid images is to down sample the hybrid images at different scales.
Here we can observe the subjects change in the images as they are down sampled.
![]() |
![]() |
![]() |
![]() |
![]() |