将System.Windows.Media.Image转换为C#中的路径几何 [英] Convert System.Windows.Media.Image into pathgeometry in C#

查看:301
本文介绍了将System.Windows.Media.Image转换为C#中的路径几何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想将System.Windows.Media.Image转换为pathgeometry,如果可以,可以将其转换,然后请我知道如何转换.

谢谢.........

在我的项目中,我想在corel绘制中加载图像,并实现所需的功能,例如调整大小,旋转,倾斜,反转,因此,如果我将图像转换为路径几何,则该功能将来自路径几何,就像我对矢量对象所做的那样例如矩形,椭圆形等.
所以我想知道如何将图像转换为路径几何.........

Hello Guys
I want to convert System.Windows.Media.Image into pathgeometry does it can be converted if yes then pls know me how to convert it .

thank you .........

in my project i want to load image as there in corel draw and functionality such as resize , rotate, skew ,inverted i want and so that if i convert image to pathgeometry then the functionality will be come from pathgeometry as i have done for vector object such as rectangle, ellipse,etc.
so i want to know how to convert image to pathgeometry .........

推荐答案

您想从光栅图像制作矢量图形. /> 我认为您不会找到现成的解决方案,更不用说可以在项目中包含的免费类了.也许是商业的...

向量化不是一件容易的事:(.而且通常不能完全自动完成.您将需要执行几个图像处理步骤以减少颜色数量(实际上是适当的聚类).然后,您将需要进行边缘检测,然后再进行边缘检测.您可以跟踪边缘到闭合的填充路径.最后,您应该优化节点,并在需要时平滑曲线的路径.

您可能会发现使用的一些工具:
http://www.aforgenet.com/framework/features/ [ http://code.google.com/p/tf-net/ [
You want to make vector graphics from a raster image.
I don''t think you will find an out of the box solution, even less a free class you could include in your project. Maybe a commercial one...

Vectorization is not an easy one :(. And it cannot be done fully automatically in general. You will need to apply several image processing steps to reduce the number of colors (actually a proper clustering). Than you will need edge detection and after that you can track the edges to closed filled paths. At the end you should optimize nodes, and smooth paths to curves if needed.

Some tools you might find of use:
http://www.aforgenet.com/framework/features/[^]
http://code.google.com/p/tf-net/[^]
But you will need more googling and even more theory to learn...


这篇关于将System.Windows.Media.Image转换为C#中的路径几何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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