Final Project

CS194-26 Final Project (Project Web Page)

Project Overview

In this project we implemented Fake Miniaturization of photographs as well as reconstructing the infamous Dolly zoom.

Fake Miniatures

The Process

1 - take a picture

2 - increase the saturation so that the images look nicer after color loss during blurring

3 - create a multilayer gaussian pyramid (all of the layers are the same size)

4 - develop a mask for each layer indicating how much blur should be assigned to each image. All the masks should cover the sharp line of focus. And the areas far away from the line should have a high blur whereas the areas closer should have a lower amount of blur

4 - merge each gaussian layer using the corresponding mask so that only the corresponding region is blurred

Code Usage

      
usage: fm.py [-h] -im IM [-s SIGMA] [-w OG_WIDTH] [-n NUM_LAYERS] [-m MASK_WIDTH] [-seg SEGMENT]
                   [{point_blur}]

      positional arguments:
        {point_blur}

      optional arguments:
        -h, --help            show this help message and exit
        -im IM, --im IM
        -s SIGMA, --sigma SIGMA
        -w OG_WIDTH, --og_width OG_WIDTH
        -n NUM_LAYERS, --num_layers NUM_LAYERS
        -m MASK_WIDTH, --mask_width MASK_WIDTH
        -seg SEGMENT, --segment SEGMENT

        The process:
          1. Run: python fm.py point_blur -im IM [-s SIGMA] [-w OG_WIDTH] [-n NUM_LAYERS] [-m MASK_WIDTH] [-seg SEGMENT]
             If seg == True, the code will treat the endpoint you specify as a line segment rather than a full line of equal focus
             If seg == False, the code will treat the endpoints you specify as a full line all of which has equal focus
          2. Select two points
          3. Image will be produced in output folder
        
    

Results

Buildings - Linear Blur

Source: http://www.offshootstudios.com/tag/skyscrapers/

Original Image
Gaussian Mask Created
Output: Sigma = 2
Output: Sigma = 3
Output: Sigma = 4

Canyon - Non-Linear Blur

Source: https://www.nature.com/news/agriculture-increase-water-harvesting-in-africa-1.17116

Original Image
Gaussian Mask Created
Output: Sigma = 1.7
Output: Sigma = 3.5

Kobe - Linear Blur

Source (2010 NBA Finals): https://www.youtube.com/watch?v=uqf13CnVVSo

Original Image
Gaussian Mask Created
Output: Sigma = 2
Output: Sigma = 3
Output: Sigma = 3

Kobe - Non-Linear Blur

Original Image
Gaussian Mask Created
Output: Sigma = 2
Output: Sigma = 2.5
Output: Sigma = 3

Liberty Bridge - Linear Blur

Original Image
Gaussian Mask Created
Output: Sigma = 3
Output: Sigma = 4

Liberty Bridge - Non - Linear Blur

Source: https://www.wbur.org/hereandnow/2016/07/04/pittsburgh-city-of-bridges

Original Image
Gaussian Mask Created
Output: Sigma = 3.5
Output: Sigma = 3.5
Output: Sigma = 4

View From Citadel Tower (Picture I Took)

Original Image
Gaussian Mask Created (1.7)
Output: Sigma = 1.7
Output: Sigma = 2.5
Output: Sigma = 2.75 - Window Width: 180px

View From Campanile (Picture I Took)

Original Image
Gaussian Mask Created (1.7)
Output: Sigma = 1.7
Output: Sigma = 2.5

Vertigo Shots

Altoids

Altoids 1
Altoids 2
Altoids 3
Altoids 4
Altoids 5
Altoids 6
Altoids 7
Altoids 8
Altoids 9
Altoids 10

via GIPHY

Bear

Bear 1
bear 2
bear 3
bear 4
bear 5
bear 6

via GIPHY