Giter VIP home page Giter VIP logo

poisson-blending's Introduction

Poisson Blending

Blending images using Poisson’s equation and sparse matrices

Poisson Blending is an algorithm used in image processing for achieving a realistic looking composition of two images using Discrete Poisson equation. The key idea is to approach this challenge as Dirichlet problem. In particular, let us treat the overlapping region between the images (a source image being inserted into a destination image) as the potential field caused by a given density distribution of electric charge or mass which in our case will be related to the laplacian of the images, and as the fixed boundary condition we will take the values of the destination image on the boundary curve enclosing the source image patch.

Finally, we deal with a linear system of equations represented by Ax=b, where the size of the coefficient matrix A is NxN, where N is the number of the pixels in the source image. In order to construct and solve this system I use the great library of Algebraic Multigrid (AMG) solvers PyAMG.

Results

naive blending Naive Blended

Poisson blending Poisson Blended

original images links: source image, destination image

Installation and Usage

run Poisson Blending 2D.py and follow the instructions

Enjoy!

References

Patrick Perez, Michel Gangnet, Andrew Blake, "Poisson Image Editing".

poisson-blending's People

Contributors

haim-segal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

poisson-blending's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.