CS194 Seam Carving

i need a new name to replace my deadname, help me, this is a cry for help

I picked an energy function which used a higher-order computation rather than gradient. To compute the energy of a pixel, for each of the 4 neighboring pixels, I subtracted them and squared the error. Then I added the 4 squared differences.

I implemented both vertical and horizontal seam removal.

Results

Using the gradient operator causes single-pixel lines to be registered as having zero energy, and they may be deleted by the algorithm. My energy function avoids this issue and preserves single-pixel lines.

run run carved

The algorithm produces interesting results with both text and photographic imagery.

meme meme carved

The algorithm works quite well for removing large regions of low-energy background.

bird bird carved

This seam carving is quite believable. Interestingly, the bird's eye gets carved shut.

bird2 bird2 carved

Seam carving works relatively well on landscape pictures, but the sky now has diagonal artifacts (possibly because carving a seam introduces a higher-energy edge). The text on the bottom is reproduced nicely.

balloons balloons carved

When faced with skyscrapers, the results are interesting and not perspective-correct, but close enough.

skyscraper skyscraper carved

Failure modes

what is anime face? is it a bug-eyed demon? (Renge Miyauchi from Non Non Biyori. I watch anime with cute girls because I want to be a cute girl and have a non-abusive childhood.)

anime anime carved

In this screenshot of Motif apps, the textured background has a noticeably higher entropy/energy than the flat foreground. Destruction ensues. I think this OS doesn't feel so good.

motif motif carved

My theory is that this couple is a victim of a black hole. The curved horizon is indicative of gravitational lensing, and the woman's lower body appears to be a relativistic jet of matter and energy being ejected along the black hole's rotation axis.

wedding wedding carved

HDR

I implemented Debevec and Malik 1997 by porting the sample code from Matlab to Python. Unfortunately I ran out of time to implement proper tone mapping, and square-root tone mapping appeared washed-out for some reason. It should be fine, considering sRGB squares all amplitudes you put in, and square-rooting the energies should be acceptable, but it didn't work well.

red

green

blue

hdr