Hi guys, To throw a little extra high-level overview on one or two points which don't seem to have been resolved, I spent a little time reading the paper on Poisson image editing (Pérez et. al)
http://cs.engr.uky.edu/~jacobs/classes/2010_photo/readings/PoissonImageEditing.pdf and also had another very quick peek at the efficient gradient-domain compositing paper (Agarwala) http://www.agarwala.org/efficient_gdc/preprint.pdf On Thu, May 3, 2012 at 10:36 AM, Jeremy Selan <jeremy.se...@gmail.com> wrote: > - How does Poisson Image Editing differ from Gradient Domain compositing? I think these are the same thing - if you state the problem as solving a set of linear equations for the desired gradients (a la gradient-domain compositing), you get an overconstrained linear system. Solving this system with least squares implies solving a Poission equation. > - Brainstorming here... Is there a way to produce an image representation of > the output of the poission transform? I.e., Is it sensical to expose two > operations: ConvertRGBImageToPoissonImage, ConvertPoissonImageToRGBImage. > Then in a node-based compositor (nuke), or command-line tool (oiiotool), we > could chain together operations to explore whats possible. For example, > convert two images to poission. Do an A over B (using alphas!) and then > convert back to RGB. Is it sensical to expose the code in this way? Can > all of the clever applications (seamless cloning, image completion, mixed > gradients, local illumination changes) be expressed as compositing > operations operating on the spatial representation of poisson intermediate > outputs? I can see the attractiveness of this idea, but from my reading I think Łukasz is right: this don't really makes sense. Let me explain: The simplest procedure in Poisson image editing is to replace a masked subset W of an image A with part of an image B, but with the edges smoothly blended. In order to achieve this, we solve the Poisson equation on the domain W, with Dirichlet boundary conditions. The crucial point is that the right hand side of the Poisson equation comes from the Laplacian of *image B*, while the boundary conditions come from *image A*. Thus, the solution image contains information from both input images A and B, and also the shape of the mask W. As far as I can tell, there's no sensible way to separate out the contributions into suitable "Poisson transformed images" for images A and B separately. So, we can't do the simplest thing, but there's still some useful flexibility to be exposed to external tools. In gradient domain compositing, you're trying to match the gradient in some region with a desired gradient by solving the Poisson equation. In the simplest case, the desired gradient is just the gradient of an image. *However* in more complex cases, the gradient can be any combination of gradients of other images, or whatever you like. (This gradient is the vector field v in the Pérez paper - see equation (12) of Pérez for a nontrivial example.) With this in mind, it might be reasonable to have an API which allows the user to specify their own gradient. No doubt this would go in hand with a utility API for computing gradient images (for a 3-channel image that would result in a 6-channel output or a pair of 3-channel images). A potential caveat: it's not obvious to me that constructing useful gradients from source images is an easy business with standard image operations! For example, Pérez mentions that simple linear blending doesn't work well. ~Chris _______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org