Inkscape.org
Beyond the Basics Image to greyscale vector, performance and am I going about this the right way
  1. #1
    yenadar yenadar @yenadar

    I am trying to figure out how to get an image into a single layer greyscale SVG, then converting the relative greyscale to relative alpha/transparency. The single SVG then can be imported into my CNC's CAD/CAM software where the alpha is interpreted as a height map for the tool path. (The end result being that I can carve out a 2.5D relief of the image)

    So far, I have only gotten as far as having a stack of separate greyscale paths, but even small images without a lot of detail bog my computer down so far that Inkscape barely functions, and it feels like with my system it shouldn't be. (Ryzen 9 3900 12-core, 64gb ram, SSD), and I haven't been able to get them separated from the stacked group to then figure out which ones get what transparency, much less merging back together into a single image. I have been successful with 2-color greyscale, but anything higher than that is frustrating the hell out of me.

    It feels like I'm going about this the wrong way.

    I'm also tried using GIMP to convert the greyscale to alpha first, but it seems that is lost on image import, which also might be something I'm doing wrong

    Any help?

  2. #2
    inklinea inklinea @inklinea⛰️

    I wrote this ages ago. I haven't looked at it for a very long time.

    It might do what you want, might not.

    https://inkscape.org/~inklinea/%E2%98%85grey-to-mono-alpha

  3. #3
    yenadar yenadar @yenadar

    Thank you. That does appear to fit the intent of what I want to do, but ​​​there is no apparent change when the extension is applied to an image. It gives me a starting point though, and I know the code language, so I'll poke around and see if I can get it working.

  4. #4
    inklinea inklinea @inklinea⛰️

    If you are working with a bitmap image, you first have to trace it to paths using Path>Trace bitmap

    There are lots of threads on the forum for trace bitmap. ( and probably hundreds on the web too )

    It will always involve some cleaning off the paths, unless they are very simple.

    That's where the real work in going from bitmap to cnc lies. 

    It's a job in itself.

     

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Image to greyscale vector, performance and am I going about this the right way