CS180 Project 2: Fun with Filters and Frequencies!

Overview

Project delves into various methods to manipulate frequencies to process and blend images together.

1.1+1.2 Fun with Filters

Finite Difference Operator

Have the finite difference operators D_x ([-1 1]) and D_y ([-1 1].T) used to convolve the cameraman image.

Subsequently will take the gradient magnitude and binarize it setting on 0.1 as the best threshold to display edges as clearly as possibly while suppressing noise.

OG Cameraman pic
Gx
Gy
Gradient Magnitude
Binarized Gradient magnitude

Introduced the “G” Gaussian Filter to use and create a blurred version of the original image. Method is the Derivative of Gaussian (DoG) Filter

Blurred Cameraman

Tried 2 methods, one with 2 convolutions and another with 1 convolution. Noticeable difference compared to simply using finite difference operator was thicker lines on the binarized edges and noise is cleared up more (particularly bottom) compared to previously. Lower threshold is likely possible to achieve similar results.

Between the double and single convolution, they look identical which is desired

2.1 Image “Sharpening”

Want to strengthen the high frequencies of the image to “sharpen” it. Acquire the high freqs by blurring the image (with Gaussian filter) which are the low freqs and then subtracting it from the OG image. Turned the process into an unsharp mask filter using 1 convolution.

OG Taj

V Plush Sharp

OG V Plush img
High Freq V Plush
Sharpen V Plush img, make it look like it used a fuzzier cloth material for plus

Duck Shar-Sharpen

OG Duck

Blurred Duck
High Frequency Duck
Blurred Sharp Duck
High Frequency Sharp Duck
Sharp Duck

Sharpened Sharp Duck

2.2 Hybrid Images

Want to create a hybrid image where the high frequency image is more visible up close and the low frequency image is more visible from afar. Blending the 2 images together results in the hybrid image.

Derek (Low Frequency Image)
Nutmeg (High Frequency Image
Putting Derek on Nutmeg (can make him out on head and neck)
Putting Nutmeg on Derek (reversed high and low frequencies used for image), can see the whiskers and ears
Fourier Analysis, had to go to OH and learned I had to make a new approach to go by channel vs headbutt charging the entire image in one go so spent some hours cooking it up to get the fourier
For some reason the fourier for when doing the image in one go, nobody could figure out why this happened in OH so had to make an entire new approach to get the left one

Tari + Dr. Edgar Zomboss (My grades aka Failure)

Tari (High Frequency)

Dr. Edgar Zomboss (Low Frequency)

Hybrids

Failed since the shapes, especially body posture/shape and head, were too different to make work even tho there may have been potential particularly on the left one. If Zomboss had a background and Tari didn’t it may have turned out different.

Giga Craig

Craig (High Frequency)
Squid (Low Frequency
My Guy just mega evolved with this hybrid image

B+W (Gen5 the best unique pokemon gen besides Gen1)

The images in Color vs just simply grayscale. Since the low frequency image (nutmeg the cat) is not super prominent, the one where nutmeg is in black and white vs color is not super noticeable however, compared to both of them being in Black and White, adding color is an improvement on all fronts.

Both Derek and Cat are in BW
Full Color on both
Cat is colored, Derek is bw
Derek is colored, cat is bw

2.3 + 2.4 Multi-resolution Blending and the Oraple Journey (adding another coding nemesis to the list)

Implemented Gaussian and Laplacian stacks to spawn the Oraple. Experimented and settled on 10 levels being sufficient for the stacks.

Gaussian Stack was made by creating an array to store each level with the original image being added first. Subsequent levels would be appended by applying the Gaussian Filter and blurring the image over and over again.

Laplacian Stack was made to have each level consist of the equivalent Gauss Level and having it be subtracted by the next level (i.e. Level 6 in Lap Stack is “Level 6 Gauss Stack - Level 7 Gauss Stack”

The mask (at least for oraple) would be an equal split of the image in black and white (left half of the apple and right half of the orange).

To get the blended image, the mask is applied to each level of the apple and orange (inverse mask from apple tho) Laplacian stack and adding them together. The stack combination has to be collapsed to get the final blended Oraple image.

Apple
Orange
Oraple, da Project Mcguffin (bit blurry as zoomed in a bit more for visibility)

Flan Brulee

Creme Brulee
Flan

Mask
Flan Brulee (managed to get a result where the creme brulee rim sorta blends into the plate)

Wet lover Shattering Icy lover’s bisexuality

Jealousy (Juvia expressing non-verbal threat to Gray for looking at loosely dressed Cana) (fun fact, this episode came out like 3 days ago, Fairy Tail Hundred Year Quest)
Drip Goku
Mask
Hybrid Image, lust for Goku at your own peril (also the blending sorta gave him a cool aura that distorts reality around him)

B+W, all images are colored here and would look better than black and white variants (given BW could result in loss of detail and harder to see blending as easily)