Andrew Zhang

cs194-26-agx

FINAL A:

Bells + Whistles: I imlemented my own cut function.

Random patch:

For these images, I just sampled the texture randomly and patched them into the master image.

Overlapping patches:

For these, I defined a region oustide the patch size and ensured the the overlap would be relatively small when patching to the master image.

Min cost seam:

Same idea as before, but instead of just patching based on overlap map, the overlapped areas would get seam carved by |overlap1 - overlap2| as the energy function. Some images only needed a verticle seam carve, whereas other areas required vertical and horizontal cuts.

Although some images look like crops, they are not. Indeed if we look at the first image, we can look at the circle shapes and notice that no patter of that kind of circle shape exist in our sample texture.

Originals for quilting:

Texture transfer:

I made a sketch of feynman. This was done by patching onto an outputsize equal to the size of the target image. We added an additional cost of a blurred luminance of target and sampled source patches.

I made an oil painting of the joker

                          

Final B:

I implemented seam carving with a DP algorithm sped up with a parallel processing. For the energy function I used the square x gradient + square y gradient. When the pixel was a border pixel I used the wraparound pixel to calculate the gradient To reduce visual artifacts I elected to now allow seams to carve across the boundaries of the image as this tended to produce visual tears.

Working images (first image is shrunk):

I didn’t consider this Javert image to be a mistake, since to an untrained eye, Javert just looks a lot shorter, with a crumpled. Its not super unrealistic.

Failed images:

I overshrunk Thanos

The Penguin’s shoulders are now mishapen. His face is otherwise ok. This failure is a bit of a weak failure.

I learned that seam carving is a pretty cool way to resize images in a visually pleasing way.