Click here to Skip to main content
13,252,065 members (57,071 online)
Rate this:
 
Please Sign up or sign in to 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 13-Aug-12 4:09am
Updated 13-Aug-12 4:13am
v3
Comments
Wes Aday 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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 13 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100