Gradient space manipulation
Bart Liefers
Department of Information and Computing Sciences, Utrecht University
Abstract
This page is about an ongoing experimentation project performed by Bart Liefers
under supervision of dr. Robby T. Tan. The main topic is the manipulation and reconstruction of images in the gradient domain. In this field, contrary to directly manipulating pixel values, the gradient of the image is edited. A possible application is to remove unwanted edges, for example by setting the local gradient to zero. After all gradient space manipulations are performed, the resulting gradient field has to be integrated to obtain a resulting image. Because the gradient field is generally non integrable, an approximation technique is used. The current approach is to use a Poisson solver, which yields a least squares approximation. This means that the squared difference between the original gradient field and the gradient of the resulting image is minimized. We used this technique to explore its use in image composition, object insertion and seamless stiching. We are currently investigating the applications of this technique in combination with image inpainting methods and shadow removal.
Final Report: PDF
Results:
Image composition:
Pasting a moon in the clear blue sky:
|
|
|
|
Combination of two images.
|
Color levels may change after integration.
|
Restored color levels using a different normalization method.
|
Smooth tiling:
In the next case the color difference between the left and right edge is propagated in the tiling. This is unwanted, but others can do better (here).
Object Insertion:
Inserting letters on a background (recreation of result from Howard Zhou & Jie Sun (here):
Inserting transparent object into scene:
Shadow removal using gradient-inpainting
In these images the shadows were removed by using an inpainting technique (Criminisi et al., 2004) that was modified such that the gradients around the shadow border were inpainted to obtain a shadow-free image. The region to be inpainted can be selected manually.
Left: original image.The yellow polygon represents the manually selected shadow-border region that needs inpainting.
Right: the result after gradient-domain inpainting inside this polygon and integration of the modified gradient field. Notice that the vertical structure of the wood and the white line on the road is maintained inside the border region by the algorithm.
Shadow detection
A physics-based model is used to create an image that is shadow-invariant (ie: different pixels, in sunlight and shadow, that represent the same surface will get the same value in the invariant image). Edge detection on this invariant image, compared with edge detection on the orignal image is used to automatically select shadow-border regions.
Top left: Input image
Top right: Edges of input image
Middle left: Invariant image
Middle right: Edges in invariant image
Bottom left: Shadow edge region bitmap.
Bottom: reconstruction created by first nullifying the gradient in the shadow edge region. Then integration, and finally inpainting (in the intensity domain) of the same shadow edge region. The result may be improved still, since the data-term in the inpainting algorithm was ignored.
References:
- http://www.howardzzh.com/research/poissonImageEditing/index.htm
- Amit Agrawal and Ramesh Raskar. What is the range of surface reconstructions
from a gradient field. In In ECCV, pages 578-591. Springer, 2006.
-
Amit Agrawal, Rama Chellappa, and Ramesh Rasker. An algebraic approach
to surface reconstruction from gradient fields. Computer Vision, 1:174-181,
2005.
-
Amit Agrawal, Ramesh Raskar, and Rama Chellappa. Edge suppression by
gradient field transformation using cross-projection tensors. In In Conference
on Computer Vision and Pattern Recognition (CVPR06, 2006.
-
Graham D. Finlayson, Steven D. Hordley, Cheng Lu, and Mark S.
Drew.
On the removal of shadows from images.
IEEE Trans.
Pattern Anal. Mach. Intell., 28:59-68, January 2006.
ISSN 0162-
8828.
doi:
http://dx.doi.org/10.1109/TPAMI.2006.18.
URL
http://dx.doi.org/10.1109/TPAMI.2006.18.
- A. Criminisi, P. Perez, and K. Toyama, Region flling and object removalby examplar-based image inpainting IEEE Trans. Image Process, 2004.
-
Graham D. Finlayson, Mark S. Drew, and Cheng Lu.
Entropy mini-
mization for shadow removal. Int. J. Comput. Vision, 85:35-57, Oc-
tober 2009. ISSN 0920-5691. doi: 10.1007/s11263-009-0243-z. URL
http://portal.acm.org/citation.cfm?id=1569442.1569449.
-
Jean-Fran ̧ois Lalonde, Alexei A. Efros, and Srinivasa G. Narasimhan.
c
Detecting ground shadows in outdoor consumer photographs.
In
Proceedings of the 11th European conference on Computer vi-
sion: Part II, ECCV'10, pages 322-335, Berlin, Heidelberg, 2010.
Springer-Verlag.
ISBN 3-642-15551-0, 978-3-642-15551-2.
URL
http://portal.acm.org/citation.cfm?id=1888028.1888053.
-
John A. Marchant and Christine M. Onyango.
Shadow-invariant clas-
sification for scenes illuminated by daylight.
J. Opt. Soc. Am. A,
17(11):1952-1961, Nov 2000.
doi: 10.1364/JOSAA.17.001952.
URL
http://josaa.osa.org/abstract.cfm?URI=josaa-17-11-1952.
Last Update: March 2011