Help: Vectorize image in v7?

I recall Rhino got a built in feature for vectorizing images, but can’t recall what is was called, does anybody know?
(@wim)

Hei Jørgen -

It’s called Vectorize and can be installed with the PackageManager.
-wim

Also -

I suspect that this will continue to be a download-only plug-in, not built-in.
(and changing the category to Rhino since your title specifically says v7 :sunglasses:)
-wim

does that work on mac? and what/where is the package manager?

Hi -

I just tried and that seems to work.

Did you try the PackageManager command and related help file entry?
-wim

Thanks for the change.

Ah, yes, I see it is a crude implementation.
I wish it worked on pictures (picture frames) too, and not only images outside Rhino.
And it needs a preview function so we can tweak the settings on the the fly. I understand it isn’t fast enough for realtime preview, so the button should be clicked each time we want to wait for the outcome.

Thanks!

thanks wim, i am maybe too dumb, when i call up that command i am getting

Failed to fetch packages from source(s): "https://yak.rhino3d.com"

Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.

Are you sure there's a package server/folder here?

Thanks, it did the job!

I wanted to quickly outline where the red mesh is occluded by the light gray mesh.

Workflow:

  • I made an image of the shaded view with -viewcapturetofile and scale=2.
  • Saved to same location as Rhino file (default)
  • Ran Vectorize with treshold at 75
  • Ran SelLast to select the result ( <- This should be default in the plugin)
  • Aligned the curves to the geometry (And moved 100 units to the right)
  • Hatched the curves

And I have to say, the result is better than what Illustrator does.
(But Illustrator lets us vectorize into as many colors as we want, and that can be really good for multicolor handling)

2 Likes

I sum up my Vectorize wishes here and hope they are of interest for @dale and that the plugin will get some more love in V8. It is a tool with a lot of potential.

First of all, I am impressed with the curve quality, it surpassed my expectations.

  • Preview (so we don’t have to guess on the result)
  • Insert point and size, just like pitcure frame (not just a size based on the number of pixles or what ever is used, at origin). Here the initial image could be used to place a temorary picture object.
  • Update Preview button for when ever we adjust the settings, so we can evaluate the result, not having to undo and redo the entire process
  • The ability to use an existing picture object in Rhino, where position and size is matched to the input picture (This should be easy to implement)
  • Select the generated curves (if any) when done
  • A color range picker that uses the RGB value +/- range and not only black/white intensity as it is now
  • Option to choose Hatch as result, not curves
  • And finally the ability to vectorize colors, like in Illustrator, where we can choose number of colors we want in the result.

And a more far fetched wish:

  • The ability to select a region in a parallel viewport and use the pixles there directly, maybe with a multiplier to get an even sharper result (just like viewcapturetoclipboard has with the scale parameter) So we can vectorize stuff directly like I showed in the example above.

Hope you find this inspiring and shout out if you want to discuss anything.

Oh, and will it be possible to script this function in the future?

2 Likes

It is open source. Maybe someone can make changes and send Dale a pull request.

1 Like

Hi @Holo,

It already does - perhaps you need to zoom out?

It already does.

The rest of the comments and suggestions are excellent. You might consider logged them here:

https://github.com/dalefugier/Vectorize/issues

Thanks,

– Dale

Oh, I was working on a big project a bit from origin, and the result was very small compared to the scale. I did a test now, to see how the preview worked and no image showed it seemed, but the curves were only 0.17 METER tall, so maybe scale for units?

I logged in to GitHub, I can pull a request there it seems (I am new at this…) Do you want one for all, or one for each?

By the way, I get a crash if I try to vectorize this image:

I cot crashes on another image too. (I am just trying Vectorize on random stuff, so I do not need the result at all)

Hi @Holo,

No pull request needed. Just create a new issue and log your “issues”. You can make one many, it doesn’t matter to me.

Thanks,

– Dale

1 Like

@Holo - the image above doesn’t have enough color depth. I’ll add some addition checks for this to prevent crashes.

Thanks,

– Dale

2 Likes

Hi @Holo,

I’ve pushed an update to Vectorize that should prevent Rhino from crashing due to selecting low pixel width bitmaps. Just run the PackageManager command to update.

– Dale

3 Likes

I’ll test it out later, does it throw an error, or fors it conert it so it works?