Name: Chen Xu
login: chenx
The idea of the algorithm is that, instead of naively copying intensity from source image to target image while doing image blending, we can copy the gradients from source image to target image. By preserving the gradients, the blending looks more seamless and effective. We create very large sparse matrix, and calculate laplacian gradient in Matlab to implement the algo.
Table 1 shows results of the both the naive method and the Poisson method.
Source | Mask | Target | Naive | Poisson |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
For transparent source, instead of directly copying source gradients, we can select the larger of source and target gradients. This reduces the blur effects of the transparent part of source image. The following shows the mixing gradients results of the rainbow example.
Other three mixing gradients examples are also shown below. For the second one, the moon reflects dim red color at the center, the third one is a failure case. That's because too much tree branches obscure the moon surface, and the branches usually come with large gradients. There's a limitation of the mixing gradients method that, the gradients of targets which overlap with the source, should not be too large, or else the method cannot guarantee the source image still keeps its original color. That's why the second example looks better than the third.
Source | Mask | Target | Mixing Gradients |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Here are the more results.
Source | Mask | Target | Poisson |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |