矢量位图 [英] Vectoring Bitmap

查看:70
本文介绍了矢量位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于引导黑白位图的问题。是否有一个简单的算法来执行此操作?

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

例如,我有一个位图5x5,如下所示:

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

00000

00110

01110

01110

00000

如何从SVG的路径中获得一个单位?

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

谢谢你,最好的问候,

Pinguin

推荐答案

从光栅图像创建矢量图像并非易事。 找到图像边缘并不难,甚至想出一个轮廓并不是非常困难。 但是,看看你上面的位图,你希望结果是
单个填充多边形吗? 这不容易。 例如,考虑如果我在中间改变一个像素:

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

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.


这篇关于矢量位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆