C#中的笔划宽度变换(SWT) [英] Stroke Width Transform (SWT) in C#

查看:136
本文介绍了C#中的笔划宽度变换(SWT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个项目,我必须检测不是OCR"图像中的文本,只是要检测文本是否为文本并本地化文本行.

我知道首先必须使用边缘检测算法来生成边缘图,但是我想知道是否存在任何笔触宽度变换的实现示例-C#中的SWT算法

感谢

Hi, I am doing a project where I have to detect text in an image "not OCR", just to detect if text is their and localize the text lines.

I know that at first the edge map has to generated using an edge detection algorithm but I want to know if there are any examples of implementation of the stroke width transform - SWT algorithm in C#

thanks

推荐答案

我发现SWT在CCV(一个开放源代码的计算机视觉库)中可用:
http://libccv.org/doc/doc-swt/ [ http://en.wikipedia.org/wiki/P/Invoke [ http://msdn.microsoft.com/en-us/library/Aa712982 [ ^ ].

此CodeProject也可能有用:基本P/调用 [ http://en.wikipedia.org/wiki/C%2B%2B/CLI [ ^ ],
http://www.ecma-international.org/publications/standards/Ecma-372.htm [^ ],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/3bstk3k5 [ ^ ].

—SA
I found that SWT is available in CCV, an open-source Computer Vision Library:
http://libccv.org/doc/doc-swt/[^].

You can download the source code and learn how it works, to write it in C# or make a translation.

Alternatively, you can compile the code into a native DLL and use it in your C# project via P/Invoke.

If you need to learn P/Invoke, start from here:
http://en.wikipedia.org/wiki/P/Invoke[^],
http://msdn.microsoft.com/en-us/library/Aa712982[^].

This CodeProject can also be useful: Essential P/Invoke[^].

One alternative to P/Invoke is to use C++/CLI mixed-mode (managed+unmanaged) project. This project could build a DLL, but it can contain some managed wrapper CLI code, so, from the standpoint of your .NET application, you can use it as a regular .NET assembly, that is, reference it. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^],
http://msdn.microsoft.com/en-us/library/3bstk3k5[^].

—SA


这篇关于C#中的笔划宽度变换(SWT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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