在C#画一条黑线形状的线 [英] draw a line arounde black shapes in C#

查看:96
本文介绍了在C#画一条黑线形状的线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们。

我成功地在图像中分割出具有特定颜色(黑色)的形状...

我在我的项目中使用了 EuclideanColorFiltering

这是我的代码:





 EuclideanColorFiltering filter = < span class =code-keyword> new  EuclideanColorFiltering(); 







< pre lang =c#>位图CopyImage = null ;
filter.CenterColor = new RGB( 0 0 0 );
filter.FillColor = new RGB( 169 169 169 );
filter.Radius = 150 ;
CopyImage = image;
// 应用过滤器
filter.ApplyInPlace(CopyImage);





它运作正常

现在我想画一条绿线黑色的形状,,,

我该怎么做?

解决方案

http://msdn.microsoft.com/en-us/library/aa984364%28v=vs.71%29.aspx [ ^ ]



http://msdn.microsoft.com/en-us/ library / windows / apps / xaml / hh465055.aspx [ ^ ]



https://www.leadtools.com/help/leadtools/v18/dh/to/leadtools.topics~leadtools.topics.drawingsimplelinesandshapes.html [ ^ ]



浏览这些链接,这会让你成为专家

hi guys .
i succeeded to seprate shapes with specific color (black) in image ...
i used EuclideanColorFiltering in my project .
here this is my code :


EuclideanColorFiltering filter = new EuclideanColorFiltering();




Bitmap CopyImage = null;
          filter.CenterColor = new RGB(0, 0, 0);
          filter.FillColor = new RGB(169, 169, 169);
          filter.Radius = 150;
          CopyImage = image;
          // apply the filter
          filter.ApplyInPlace(CopyImage);



it works ok
now i want to draw a green line around of the black shapes ,,,
how can i do this ?

解决方案

http://msdn.microsoft.com/en-us/library/aa984364%28v=vs.71%29.aspx[^]

http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465055.aspx[^]

https://www.leadtools.com/help/leadtools/v18/dh/to/leadtools.topics~leadtools.topics.drawingsimplelinesandshapes.html[^]

Go through those links, that will make you expert in it.


这篇关于在C#画一条黑线形状的线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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