本文介绍了C#中的笔划宽度变换(SWT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
—SA
I found that SWT is available in CCV, an open-source Computer Vision Library:
libccv/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:
en.wikipedia/wiki/P/Invoke[^],
msdn.microsoft/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:
en.wikipedia/wiki/C%2B%2B/CLI[^],
www.ecma-international/publications/standards/Ecma-372.htm[^],
msdn.microsoft/en-us/library/xey702bw.aspx[^],
msdn.microsoft/en-us/library/3bstk3k5[^].
—SA
我正在做一个项目,我必须检测不是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(一个开放源代码的计算机视觉库)中可用: libccv/doc/doc-swt/ [ ^ ]. 您可以下载源代码并学习其工作原理,以C#编写或进行翻译. 或者,您可以将代码编译到本机DLL中,并通过P/Invoke在C#项目中使用它. 如果您需要学习P/Invoke,请从这里开始: en.wikipedia/wiki/P/Invoke [ ^ ], msdn.microsoft/en-us/library/Aa712982 [ ^ ]. 此CodeProject也可能有用:基本P/调用 [ ^ ]. P/Invoke的一种替代方法是使用C ++/CLI混合模式(托管+非托管)项目.该项目可以构建一个DLL,但是它可以包含一些托管的包装CLI代码,因此,从您的.NET应用程序的角度来看,您可以将其用作常规的.NET程序集,即引用它.请参阅: en.wikipedia/wiki/C%2B%2B/CLI [ ^ ], www.ecma-international/publications/standards/Ecma-372.htm [^ ], msdn.microsoft/en-us/library/xey702bw.aspx [ ^ ], msdn.microsoft/en-us/library/3bstk3k5 [ ^ ].
更多推荐
C#中的笔划宽度变换(SWT)
发布评论