none
Vectoring Bitmap RRS feed

  • Question

  • Hi,

    I have a question about vectoring a black and white bitmap. Is there a trivial algorithm to do this?

    For Example I have a bitmap 5x5 like the following:

    00000

    00110

    01110

    01110

    00000

    How can I get a flat from it like a path of SVG?

    Thank you and best regards,

    Pinguin

    Friday, March 29, 2019 11:14 AM

All replies

  • Creating a vector image from a raster image is not a trivial task.  It's not hard to find image edges, and it's not terribly difficult to even come up with an outline.  But, looking at the bitmap you have above, are you hoping the result will be a single filled polygon?  That's not easy.  Consider, for example, if I change one pixel in the middle:

    00000
    00110
    01010
    01110
    00000

    Now what would you expect?  It turns out this can be represented as an unfilled polygon, but for an algorithm to tell the difference between the two is quite difficult.

    If you Google "vectorize a raster bitmap", you'll find lots of scholarly articles that discuss the topic.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Sunday, March 31, 2019 7:53 AM