|
3 years ago | |
---|---|---|
samples | 3 years ago | |
src | 3 years ago | |
Makefile | 3 years ago | |
README.md | 3 years ago | |
TODO | 3 years ago |
README.md
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.
Preview
Rendering done with DIS optical flow, hence the noisy background
Shot taken from Big Buck Bunny