Extracting colour boundary as a simple polyline from bitmap

Hi everyone, I am working on a project that is based on the research done by ETH, from this paper

I am running into a dead-end trying to extract a closed polyline from a base bitmap. My idea is to read the black colour of the image and get the outer edge of the colour and then discretize it. So far I have tried to map the bitmap into a mesh and extract the faces with black colour, but it is not the result I am looking for.

Here is the base bitmap and the result I am getting:

What I am looking for is something like this (the red polylines):

Does anybody have any suggestions?

Thank you in advance!

You could convert the bitmap to a heightmap, mapping brightness to Z, then take a contour.

1 Like

You can use rooster plugin, quite similar to the Vectorize command inside Rhino


If one day you want just the network

If you want better smoothing

1 Like

Thank you, Laurent, this was quite helpful!