Nachtalb / triangulate-tool

:triangular_ruler: Easily convert any image into low-poly art

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Triangulate Tool CLI

Easily convert any image into low-poly art

before afger

Originaly created by: jaybosamiya

How it works

The tool creates a defined amount of random points and runs a Delaunay Triangulation on it. It then averages out the colours in the source image for each triangle in order to generate the low-poly image.

Usage

./triangulate-tool input_image output_image [total_points] [total_points_per_side]
  • total_points (default: 100): int of total random points in the image
  • total_points_per_side (default: 3): int total points on each edge of the image (does not count towards total_points)

Build process

./build.sh

or manually

gcc triangulate-tool.cpp -o triangulate-tool $(pkg-config --cflags-only-I opencv4) -lopencv_core -lopencv_imgcodecs -lopencv_imgproc

Requirements

  • OpenCV 4.x (sudo pacman -Sy opencv)
  • A C++ compiler like gcc (sudo pacman -Sy gcc)

License

This project is licensed under the GNU Lesser General Public License v3.0.

About

:triangular_ruler: Easily convert any image into low-poly art

License:GNU Lesser General Public License v3.0


Languages

Language:C++ 95.7%Language:Shell 4.3%