Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
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
Posted
Updated 13-Aug-12 3:13am
v3
Comments
[no name] 13-Aug-12 9:11am    
Yes, yes there is.
butterflyzx4 13-Aug-12 9:15am    
could you provide an explanation or a link perhaps?
Sergey Alexandrovich Kryukov 13-Aug-12 14:57pm    
Please see my answer.
--SA

1 solution

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
 
Share this answer
 
v3
Comments
Abdul Quader Mamun 13-Aug-12 15:01pm    
good work!
Sergey Alexandrovich Kryukov 13-Aug-12 15:06pm    
Thank you, Abdul.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900