CS194-26: Image Manipulation and Computational Photography, Fall 2017

Final Project: Fake Miniature + Seam Carve

Yanhe Chen

Part 1 : Fake Miniatures

In this assignment I create fake miniatures (a prolific flickr topic) by simulating the effect of selective focus cameras, also known as Tilt Shift. Most methods rely on photo editors like GIMP and Photoshop to achieve the effect. A user selects a focus plane by masking a region of interests and applying a blurring filter to the rest of the image. Effectively this narrows the perceived depth of field in the scene and creates the illusion that the lens was really close to the subject.

1. I set a focus line input by myself

2. I define the size of the fake depth of filed(DOF)

3. I blur the image through gaussian blur to 2D matrix with sigma 2.

4. I saturate all the images by 1.1.(turning into rgb2hsv and multiply 1.1 and hsv2rgb.

Image One with DOF = 50 and DOF = 100

Image Two with DOF = 50 and DOF = 100

Image Three with DOF = 50 and DOF = 100

B AND W

Failure cases Analysis:

When dof is small (like 10) or selecting points are close, the pictures looks all blurry or there is a distinct line might appear on the final result.

Animation

Part 2 : Seam Carve

One of the papers at SIGGRAPH that made news when it first came out was Seam Carving for Content-Aware Image Resizing by Shai Avidan and Ariel Shamir. In this assignment, you'll be implementing the basic algorithm presented therein. To wit, you'll be designing a program which can shrink an image (either horizontally or vertically) to a given dimension.

1.Determine the 'importance' each pixel has using an dynamic programming to find the energy map.

2. Find the lowest-importance seam in the image.

3. cut them out.

4. repeat N times

Image One with 100 vertical seam and 150 horizontal seam

Image Two with 100/200 vertical seam and 50 horizontal seam

Image Three with 100 vertical seam and 150 horizontal seam

Image One with 200 vertical seam and 100 horizontal seam

Image One with 200 vertical seam and 100 horizontal seam

Image One with 200 vertical seam and 100 horizontal seam

W AND B:Failure case: When horizontal or vertical seams are too many

Thanks