Images to triangles

Say you have an image, which is the input … You now need to output a set of n triangles that will most closely replicate it, where n is fixed. How will you go about this problem today

  1. Genetic Algos have kind of tackled this problem, but takes forever or converges easily to some picture … I tried running some preliminary things here on Neat playground here … https://jerryjohnthomas.github.io/30pieces/

  2. Each triangle is something takes space and color … So try to group pixels of same color as triangle … Like a knn thing

I think we could maybe do a much better job without cnns, adding a simplifying assumption say the image indeed is made of n triangles and exact replication is possible. Is there anything else you would try.

  • 0xcedbeef@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago
    1. Make a voronoi diagram
    2. Triangulate the voronoi cells.
    3. Make the triangles nice (do delaunay flips). I think it’s ok if you break the voronoi cells
    4. Color

    No ML needed.

    The way you sample at (1) will affect your result, you probably don’t want to sample where there’s edges in the image