Show HN: Image-triangulation (delaunay and voronoi)

2 points by EllipticCurve ↗ HN
Hey guys,

it's my first post here, but I've been reading for a couple of months.

And right now I am ready to share some stuff I made. Please feel free to ask, criticize or suggest alternatives :)

https://github.com/MauriceGit/Delaunay_Triangulation

A couple of months ago someone here (don't have the link anymore) inspired me to finally sit down and implement a delaunay-triangulation and voronoi from scratch.

What the python-script does is:

- take an image, extract points dependent on the contrast and color difference of the image (more points on edges or in contrast-rich parts).

- triangulate the points with a delaunay-triangulation (from scratch).

- transform the delaunay-triangles into voronoi-regions.

- render the triangles and voronoi-regions into new images with the average color for each polygon (from the original image).

The delaunay-triangulation runs in Omega(n logn) but I'm not 100% sure if also in O(n logn). The transformation into voronoi-regions runs in O(n).

Please tell me what you think :) Best regards Maurice

4 comments

[ 3.4 ms ] story [ 22.5 ms ] thread
The whole thing gets started with a simple python call to "drawTriangles.py" (Have to rename it later...).

The only thing to do is now to specify the filename in main().

After that you should be good to go. I will work on that later, to make it more user-friendly :)