Skip to content

Implementation of 'Patrick Pérez, Michel Gangnet, and Andrew Blake - 2003 - Poisson image editing' https://doi.org/10.1145/882262.882269'. Project for the 'Computer Graphics' course.

Notifications You must be signed in to change notification settings

catebell/Poisson-Image-Editing

Repository files navigation

Overview

Implementation of the 2003 paper 'Poisson image editing' by Patrick Pérez, Michel Gangnet, and Andrew Blake.

Presentation → PoissonImageBlending.pdf

Seamless cloning

Screenshot 2025-08-31 201516

Gradient-wise:

Screenshot 2025-08-31 200917 Screenshot 2025-08-31 201809

...

Screenshot 2025-08-31 201126

Texture Transfer

Screenshot 2025-09-02 171637 Screenshot 2025-09-02 171722

Seamless Tiling

Screenshot 2025-09-04 122026 Screenshot 2025-09-04 122239

Tips

  • 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.

How to create a mask for seamless cloning

  • Open source image and create new level

how_to_mask_1 how_to_mask_2

  • Draw contour with pencil

how_to_mask_3 how_to_mask_4

  • Fill shape and set image level as invisible

how_to_mask_5 how_to_mask_6

  • Export as png

how_to_mask_7 how_to_mask_8

How to prepare images and masks for texture transfer

Target image:

pear

Source image from where to extract the texture:

kiwi

  • Open the target image with GIMP
  • Create a mask (see the section above) of the area where to paste the new texture

Screenshot 2025-09-01 154631

  • 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

Screenshot 2025-09-01 154922

  • 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:

pear pear_mask kiwi_cut

Input-like image for seamless tiling

paper      wall_white      grass_texture

About

Implementation of 'Patrick Pérez, Michel Gangnet, and Andrew Blake - 2003 - Poisson image editing' https://doi.org/10.1145/882262.882269'. Project for the 'Computer Graphics' course.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages