In this assignment, I learned about gradient domain fusion using Poisson blending. The goal of this technique was to seamlessly blend an object into a target image, ensuring that no boundaries are visible during the merging process. With Poisson blending, the integration of the source image into the target becomes imperceptible, creating a visually cohesive composition that appears as a natural part of the original scene.
We first verify the validity of our image reconstruction technique by computing a sparse matrix A and a matrix b representing the gradients difference and the intensity of the top most pixel. I then solved it using least squares approach.
| Original Image | Reconstructed Image |
|---|---|
![]() |
![]() |
From the results we can see that the method is able to reconstruct the original image.
A naive method to blend two images is to copy and paste the source image onto the target image directly. However, that does not yield good results, and we can clearly see the boundary. Hence, we used Poisson blending for seamless integration.
Poisson blending operates in the gradient domain, leveraging the gradient information of both the source and target images to achieve smooth transitions. By solving a Poisson equation, which ensures that the gradient of the resulting image closely matches the gradient of the target image in the overlapping regions, Poisson blending effectively conceals any noticeable seams. This method is particularly useful for tasks like object insertion, image composition, and texture synthesis, where natural-looking integration is desired.
| Source | Target | Naive Blend | Poisson Blend |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The case below is an example of a failure case of Poisson blending. We can see here that in the final image, the colour of the tiger changed to blue. This happened because the source image background colour was very different from the target image background colour.
| Source | Target | Naive Blend | Poisson Blend |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Here I implemented the mixed gradient apporach and built it on top of my Poisson blending. In this apporach, instead of taking the gradients from the source iamge, we find the gradients from both the source and the target image and use the gradients that are bigger in magnitude. By solving an optimization problem that respects these constraints, mixed blending can achieve smoother transitions and better blending quality compared to Poisson blending.
In the example below we can see that Mixed blending produces better results than Poisson blending. This happens because Mixed blending takes into account the bigger gradient from both the source and target image. Hence it is able to produce grass like texture in between the legs of the zebra. Since Poisson beldnign only takes into account the gradients of source image, it smoothes the area between the legs of the zebra.
| Source | Target | Naive Blend | Poisson Blend | Mixed Blend |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |