Artsy pixel image to vector graphics converter

Overview

inkdrop

inkdrop is an artsy bitmap to vector converter.

Nefertiti GTK4 UI

Command line interface

The CLI binary is called inkdrop-cli and reads almost any image bitmap format via the --input parameter and outputs an SVG document given by the --output parameter. Let's take this image of the Nefertiti bust, cropped and the background turned to pure white:

Nefertiti input

Using the --draw-points parameter we can output all sampled points. The number of sampled points can be controlled with the --num-points parameter. Calling

$ inkdrop-cli --input nofretete.png \
              --output output.svg \
              --draw-points \
              --num-points 20000

gives us

Nefertiti samples

It resembles the input image but due to the stochastic nature, it is a bit noisy. We can move these initial points using the Weighted Voronoi method. Using

$ inkdrop --input nofretete.png \
              --output output.svg \
              --draw-points \
              --num-points 20000 \
              --voronoi-iterations 100

we get points that much better reflect the structure of the original image:

Nefertiti Voronoi

By leaving out the --draw-points parameter, all points will be connected. Without further adjustments the nearest neighbor tour is chosen which will be ugly most of the time because the path crosses itself. To fix that use the --tsp-improvement parameter which optimizes the tour using the 2-opt algorithm until the improvement is not better than the parameter given. So our final command line

$ inkdrop-cli --input nofretete.png \
              --output output.svg \
              --num-points 20000 \
              --voronoi-iterations 100
              --tsp-improvement 0.001

gives us the following output:

Nefertiti TSP

GTK4 user interface

Call inkdrop-ui and play around with the same parameters as above.

You might also like...
Collection of vision & graphics algorithms
Collection of vision & graphics algorithms

Vision Magic Collection of vision & graphics algorithms Paper | Demo | Docs Built with 🦀 by The Vision Cortex Research Group Impression Impression is

A linear algebra and mathematics library for computer graphics.

cgmath-rs A linear algebra and mathematics library for computer graphics. The library provides: vectors: Vector2, Vector3, Vector4 square matrices: Ma

Antialiased 2D vector drawing library in Rust for Android, Web, Desktop
Antialiased 2D vector drawing library in Rust for Android, Web, Desktop

nonaquad Vector anti-aliased graphics renderer for Android, WASM, Desktop in Rust, using miniquad. This library started as a port of NanoVG for miniqu

Antialiased 2D vector drawing library written in Rust
Antialiased 2D vector drawing library written in Rust

femtovg Join the femtovg Discord channel Work in progress! Antialiased 2D vector drawing library written in Rust.

Image processing operations

imageproc An image processing library, based on the image library. There may initially be overlap between the functions in this library and those in i

Image Compression Algorithm
Image Compression Algorithm

Image Compression Algorithm 🦭 A new lossless image compression algorithm. In the newest version the algorithm performs rather good, but manages to su

tai (Terminal Ascii Image) tool to convert images to ascii written in Rust
tai (Terminal Ascii Image) tool to convert images to ascii written in Rust

TAI Terminal Ascii Image A tool to convert images to ascii art written in Rust 🦀 Notes This tool is still in development stage. Contributions All Con

Automated image compression for efficiently distributing images on the web.

Imager Apparently this project made it into the GitHub Archive Program. About Imager is a tool for automated image compression, and can competitively

Open Graphic Image Writer
Open Graphic Image Writer

Open Graphic Image Writer Documentation You can generate Open Graphic Image dynamically. A CSS-like API. You can generate image by using template imag

Owner
Matthias Vogelgesang
Matthias Vogelgesang
A Simple Image to Ascii converter in Rust

Image to Ascii A Simple Image to Ascii converter in Rust Brief ?? In my way to learn Rust i decided to make this converter. Challenges ?? new to Rust

WasixXD 7 Sep 16, 2022
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes

What is Lust? Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes with scaling in mind.

Harrison Burt 242 Dec 22, 2022
Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Jacob 258 Dec 30, 2022
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

3top1a 4 Apr 9, 2022
PixelWorldProxy - Simple Pixel World Proxy made in Rust.

PixelWorldProxy Simple Pixel World Proxy made in Rust. Feature Safe and fast Support subserver switching Usage Clone the repository: git clone https:/

null 3 Jan 5, 2022
A support tool for creating shaders that display pixel arts.

dot2shader --> PRE-BUILD PAGE IS HERE <-- A tool for generating shaders displaying pixel art textures in Shadertoy and twigl. Quick start Go to pre-bu

理論屋 2 Feb 17, 2022
Control Google Pixel Buds Pro from the Linux command line.

pbpctrl Control Google Pixel Buds Pro from the Linux command line. Might or might not work on other Pixel Buds devices. Allows reading of battery, har

Maximilian Luz 6 Jan 10, 2023
Camera RAW to DNG file format converter

DNGLab - A camera RAW to DNG file format converter Command line tool to convert camera RAW files to Digital Negative Format (DNG). It is currently in

null 92 Jan 6, 2023
A fast wordlist to nthash converter

nthasher A fast wordlist to nthash converter Usage Pass it a UTF8 encoded wordlist, and write the output to a file. ./nthasher <wordlist> > wordlist.n

Dominic White 18 Nov 3, 2022
An intel PT trace converter from `perf.data` to Fuchsia trace format.

Introduction Recent Intel processors feature the "Intel Processor Trace" feature, which can be used to capture the full execution trace of a program.

Michał Chojnowski 14 Nov 9, 2022