Assignment #2 - Gradient Domain Fusion

1. Project Overview

This project is related to Poisson blending. In Poisson blending, it utilizes optimization method to find suitable values for blended images. Instead of alpha blending which requires precise cutting of object to insert,Poisson blending allows people to have great blending results with ambiguous cutting of the source image. This method ensures that the gradients (changes in intensity or color) of the blended region match the surrounding area, resulting in a natural and cohesive appearance.

The optimization of Poission blending is formally described as:

v=argminviS,jNiS((vivj)(sisj))2+iS,jNi¬S((vitj)(sisj))2.

This optimization problem can be solved as a least squares problem and convert it into AX=b to solve.

2. Method

a. Toy Problem

toy_problem

The output of the optimization problem is almost the same with the original image.

b. Blending Results

Favorite example

Source:

Target:

Blending:

The first part of the optimization process focuses on maintaining the original appearance of these color changes. This means that despite the object being placed in a new environment, its internal visual texture and the subtle shifts in its colors remain unchanged. It's like moving a painting from one room to another; the painting itself doesn't change, even though its surroundings do.

The second part of the optimization process in Poisson blending focuses on making this boundary indistinguishable from the surrounding environment. It adjusts the edges of the object so that they adopt some of the colors and lighting of their new background. This ensures a seamless integration, much like smoothing the edges of a puzzle piece to make it fit perfectly into its designated spot.

c. Two more Blending Results

Example2

Source:

Target:

Blending:

Example3

Source:

Target:

Blending:

Example4

Source:

Target:

Blended:

Example4 is a failed case since Poisson blending focuses on changing its edge part and blend its edge with its background. The inner part of the object cannot be changed based on the background since its gradient is guaranteed to be almost the same with the original image.

Therefore, the color of the gap between the laptop screen and keyboard is not changed based on the background and remains the be the same color.

2.Bells & Whistles

Mixed Gradients

Example1

Source:

Target:

Mix Blended

Example2

Source:

Target:

Mix Blended

Mix blending has a better performance at the edge part blending and fits the environment color better. However, the blended object would tend to be more transparent.