Skip to content

📐 Easily convert any image into low-poly art

License

Notifications You must be signed in to change notification settings

Nachtalb/triangulate-tool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

📐 Easily convert any image into low-poly art

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C++ 95.7%
  • Shell 4.3%