矢量化照片:寻找一种适应的算法 [英] Vectorizing Photos: Finding an Adapted Algorithm

查看:109
本文介绍了矢量化照片:寻找一种适应的算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个小项目,我已经决定要将一个小光栅写入矢量转换器。在线提供了大量的资源,但实际实施的次数却少得多,可以为我提供任何一种起点。我还没有决定使用哪种语言,但Python似乎很适应。

As a little project, I've decided I want to write a small raster to vector converter. Lots and lots of resources are available online, but many fewer actual implementations can give me any kind of starting point. I haven't decided which language I'm going to do this in, but Python seems to be pretty adapted.

第一个问题是大多数论文都是针对矢量化的无论是徽标还是灰度图像,我都不感兴趣。 potrace ,其算法描述为这里是其中一个库。相同的技术是否适用于照片位图?

The first issue is that most papers are directed at vectorizing either logos or grayscale images, neither of which I'm too interested in. potrace, whose algorithm is described here, is one of those libraries. Are the same techniques applicable to photo bitmaps ?

在我偶然发现矢量魔术。结果令人惊讶!但是,它们不提供有关其算法的任何信息。这里描述了一种产生类似质量结果的方法:
http:// eprints.gla.ac.uk/47879/1/ID47879.pdf 。策略是删除轮廓并处理它们,然后将它们绘制为矢量。

I was discouraged by my findings until I stumbled upon Vector Magic. The results are astonishing ! However, they don't provide any information concerning their algorithm. A method that produces similar quality results is described here: http://eprints.gla.ac.uk/47879/1/ID47879.pdf. The strategy is to remove the contours and process them, before drawing them as vectors.

但是没有提到它们是如何做到这一点的。我可以用openCV提取轮廓,但那么呢?我无法理解矢量的创建,或轮廓提取后发生的任何事情。

But there is no mention of how they do this. I can extract contours with openCV, but then what ? I have trouble understanding the creation of the vector, or anything that happens after contour extraction.

因此,总结一下,这是我的问题:你推荐哪种语言或库这个项目?您是否有任何关于实施能够产生令人满意的结果的算法的提示?

So, to conclude, here are my questions: which language or library do you recommend for this project ? And do you have any tips on implementing an algorithm that can produce satisfactory results ?

推荐答案

以下是几种方法:

  • ARDECO: http://alice.loria.fr/index.php/publications.html?Paper=EGSR_Ardeco@2006
    it casts the problem as an energy minimization problem, that is solved via a Voronoi-like approach

http://www.cs.northwestern.edu/~sco590/npar2011.pdf

它在精神上与portrace更相似你提到了

http://www.cs.northwestern.edu/~sco590/npar2011.pdf
it is much more similar in spirit to the portrace you mentioned

使用渐变网格: https://www.cct.lsu.edu/~fharhad/ganbatte/siggraph2007/CD2/content/papers/011-sun.pdf

代表t他使用网格在图像中渐变

Using gradient meshes: https://www.cct.lsu.edu/~fharhad/ganbatte/siggraph2007/CD2/content/papers/011-sun.pdf
that represent the gradients in the image with a mesh

使用扩散曲线:

http://hal.archives-ouvertes.fr/docs/00/27/47/68/PDF/ diffusion_curves.pdf

主要用于通过绘制渐变来创建艺术品,他们还提出了使用基元对图像进行矢量化的反问题。

Using diffusion curves:
http://hal.archives-ouvertes.fr/docs/00/27/47/68/PDF/diffusion_curves.pdf
Mostly used to create art by drawing gradients, they also propose the inverse problem of vectorizing an image with their primitives.

这篇关于矢量化照片:寻找一种适应的算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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