图像边缘检测和平滑?
我有一个位图(C# 语言),其中包含透明背景上一个人的剪影。轮廓是一种特定的色调或颜色,但强度不同。
我试图弄清楚轮廓的边缘有多光滑,如果可能的话,去除不属于轮廓的伪影。目标是获得人物的平滑(不模糊)表现,尽可能不像素化且无伪影。
任何人都可以建议一种方法(我正在使用 C# .NET 4.0)来完成此任务吗?我正在考虑某种 3 遍方法——边缘检测、异常值或伪影去除,然后平滑,但我以前从未做过这种事情。
谢谢!
I have a Bitmap (in C#) which contains a silhouette of a single person on a transparent background. The silhouette is a particular hue or color, but of varying intensities.
I'm trying to figure out how smooth the edges of the silhouette, and if possible remove artifacts that are not part of the silhouette. The goal is to get a nice smooth (not blurred) representation of the person, as un-pixelated and artifact free as possible.
Can anyone suggest an approach (I'm working in C# .NET 4.0) to accomplish this? I was thinking some sort of 3 pass approach- edge detection, outlier or artifact removal and then smoothing, but I have never done this kind of thing before.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建边缘检测算法。这取决于你的照片有多好,结果很快就会出来。
边缘检测后,您可以尝试在检测到的边界周围创建多边形。多边形具有使用任何计算的不透明蒙版的最大分辨率。
如果你的图像分辨率良好,没有太多噪音(如物体或头发),那么它应该是一个很酷的作品。
也许这个项目可以帮助您的项目:
http://www.codeproject.com/Articles/9727/图像处理实验室 C
问候
You can create an edge detection algorith. It depends on how good your pictures are, the result will be available quickly.
After edge detection you can try to create the polygon around the detected border. The polygon has maximum resolution to use any calculated opacity mask.
If your images are in good resolution without a lot of noises (like objects or hair) it should be a cool work.
Perhaps this project helps you for your project:
http://www.codeproject.com/Articles/9727/Image-Processing-Lab-in-C
Regards