Gradient ___domain image processing is a relatively new type of digital image processing that operates on the differences between neighboring pixels, rather than on the pixel values directly. Mathematically, an image gradient represents the derivative of an image, so the goal of gradient ___domain processing is to construct a new image by integrating the gradient, which requires solving Poisson's equation.[1]
Overview
Processing images in the gradient ___domain is a two-step process. The first step is to choose an image gradient. This is often extracted from one or more images and then modified, but it can be obtained through other means as well. For example, some researchers have explored the advantages of users painting directly in the gradient ___domain,[2] while others have proposed sampling a gradient directly from a camera sensor.[3] The second step is to solve Poisson's equation to find a new image that can produce the gradient from the first step. An exact solution often does not exist because the modified gradient field is no longer conservative, so an image is found that approximates the desired gradient as closely as possible.
Image Editing
For image editing purposes, the gradient is obtained from an existing image and modified. Various methods, such as a Sobel operator, can be used to find the gradient of a given image. This gradient can then be manipulated directly to produce a number of different effects when the resulting image is solved for. For example, if the gradient is scaled by a uniform constant it results in a simple sharpening filter. A better sharpening filter can be made by only scaling the gradient in areas deemed important.[1] Other uses include:
- seamless image stitching[4]
- removal of unwanted details from an image[5]
- non-photorealistic rendering filters[1]
- image deblocking[1]
- the ability to seamlessly clone one part of an image onto another in ways that are difficult to achieve with conventional image-___domain techniques.[5]
- High-dynamic-range imaging[6]
Gradient ___domain editing can also be extended to moving images, by considering a video clip to be a cube of pixels and solving a 3d Poisson equation.[7]
Seamless Image Cloning
Digital compositing is a common task in image editing in which some or all of one photo is pasted into another photo. Traditionally this is done by pasting the pixel values from one image to the other. A well-trained artist can make a convincing composite using traditional techniques, but it usually requires time-consuming color correction and mask cutting to make it work. Alternatively, the pasting can be performed in the gradient ___domain: if the differences between pixels are pasted rather than the actual pixel values, there is sometimes much less user input needed to achieve a clean result. The following example demonstrates the use of gradient ___domain image processing to seamlessly paste from one image to another.
-
Input image A
-
Input image B
-
Traditional image ___domain paste. This is the result of pasting the pixel values directly from B onto A. There is an obvious seam.
-
Modified gradient. This is the result of pasting the gradient of B onto the gradient of A.
-
Reconstructed image. This is the result of solving Poisson's equation on the modified gradient. The seam between the two is barely visible.
Notice that both the hand and the eye shifted color slightly in the image reconstructed from the modified gradient. This happened because the solver was set to find the entire image. However, it is possible to add constraints so that only the pasted section is solved for, leaving the rest of the image unmodified. It is also worth noting that the gradient pictured above only represents the derivative of a single color channel, and is depicted as a single color image representing the strength and direction of the gradient. In practice two grayscale gradient images are found per color channel, one representing the change in x and the other representing the change in y. Each color channel is solved for independently when reconstructing the final image.
References
- ^ a b c d Bhat, Pravin, et al. "Gradientshop: A gradient-___domain optimization framework for image and video filtering." ACM Transactions on Graphics (TOG) 29.2 (2010): 10.
- ^ McCann, James, and Nancy S. Pollard. "Real-time gradient-___domain painting." ACM Transactions on Graphics (TOG). Vol. 27. No. 3. ACM, 2008.
- ^ Tumblin, Jack, Amit Agrawal, and Ramesh Raskar. "Why I want a gradient camera." Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on. Vol. 1. IEEE, 2005.
- ^ Levin, Anat, et al. "Seamless image stitching in the gradient ___domain." Computer Vision-ECCV 2004. Springer Berlin Heidelberg, 2004. 377-389.
- ^ a b Pérez, Patrick, Michel Gangnet, and Andrew Blake. "Poisson image editing." ACM Transactions on Graphics (TOG). Vol. 22. No. 3. ACM, 2003.
- ^ Fattal, Raanan, Dani Lischinski, and Michael Werman. "Gradient ___domain high dynamic range compression." ACM Transactions on Graphics (TOG). Vol. 21. No. 3. ACM, 2002.
- ^ Wang, Hongcheng, et al. "Videoshop: A new framework for spatio-temporal video editing in gradient ___domain." Graphical models 69.1 (2007): 57-70.