In this project, we explored gradient-domain processing, a simple technique with a broad set of applications including blending, tone-mapping, and non-photorealistic rendering. We seamlessly blend an object or texture from a source image into a target image by exploiting the fact that people often care much more about the gradient of an image than the overall intensity. and set up the problem as finding values for the target pixels that maximally preserve the gradient of the source region without changing any of the background pixels. We thus formulate our objective as a least squares problem, and cast the problem of image blending into an optimization problem which we then solve through existing libraries.
We first show the result of the toy example of reconstructing an image through gradient:
We run poisson blending for a few different pictures. We first show it on the given example, then on three other examples that we found.
A flying Penguin lolllll
Well, this is not exactly a failure case, but it definitely exposes some weakness of this algorithm: we can see that the region around the aircraft tends to get pretty blury. This is because we have no access to the gradient information of this area in the background image. Thus, the best the algorithm can do is to make it a blurry approximation of the background image's border.
For Bells and whistles I implemented mixed gradient, in an effort to alleviate the problem mentioned above. We run this updated version on the same example, and present the result below:
We can see that comparing to previous poisson blending, this version is able to capture the lake and mountains in the background a lot better, thus making the image more realistic.