Advice: "Stained Glass Optimization and Coloring"

89 Views Asked by At

I hope everything is going well for everyone reading this at the moment. I am hoping someone here could offer some guidance and advice for a problem I am looking into.

Problem

I would like to be able to take a picture and turn the relevant regions (e.g. face / body / not the background) of the picture (or maybe all of it) into polygons (just triangles would suffice) and then color the polygons forming the object of the picture to satisfy some constraints (e.g. color gradients in the original picture are preserved or no two of the same colors out of a set of colors are touching each other).

I believe such an approach would be possible with generative adversarial networks, but I would like to take a linear optimization approach here and not a machine learning one.

I have been thinking about using Delaunay Triangulation after a friend recommended it to me. At the end is an example image of this (source: Wikipedia).

For delimiting the object of the image, I am thinking about using a Traveling Sales Person (TSP) approach but am unsure of what exactly to do.

So, does anyone here have any recommendations for (1) optimizing the edges of the object of the image so that the border around it is complete, (2) filling the space in the border with polygon shapes satisfying some constraints, (3) coloring these polygons to satisfy some constraints, (4) the software (I am thinking a mixture of Gurobi and Python) I should use to complete this task?

Thank you for your time.

Example of Delanunay Triangulation