Part I: Hybrid Images
Hybrid image is a static image that has different views based on the viewing distance. Here are the experiments I did with hybrid images with MATLAB.
A Hybrid Image Result
In the first example, I created a hybrid image for the Forest Park. Viewing from a distance, you can only see the low-frequency (smooth) part, i.e., the park when there are few people nearby. But moving closer, the high-frequency part is viewable and dominant. You can see a live show there on July 4, when there are lots people sitting on the lawn.
1) the original and filtered input images (w/ FFT images)
For the low-pass picture, I chose a distant view of the lawn and the crowd. And I applied the Gaussian filter with fspecial
and imfilter
.
Original Image 1 | Filtered Image 1 |
---|---|
For the high-pass image I chose the closer view. I used fspecial
and imfilter
as well, with the difference between single pulse and a gaussian filter to make my Laplacian filter.
Original Image 2 | Filtered Image 2 |
---|---|
In both images, I used the cut-off frequency larger than 1 to make the contrast more obvious.
By the images chosen are about landscape scenes (the major theme of my photograph), I didn’t align or crop the images. But some other hybrid images, for example, with faces, should consider the translation and rotation as well.
2) the hybrid image (w/ FFT image)
Hybrid Result | FFT Image |
---|---|
I include the Fourier transforms as well.
Two More Examples
This example is the hybrid image which want to show the Gateway Arch in St. Louis. One is the view of the top from the bottom, and one is the view of the bottom frm the top.
Original Image 1 | Original Image 2 | Hybrid Result |
---|---|---|
It doesn’t work well. I think the pattern of the high frequency image is too simple and the hybrid image doesn’t reflect the architecture well.
The next example is a hybrid image about blossom in Japan House, which gives the viewer a general idea about the spring on campus.
Original Image 1 | Original Image 2 | Hybrid Result |
---|---|---|
Part II: Image Enhancement
The second part is some experiments of image enhancement.
Contrast Enhancement
This picture was taken under strong sun light, so the intensity doesn’t cover the full range.
Original Image | Laplacian Filtering | Gamma Correction | Histogram Equalization |
---|---|---|---|
After comparing the three results, Histogram Equalization gives the highest degree contrast, but it might be too much contrast. Laplacian filter is softer, and it also looks nice.
Color Enhancement
Original Image | After Color Enhancement |
---|---|
I used rgb2hsv
to convert the images to HSV color space and extract the saturation channel, the second layer of the image. Then, I increased the saturation amount pixel by pixel based on the difference between the original value and 1, color_s_aft(i,j) = color_s_aft(i,j) + (1-color_s_aft(i,j))/8
,to make the color brighter.
Color Shift
I used the same picture again. It is the river side of Mississipi River, and color of the sand as well as the the road is quite yellow.
Original Image | More Red | Original Image | Less Yellow |
---|---|---|---|
I changed the value in hue in hsv
. To make the image more red, since the range in hue is very low for red color, so I divided the hue value of each pixel by 20 to get the new value. To make it less red, I try to make it more blue, by changing the hue value again.
Color in Hybrid Image
I tried to use color to enhance the image.
Hybrid Result | Color in Low Freq | Color in High Freq | Color in both |
---|---|---|---|
In my example, using color makes the low-frequency component more obvious, since it enhances the contrast. For the high frequency component, it is better also, but only slightly.
Gaussian and Laplacian Pyramid
I applied Gaussian filter and Laplacian filter five times, respectively, and had these pyramid results.