CS180 Project 2

Rishi Nath 2024

Part 1: Fun with Filters

Part 1.1

The partial derivatives and gradient of the cameraman image using D_x and D_y are shown below. The magnitude of the gradient is simply calculated by taking the square root of the sums of the two partial derivative images.

Part 1.2

The same operation described is shown here, except we first "blur" the image by convolving with a gaussian filter. This time, we use Derivative of Gaussian filters, which look like this: And the effect is this: I noticed that while very similar to before, there are some slight differences, though I suspect this has to do with scipy's convolve2d edge behaviour.

Part 2: Fun with Frequencies

Part 2.1

Here are some images sharpened using the "unsharp" filter. There are no intermediate steps as the sharpening is done with one convolution. For evaluation, here's a re-sharpened image. I noticed that re-sharpening doesn't work perfectly, which makes sense, as we shoud lose some information when blurring,

Part 2.2

My first hybrid image is a hybrid between two Pokemon: I'm happy how this turned out, you can see the Frosmoth clearly up close, but Volcarona dominates far away. Here's the FFT:
Another hybrid is between two look-alike-actors: I'm really happy about this one. Since the actors look so similar already, it was tough to get right, but it definitely looks like Cera up close, and that one actor that plays Zuckerburg from far away.
Finally, Biden and a bust of Aurelian (a Roman emperor) I think this one was funny, but didn't really work.

Part 2.3

Here's an example of a Gaussian stack: And an example of a Laplacian stack: And the oraple process: Note that I used a "mask" wheere the left half was all 1 and the right half was all 0. I put that mask through the gaussian stack process. Basically, I followed the instructions in the paper. Anyways, here's the final oraple:

Part 2.4

The oraple is pictured above. Here's some other blends:
First, I blended Oski and the Pokemon Bewear. I used an oval mask to capture Oski's face. I also blended Minas Tirith from Lord of the Rings and King's Landing from Game of Thrones. Maybe they're invading across dimensions or something. I chose these images because the mountain line sort of matched up. I used an irregular mask to try to capture the city of Minas Tirith but leave out the surroundings, whose artstyle clashed with the King's landing artwork.