https://github.com/ssarcandy/coherent-line-drawing
🖼✨Automatically generates line drawing from a photograph
https://github.com/ssarcandy/coherent-line-drawing
cmake computer-graphics cpp17 gcov lcov non-photorealistic-rendering opencv wxwidgets
Last synced: about 2 months ago
JSON representation
🖼✨Automatically generates line drawing from a photograph
- Host: GitHub
- URL: https://github.com/ssarcandy/coherent-line-drawing
- Owner: SSARCandy
- License: mit
- Created: 2015-12-06T08:20:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-15T16:28:05.000Z (over 2 years ago)
- Last Synced: 2024-07-31T22:43:48.983Z (10 months ago)
- Topics: cmake, computer-graphics, cpp17, gcov, lcov, non-photorealistic-rendering, opencv, wxwidgets
- Language: C++
- Homepage: https://ssarcandy.tw/2017/06/26/Coherent-Line-Drawing/
- Size: 977 KB
- Stars: 551
- Watchers: 22
- Forks: 58
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Coherent Line Drawing
[](https://github.com/SSARCandy/Coherent-Line-Drawing/actions)
[](https://travis-ci.org/SSARCandy/Coherent-Line-Drawing)
[](https://codecov.io/gh/SSARCandy/Coherent-Line-Drawing)
[](https://github.com/SSARCandy/Coherent-Line-Drawing/blob/master/LICENSE)This project implemented a non-photorealistic rendering technique presented by Kang et al, that can automatically generates a line drawing from a photograph. This project provide an easy-to-use, real-time interactive graphic user interface system.
- [Original academic paper](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.108.559&rep=rep1&type=pdf)
- [Introduction in Chinese](https://ssarcandy.tw/2017/06/26/Coherent-Line-Drawing/)
## Workflow (Youtube)
## Build
### Requirement
- C++ 17
- CMake
- OpenCV 3
- WxWidget 3 (not required for cmd application)
- Boost (not required for gui application)_If you prefer C++ 11 version, there is a branch called [cpp11](https://github.com/SSARCandy/Coherent-Line-Drawing/tree/cpp11), the function is equivalent._
It should work fine in Windows/Linux/MacOS.
I provided some scripts that can use in Linux:```sh
# Usage: build.sh [options]
# Options:
# -c, --clean Clean build
# -d, --debug Build with debug mode
# -j, --jobs Use N cores to build
$ ./build.sh# Usage: linter.sh [options]
# Check code style
# Options:
# -i In-place format
$ ./linter.sh
```### Command Line Version
I provide another command line application that can directly use without graphic interface, the entry point is `src/cmd.cpp`. The options is list as following, also you can refer to `./test.sh` to see how to use:
```sh
# Coherent-Line-Drawing Options:
# -h [ --help ] Help message
# -s [ --src ] arg Source image path
# -o [ --output ] arg Output image path
# --ETF_kernel arg (=5) ETF kernel size
# --ETF_iter arg (=1) Refining n times ETF
# --CLD_iter arg (=1) Iterate n times FDoG
# --sigma_c arg (=1) Line width
# --sigma_m arg (=3) Degree of coherence
# --rho arg (=0.997) Noise
# --tau arg (=0.8) Thresholding
```### Pre-Build GUI Version
You can download pre-build version at [here](https://github.com/SSARCandy/Coherent-Line-Drawing/releases).
Including Windows and macOS versions.**Screenshots**


