All Projects → esimov → colidr

esimov / colidr

Licence: MIT license
Coherent Line Drawing implementation in Go.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to colidr

Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (+2559.62%)
Mutual labels:  rendering, computer-graphics
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+3894.23%)
Mutual labels:  rendering, computer-graphics
Yocto Gl
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
Stars: ✭ 1,391 (+2575%)
Mutual labels:  rendering, computer-graphics
Open3d
Open3D: A Modern Library for 3D Data Processing
Stars: ✭ 5,860 (+11169.23%)
Mutual labels:  rendering, computer-graphics
Photon-v2
A program that takes photographs of a virtual world.
Stars: ✭ 75 (+44.23%)
Mutual labels:  rendering, computer-graphics
Opengraphic
Graphic Engine & Game Engine lists
Stars: ✭ 772 (+1384.62%)
Mutual labels:  rendering, computer-graphics
Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+22546.15%)
Mutual labels:  rendering, computer-graphics
SuperShapes
A tiny macOS app showing how to use Satin, Forge, Youi and SwiftUI to visualize super shapes in 3D.
Stars: ✭ 42 (-19.23%)
Mutual labels:  rendering, computer-graphics
CompenNet
[CVPR'19] End-to-end Projector Photometric Compensation
Stars: ✭ 35 (-32.69%)
Mutual labels:  rendering, computer-graphics
Usd Resources
A curated list of USD projects and resources
Stars: ✭ 250 (+380.77%)
Mutual labels:  rendering, computer-graphics
Easy3d
A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
Stars: ✭ 383 (+636.54%)
Mutual labels:  rendering, computer-graphics
photon mapping
minimal but extensible header only implementation of photon mapping in C++
Stars: ✭ 65 (+25%)
Mutual labels:  rendering, computer-graphics
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+7536.54%)
Mutual labels:  rendering, computer-graphics
Redner
Differentiable rendering without approximation.
Stars: ✭ 964 (+1753.85%)
Mutual labels:  rendering, computer-graphics
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-53.85%)
Mutual labels:  rendering, computer-graphics
Herebedragons
A basic 3D scene implemented with various engines, frameworks or APIs.
Stars: ✭ 1,616 (+3007.69%)
Mutual labels:  rendering, computer-graphics
glText
Cross-platform single header text rendering library for OpenGL
Stars: ✭ 93 (+78.85%)
Mutual labels:  rendering, computer-graphics
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+351.92%)
Mutual labels:  rendering, computer-graphics
Blender
Official mirror of Blender
Stars: ✭ 4,175 (+7928.85%)
Mutual labels:  rendering, computer-graphics
C-Raytracer
A CPU raytracer from scratch in C
Stars: ✭ 49 (-5.77%)
Mutual labels:  rendering, computer-graphics

colidr - Coherent Line Drawing

build license release

Implementation in Go of the Coherent Line Drawing algorithm developed by Kang et al, NPAR 2007.

sample

Requirements

  • Go 1.10 or higher, but it should work even with a lower version
  • OpenCV 3 (tested with 3.4.2)
  • gocv (bundled into the project, since it was extended with missing OpenCV functions needed for the implementation)
  • potrace - for transforming the bitmap into smooth, scalable image (however this is optional)

Installation

$ go get -u github.com/esimov/colidr/
$ go install

Another option is cloning the repository and running the make file.

$ git clone https://github.com/esimov/colidr
$ cd colidr
$ make

This will generate the binary file.

Usage

$ colidr -h

┌─┐┌─┐┬  ┬┌┬┐┬─┐
│  │ ││  │ ││├┬┘
└─┘└─┘┴─┘┴─┴┘┴└─

Coherent Line Drawing CLI
    Version: 1.0.1

  -aa
    	Anti aliasing
  -bl int
    	Blur size (default 3)
  -di int
    	Number of FDoG iteration
  -ei int
    	Number of Etf iteration (default 1)
  -in string
    	Source image
  -k int
    	Etf kernel (default 3)
  -out string
    	Destination image
  -pt
    	Use potrace to smooth edges (default true)
  -rho float
    	Rho (default 0.98)
  -sc float
    	SigmaC (default 1)
  -sm float
    	SigmaM (default 3)
  -sr float
    	SigmaR (default 2.6)
  -tau float
    	Tau (default 0.98)
  -ve
    	Visualize Etf
  -vr
    	Visualize end result

Feel free to play with the values in order to modify the visual output of the generated (non-photorealistically rendered) image. To obtain higher fidelity results you need to increase the kernel value and also the ETF iteration number. Different combinations produces completely different output. The -di, -ei, -k flags are mostly used for fine tuning, on the other hand -rho and -tau flags could change dramatically the rendered output.

You can also visualize the edge tangent flow if you enable the -ve flag. Below is the process illustrated:

Original image Edge tangent flow Coherent line drawing (final output)
original flowfield output

Using the -pt flag you can trace the generated bitmap into a smooth scalabe image. You need to have potrace installed on your machine for this scope.

Below is an example whith and without the potrace flag activated.

Normal output Potrace activated
normal smooth

The above image was ganareted with the following command:

colidr -in ~/Desktop/patio.jpg -out ~/Desktop/patio_scene.png -k=1 -sr=2.5 -sm=3.2 -tau=0.9975 -di=1 -aa=1 -ve=1 -vr=0 -pt=1 -ei=1

Sample images

Rasterized bitmap Vectorized image
great_wave_of_kanagawa great_wave_of_kanagawa
starry_night starry_night
people people
tiger tiger

Todo

  • GUI support

Author

License

Copyright © 2019 Endre Simo

This project is under the MIT License. See the LICENSE file for the full license text.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].