Simple and fast painterly rendering.
Go to file
JPPalus 91069a15fa init 2020-08-08 21:45:31 +02:00
samples init 2020-08-08 21:45:31 +02:00
src init 2020-08-08 21:45:31 +02:00
Makefile init 2020-08-08 21:45:31 +02:00 init 2020-08-08 21:45:31 +02:00
TODO init 2020-08-08 21:45:31 +02:00

Simple and fast painterly rendering

Litpression implements the algorithm described in Peter Litwinowicz's article. It relies on OpenCV 4 for optical flow (various algorithms available) and on the triangle library for Delaunay triangulation.

The algorithm's central idea is to cover the canvas with brush strokes sampling their colors from the original image, and to move these strokes with optical flow in order to maintain time consistency. As strokes move around the canvas, new strokes will be created to keep covering the whole surface, and other will be deleted in overdense areas.

If a fast optical flow method is chosen, such as DIS, it can achieve real-time or near-real-time processing speed, depending on the video resolution and on the rendering settings (thinner strokes means more strokes to cover the canvas hence more processing time).

This project is still work in progress. One important feature missing is the interpolation of gradient values for pixels with low gradient magnitudes, which should reduce noise when using gradient for stroke orientations.


Rendering done with DIS optical flow, hence the noisy background

Shot taken from Big Buck Bunny