Thursday, May 24, 2018

Non Photorealistic Rendering - Watercolor rendering (watercolorization)

Bousseau et al. pioneered the process of watercolorizing a photograph in "Interactive watercolor rendering with temporal coherence and abstraction" by Adrien Bousseau, Matthew Kaplan, Joelle Tholot, Francois X. Sillion. The idea of darkening/lightening a color image given a grayscale texture image enables to simulate a bunch of watercolor effects including paper texture, turbulent flow, pigment dispersion, and edge darkening. There is another paper that I found quite useful in implementing my own version of Bousseau's watercolorizer, "Expressive Rendering with Watercolor" by Patrick J. Doran and John Hughes, as it discusses Bousseau's algorithm.


Input image. Comes from the NPR benchmark database.

The first thing to do is to abstract the image in order to reduce the amount of details. Bousseau et al. uses Mean Shift to color segment the image followed by the application of morphological smoothing operators like dilation and erosion. Since I have already implemented software to abstract and stylize images (for cartoon rendering) in Non Photorealistic Rendering - Image Abstraction by Structure Adaptive Filtering, I simply use that to get the abstracted image. I think it works real good too.


Abstracted image.

Let's apply a watercolor paper texture to the abstracted image to simulate the grain of the watercolor paper.


Image after having applied a paper texture.

Let's apply a turbulent flow texture to the current image to simulate watercolor color variation due to how water moves and carries pigments. The turbulent flow texture comes from the sum of Perlin noise at various frequencies. It's mostly a low frequency coherent noise.


Image after having applied a turbulent flow texture.

Let's apply an edge darkening texture to the current image to simulate how pigments accumulate at the boundaries of washes. The edge darkening texture is obtained by computing the gradient magnitude of the original abstracted image.


Image after having applied an edge darkening texture.

Here's a video:


Bousseau et al. also use a grayscale texture to simulate pigment dispersion, the high frequency version of turbulent flow. It's supposed to be implemented as a sum of Gaussian noises. I don't really like that effect, so I simply did not implement it.

Clearly, this simulates the wet-on-dry watercolor technique, not the wet-on-wet technique. "Towards Photo Watercolorization with Artistic Similitude" by Wang et al. proposes a wet-on-wet effect which I will probably implement at some point.

No comments:

Post a Comment