Assignment #2 - Gradient Domain Fusion

Emily Kim

This assignment seeks to explore gradient-domain processing.

Toy problem

This problem reconstructs the toy image via the gradient domain processing. The two images below are the outputs of the experiment.

toy_problem
Fig 1. Toy Problem input image
toy_result
Fig 2. Toy Problem result

Poisson Blending

Using the least-squares optimization method, the objective of this task was to blend a cropped image to a target image with the Poisson blending method. The objective is

`v = argmin_v sum_(i in S, j in N_i cap S)^() ((v_i - v_j) - (s_i - s_j))^2 + sum_(i in S, j in N_i cap not S)^() ((v_i - t_j) - (s_i - s_j))^2`
where 's' and 't' represent the source and the target pixel intensities respectively and 'v' represents the new intensity values within the source region 'S'. For each pixel 'i' in source region 'S', 'j' s are defined to be the four neighboring pixels of this 'i'.

The first pair of images that I blended were provided from the assignment. The source image was a bear swimming in the water, and the target image was an image of a swimming pool. Here are the results from naive blending and the Poisson blending.

Naive Poisson
bear bear_poisson

Other Results

I have cropped some of the portrait photos to blend on top of portrait drawings by famous painters, i.e. Klimt and Davinci. Notice that the Poisson blending of Marilyn Monroe's portrait on top of the Leo Davinci's Mona Lisa looks slightly awkward because their faces were differently shaped. Twiggy's face on top of Klimt's portrait looks more realistic due to the similar face shapes after Poisson blending.

Naive Poisson
davinci_naive davinci_poisson
klimt klimt_poisson


I have also tried to move an object (human, animal, character) to a scene. My first attempt was to move a ballerina on top of the water in front of taj mahal. Unfortunately, the dancer image was blurred in thinner parts of the body such as the arms and the legs as a result of blending in.

Naive Poisson
dancer dancer_poisson
I also did experiments cropping Minions and blending the cropped region on top of two different scenes, one on a soccer field and the other of a scene in a famous animation movie Frozen, next to a snowman character Olaf. The Minions on the soccer field had issues blending into the scene as a result of the tone difference. A top part of the cropped minion was placed on top of a darker background than the bottom portion which was placed on top of the grass field, which made it look darker than expected. In addition, there was a large area that was cropped into the scene that made the soccer field look blurred, because the original source image had a solid texture background whereas the field had a rough texture. For the second experiment with placing the Minion next to Olaf, the blending was relatively successful as a result of the background texture being similar to the original source image, as well as having cropped most of the background from the source image. Also the difference in brightness was less radical between the top and the bottom part of the target image, which made the image more natural than the previous experiment with the soccer field. Notice that the shadow naturally blends in with the image with the scene in the opposite direction from the original target image.

Naive Poisson
dancer dancer_poisson
dancer dancer_poisson


Finally, I did an experiment of placing the penguin on a desert. The color of the penguin became sandy, which made it seem like the penguin was under a bright, blazing sunlight. On the other hand, when blending the same penguin on top of another image with people hiking in the snow, we can see that the color is preserved. It looks more natural in this image.
Naive Poisson
dancer dancer_poisson
dancer dancer_poisson
Here are some more additional experiment results I got.

Naive Poisson
dancer dancer_poisson
dancer dancer_poisson