Vectorizing Photos: Finding an Adapted Algorithm [

2019-05-19 01:25发布

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.

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 ?

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.

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 ?

1条回答
▲ chillily
2楼-- · 2019-05-19 01:50

Here are a couple of approaches:

查看更多
登录 后发表回答