mikecokina/puppet-warp

i want to Delaunay my png , help me

Closed this issue · 1 comments

My picture is shaped like an s, I want to triangulate it, like your cookie man, but my result is to divide the s shape into a square, why is your cookie man Delaunay shaped like a cookie man? Please help me

i used code:

from scipy.spatial import Delaunay
points_A=[[x,y]...]
tri_A = Delaunay(points_A)

It is not related to my library at all. But to guide you a bit, in my case, I performed the triangulation manually. Triangulating concave objects (like the letter 'S' or my puppet) is not a simple task. Delaunay triangulation is capable of properly triangulating convex shapes only. Typically, you need some problem-specific tricks, or as far as I know, there are methods that are able to reconstruct surfaces if normal vectors for each point are available. Take a look into the Poisson surface reconstruction of the CGAL package (it is C++, as far as I remember). Good luck!