Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/mauricegit/voronoi_image_manipulation

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mauricegit/voronoi_image_manipulation

  • v0.0.0-20210202061338-dbf258b8247e
  • Source
  • Go
  • Socket score

Version published
Created
Source

Voronoi/Delaunay image manipulation

This project implements a small, lightweight tool for real-time image manipulation with Voronoi/Delaunay data structures.

The focus of this project was, to enable users without knowledge of Voronoi or Delaunay specifics, to experiment and play with different looks a Voronoi or Delaunay structure can give to an image.

Some time ago I implemented a similar effect (also Voronoi/Delaunay) in Python (github.com/MauriceGit/Delaunay_Triangulation). The main goal for this new project was, to make it a lot more robust, user friendly, fast and actually useable.

Interface:

The program will start two separate windows. One to actually display the image and a control window. It will look like the following:

Image viewControl view
Image viewControls

Requirements:

  • Graphics card supporting OpenGL 3.3
  • Windows users: Have mingw64 installed. Other C compilers might or might not work. Please report back if it works or submit necessary changes to this README.
  • Have Go (Golang) installed on your system.

Run:

  • Download this repository or run git clone https://github.com/MauriceGit/Voronoi_Image_Manipulation
  • Enter the project directory
  • Run go get ./... to install all dependencies
  • Run go build within the projects directory
  • Run the created executable.
  • Do not remove the Images/apple.png directory. This image is loaded by default when the program starts.

Screenshots and usecases:

Just to give you and incomplete overview what kind of effects you can achieve with this tool (sometimes with the corresponding controls set).

The point Distribution set to Poisson Disk to achieve random but equally distributed points over the whole area. This gives the most pleasing and homogeneous look most of the time. Poisson Disk point dist

The point Distribution set to Random. Truly random point distribution. Will create unequally sized regions. Random point dist

The point Distribution set to Grid will create honeycomb like regions (hexagons) by placing points in a shifted grid. Grid point dist

Grid point dist

Set the Face Rendering to Delaunay Triangles. Delaunay faces

Delaunay faces

Sunset delaunay

An image of a Labrador with Poisson disk distributed points. Voronoi faces

If you like you can add the Voronoi lines and points to actually display the underlaying data structure. Voronoi lines and points

Voronoi lines

Voronoi lines

Sunset voronoi

When checking Adaptive Color, the lines of Delaunay edges and points will get the average color of the image underneath. Creating an interesting effect. Adaptive Color

Adaptive Color checked with Voronoi faces and points displayed with a grid layout. Adaptive Color voronoi

You could just view the points as well (well that doesn't really use Voronoi/Delaunay any more. But still looks cool :)). Just points

At last, you can just ignore the image to investigate/look at voronoi and Delaunay tessellation itself: Just voronoi

Just voronoi and delaunay

FAQs

Package last updated on 02 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc