16-726 | Qin Han | qinh@andrew.cmu.edu
In this assignment, I mainly focus on the innovative technique of gradient-domain processing, particularly emphasizing Poisson blending. The primary aim is to seamlessly integrate an object or texture from a source image into a target image without the noticeable seams that direct copying would produce. This is achieved by leveraging the insight that the human visual system prioritizes gradients over absolute intensity values. Therefore, I adopt an approach that maintains the gradient information from the source image while blending it into the target image, effectively minimizing perceptual discrepancies.
In this problem, we reconstruct the input image using a least squares optimization approach involving three specific objective functions: the difference between the x-axis, the y-axis, and the intensity of the top left pixel. Below is the reconstruction result:
I implemented the Poisson blending technique to seamlessly integrate the source image into the target image. This technique involves solving a Poisson equation to ensure that the gradients of the source and target images are consistent, by minimizing the difference between the gradients of the source and target images. I converted the least squares optimization problem into a linear system of equations, which can be effectively solved by a sparse matrix linear system solver. As shown in the results below, the Poisson blending technique effectively integrates the source image into the target image, producing a seamless and visually appealing result.
Source | Target | Mask | Naive Blend | Poisson Blend |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Source | Target | Mask | Naive Blend | Poisson Blend |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
As shown in the failure case, the Poisson blending technique fails to produce a satisfactory result when the source and target images have significant differences in the background. This limitation arises primarily because Poisson blending relies on the assumption of smooth and gradual transitions between the source and the target regions.
I further implemented a mixed gradients technique to address the limitations of Poisson blending. This technique considers the strongest gradients from both the source and the target images within the blending region, rather than relying solely on the gradients of the source image as in traditional Poisson blending. By doing so, it aims to better preserve the texture and structural details of both images in the blended output. Below are the results of the mixed gradients technique:
Source | Target | Mask | Naive Blend | Poisson Blend | Mixed Gradients |
---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Source | Target | Mask | Naive Blend | Poisson Blend | Mixed Gradients |
---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
However, the mixed gradients technique also can not resolve the failure case when the source and target images have significant differences in the background.
To effectively convert a color image to grayscale, while maintaining the chromatic information, I implemented the color2gray technique using the gradient domain processing approach. In detail, I converted the input image into HSV color space, and then extracted the intensity information from the V channel as the target image and the saturation information from the S channel as the source image. Here are the results of the color2gray technique: