Implementation of the 2003 paper 'Poisson image editing' by Patrick Pérez, Michel Gangnet, and Andrew Blake.
Presentation → PoissonImageBlending.pdf
Seamless cloning
Gradient-wise:
...
Texture Transfer
Seamless Tiling
- upload images in the [imgs] folder, then specify in [main.py] the path to the desired source, target and mask images.
- masks can be created using GIMP as shown below.
- some outputs are already saved in the [output] folder. To save others, enable the corresponding code section in [main.py].
- in [poisson_blending] comment/decomment intermediate lines for gradients visualization if desired.
- Open source image and create new level


- Draw contour with pencil


- Fill shape and set image level as invisible


- Export as png


Target image:

Source image from where to extract the texture:

- Open the target image with GIMP
- Create a mask (see the section above) of the area where to paste the new texture
-
Set the target image invisible and export the mask as png
-
Open the source image and the mask in the same project, with the mask level above
-
Move and resize the source image so that the area with the desired texture is visible through the mask
- Make the mask invisible and export the new source image; it will now have the same dimensions of the target image and will be already aligned: