15-463: Computational Photography

Pixel Power by Joman Chu

Click for 100% resolution

1a) Use fft2 and ifft2 to remove high frequencies from an image.

Original Modified Notes
derpderp p0-1a-out colored original (source)
fft of original
fft of modified
mask in frequency domain
fftshifted mask

MATLAB's fft2() puts the lower frequencies in the corners of the fft matrix. (I don't completely understand the mathematical reason for this. It has something to do with the discrete transform MATLAB uses.) Therefore to filter out the high frequencies, we need 1s in the corners. I modeled my mask after the one given in the assignment. That one was valid for only one quadrant, so I duplicated and rotated it for the other quadrants so that the box of 1s was in the corners of the mask. You can see this filter works because if I call fftshift() on the mask, it emulates a Gaussian mask where the center (low frequencies) are amplified and the high frequencies are reduced.

The blurring effect isn't very visible unless one views the photos at 100%.

1b) Use a gaussian mask to remove the high frequencies from an image.

Original Modified Notes
derpderp p0-1b-out sigma = 2
colored original (source)
fft of original
fft of modified

2) Sharpen an image using fspecial('unsharp') and imfilter

Original Modified Notes
lobsterdog p0-2-out colored original (source)
fft of original
fft of modified

The sharpening effect isn't very visible unless one views the photos at 100%.

3) Insert a ghost into an image.

Original Modified Notes
crab p0-3-out alpha = 0.2
(source)
ghost (source)

I used alpha blending. Lower alpha values would result in a more ephmeral ghost. For the non ghost sections of the image, I knew that they were all white, so in my loop to do blending, I used the color from the original image if the corresponding pixel in the ghost image was white.

4) Reveal hidden nightlife in a dark image, using either histeq or a gamma transformation.

Original Modified Notes
trains trains_histeq colored original (source)

I used histeq.

Valid XHTML 1.0 Strict