MCPcopy Create free account
hub / github.com/SSARCandy/Coherent-Line-Drawing

github.com/SSARCandy/Coherent-Line-Drawing @v1.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.3 ↗ · + Follow
54 symbols 91 edges 11 files ⚖ MIT 15 documented · 28% updated 49d agov1.1.0 · 2026-07-08★ 5681 open issues

Browse by type

Functions 48 Types & classes 6
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Coherent Line Drawing

C/C++ CI Build Status codecov License: MIT

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.

demo

Workflow (Youtube)

Coherent Line Drawing

Build

Requirement

  • C++ 17
  • OpenCV 3
  • WxWidget 3 (not required for cmd application)
  • CMake

If you prefer C++ 11 version, there is a branch called cpp11, the function is equivalent.

It should work fine in Windows/Linux/MacOS.
I provided some scripts that can use in Linux:

# 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:

# 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.
Including Windows and macOS versions.

Screenshots

demo demo demo

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 41
Function 7
Class 6

Languages

C++100%

Modules by API surface

src/gui.cpp25 symbols
src/CLD.cpp10 symbols
src/ETF.cpp9 symbols
src/postProcessing.cpp3 symbols
include/gui.h3 symbols
src/cmd.cpp2 symbols
include/ETF.h1 symbols
include/CLD.h1 symbols

For agents

$ claude mcp add Coherent-Line-Drawing \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page