制作应用程序,将简单的黑色和白色光栅图转换为矢量。需要帮忙。 C# [英] Making app for converting simple black&white raster figures into vectors. Need help. C#

查看:128
本文介绍了制作应用程序,将简单的黑色和白色光栅图转换为矢量。需要帮忙。 C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在标题中,我需要帮助制作这个应用程序。

我是c#的新手,所以我真的不知道从哪里开始。

我知道有这方面的开源工具,但问题是我不知道如何使用它们,例如,Cspotrace。更好的是,如果没有任何外部库可以这样做。

图像我转换的是简单的黑白图形(正方形,三角形等)



关于如何做到这一点的任何想法?

As in the title, i need help with making this app.
I'm new in c# so i don't really know where to start.
I know that there are open source tools for this but problem is i don't know how to use them, for example, Cspotrace. Better would be if this could be done without any outside libraries.
Image i'm converting is simple black and white figures(squares, triangles etc.)

Any ideas on how to do this?

推荐答案

这是一项复杂的任务我在一篇旧文章中完成了任务的第一部分



连接组件标签和矢量化 [ ^ ]



这会创建很少的线段,形成图像的连接部分,但要真正做任何有用的事情,你现在必须对它进行识别和/或过滤。这个过程的下一部分是我正在撰写的文章的主题,你真的需要知道你想要什么作为终点。



例如我写的商业代码,然后采取该输出并运行钳工识别CNC机器的弧和线,这并不复杂。然而,做文本和数字识别这样的事情并不是最好的方法和完全不同的鱼。



所以采取什么方法取决于你是什么实际上是想做。
This is a complicated task I did the first part of a task in an old article

Connected Component Labeling and Vectorization[^]

That creates little line segments that form the connected part of the image but to really do anything useful you now have to run recognition and/or filters on it. This next part of the process is the subject of an article I am currently writing and you really need to know what you desire as the end point.

For example I wrote commercial code that then took that output and ran fitters to recognize arcs and lines for CNC machines which is not that complicated. However to do things like text and number recognition that is not the best approach and a totally different kettle of fish.

So really what approach to take depends on what you are actually trying to do.


这篇关于制作应用程序,将简单的黑色和白色光栅图转换为矢量。需要帮忙。 C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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