C#中的笔划宽度变换(SWT)

编程入门 行业动态 更新时间:2024-10-27 05:24:52
本文介绍了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(一个开放源代码的计算机视觉库)中可用: 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 [ ^ ].
—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

更多推荐

C#中的笔划宽度变换(SWT)

本文发布于:2023-10-29 20:31:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1540668.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:宽度   笔划   SWT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!