15-463 Project #0: Pixel Power!!!

Done by: Junjie Liang (junjieli)

14 September 2010

Overview

This is a short project that simply uses some matlab functions to do simple image manipulations.

Q1

Q1a

In this problem, we are supposed to use fft2 and ifft2 to remove high frequencies from an image.

Here's the image:

Here's its fft transform:

And here is a serious of masks applied to the transform:










The mask is actually like an inverted L-shape, but because the fft transform of the mask is centered at the origin, the mask is reflected about the origin to fill up all 4 quadrants, thus it looks like a square instead.

Q1b

In this problem, we do the same thing, but we use fspecial to generate a gaussian filter, which is then convolved with the image.
Here is a series of images convolved with a gaussian filter, with the sigma going from 1 to 10.











Note that the blur in this case appears much smoother. I am guessing this is because the gaussian filter is much smoother than the square filter that is used in part (1a).

Q2

In this problem, we are supposed to sharpen an image using fspecial('unsharp') and imfilter. Here are the results.

Before:

After:

Q3

In this problem, we are supposed to add a ghost to an image (in any way). So I googled for a dark image and added a scary entity -- Buttercup!

Q4

In this problem, we are supposed to reveal hidden nightlife in a dark image using histeq or gamma transformation. I chose histeq since it was the more straightforward approach.

Before:

After:

As we can see, brightening the photo causes some of the background features (like the cars in the background) to appear clearer. The words on the road are also clearer.

Acknowledgements

Images were taken from the following places.