Convert Black&White image to Curves

Hi all,

Is there any plug-in or component or any script function can read a black & white image and turn it to boundary curves?
I know there is an image sampler but it returns values base on sample points on the image but we cannot let it then stroke the boundary between black and white…
Does anyone have an idea how to achieve it?

Thanks,

Jack

A very naive way to use the image sampler is to sample it at a grid, use the sampled values to modify a mesh, then slice the mesh to get the transitions. This approach is slow and tends to yield strong aliasing artefacts, but without a specific tracer algorithm it’s the only thing you can do in vanilla GH.

tracing.gh (36.3 KB)

3 Likes

You can look at potrace there are some discussion on Grasshopper forum
http://www.grasshopper3d.com/m/discussion?id=2985220%3ATopic%3A1457351

1 Like

Hi David,

Cool~ That’s good enough for me~
Many thanks!

Jack

Thanks laurent!!
That’s awesome, a lot ways to deal with detailed images~~:+1::+1::+1:

Got a chance to try the GH definition today~
I have to say, it is magic!!!
Thanks David and laurent and Nik~~
You guys make the world so beautiful~~~ :bow::bow::bow:

what a great addon …thank you

I still can’t believe they deleted Nik’s Willmore pictures from the old forum. It is as if someone discovers the cure for cancer but because he once stole some money that cure becomes invalid for use. The whole community got punished. Ha! I will never understand how some people on this earth think.

3 Likes

It wasn’t an easy choice and it wasn’t readily made. It just came down to our assessment that he was causing more harm than good. Some people just cause harm and are easily dismissed, at other times it is more complicated than that.

5 Likes