I use Tesseract in its original form as a command-line application.
Although I am sure there is a perfectly valid reason to use Tesseract as
an API from C#, I have never needed it and thus can not easily produce
the code you requested.

I don't mean to discourage your research, but if you simply need OCR, PHP
calling Tesseract is all you need.  PHP could invoke the original
command-lineTesseract application, then feed the resulting text output into
a Web page, or whatever custom logic you wanted to play with.

Also (along the same annoying lines of recommending a different approach),
if you are just learning .NET and already know C++, C++/CLI is better
than C# for many purposes.   C++/CLI is an extension of Microsoft's standard
C++ compiler which transparently supports .NET objects.  This allows
interaction between native and .NET objects not possible in any other
language.   Microsoft worked a long time to get it clean and consistent.
 C++/CLI is a relatively new (and incompatible) replacement for "Managed
C++".

W

On Sat, Jun 4, 2011 at 3:13 PM, Sarel van der Merwe <sfvdme...@gmail.com>wrote:

> Thank you Wayne,
>
> Now i know the  'tesseractengine3.dll" is correct.
>
> I done some PHP and a little bit of c++ programming. The c#
> environment is new to me, but it doesn't look to bad.
> I'm busy training myself using books.
>
> I'm not familiar with the new version of tesseract.
>
> May i be so bold and ask you for code to extract numbers from a pic. I
> think the new version of tesseract
> is capable of realignment (skew numbers.)
>
> Thanks
>
> Sarel
>
>
>
>
>
>
>
>
>
>
>
>
> On Sat, Jun 4, 2011 at 12:38 PM, wayne isaacs <wrisa...@gmail.com> wrote:
> > Using the link you supplied, I was able to convert the project to
> > VS2010 using defaults, and it all compiled, with billions of warnings,
> > producing a DLL called 'tesseractengine3.dll' in the project directory.
> > Using another VS2010 instance, I created a C# console program and added a
> > reference to that DLL.
> >
> > // the program:
> > using tesseract;
> > namespace useTesseractFromCS
> > {
> >     class Program
> >     {
> >         static void Main(string[] args)
> >         {
> >             var tp = new TesseractProcessor();
> >         }
> >     }
> > }
> > It compiled and ran, unmodified.
> >
> > My dev system is Win7-64 Ultimate,
> > Microsoft Visual Studio 2010-Ultimate Version 10.0.30319.1
> > Microsoft .NET Framework Version 4.0.30319
> > Visual Studio Hotfix KB982218
> >
> > On Fri, Jun 3, 2011 at 4:02 AM, Sarel van der Merwe <sfvdme...@gmail.com
> >
> > wrote:
> >>
> >> Hi,
> >>
> >> The steps that i followed to create the Tesseract dll.
> >>
> >>   1. Download the new version from the TesseractEngineWrapper for .Net
> >> link :
> >>
> http://code.google.com/p/tesseractdotnet/downloads/detail?name=TesseractEngine3DotNetWrapper_RC2%20_r552.zip&can=2&q=
> >>
> >>   2. After download open solution in VS 2010 (this is path for
> >> solution TesseractEngine3DotNetWrapper_RC2
> >> _r552\tesseract_r552\vs2008\tesseract.sln).
> >>
> >>    3. Compile the dll using VS 2010 c++
> >>
> >> Used the new dll inside VS2010 C#
> >> Do i need to alter the c++ code...
> >>
> >> Thanks for your assistance.
> >>
> >>
> >>
> >>
> >> On Fri, Jun 3, 2011 at 9:41 AM, wayne isaacs <wrisa...@gmail.com>
> wrote:
> >> > It might be a scope error related to external linkage.
> >> > One of the differences between C++ and C# is scope restriction.
> >> >
> >> > One example is default scope for linked libraries.  A utility class
> like
> >> > this:
> >> >
> >> > namespace N
> >> > {
> >> > class A{}
> >> > }
> >> >
> >> > .. with a consuming client like this:
> >> > namespace N
> >> > {
> >> >     class Program
> >> >     {
> >> >         A _a ;  //   error CS0122: 'N.A' is inaccessible due to its
> >> > protection level
> >> > ..
> >> >         static void Main(string[] args) {}
> >> >     }
> >> > }
> >> >
> >> > .. Succeeds in a single assembly, but fails when separated into a
> >> > library because C# default scope 'internal' is public only to the link
> >> > module, not to the application.
> >> > In C# when you split code into separate modules, you must change
> >> > class scopes to public, even if the consumer uses the same namespace.
> >> >
> >> > Another example is inner classes.
> >> > In C++, a private class object can be returned from a public method:
> >> >
> >> > class A
> >> > {
> >> > private: class B {}; // private inner class
> >> > public: B* f()
> >> >   {
> >> >   return new B();  // legal in C++, illegal in C#
> >> >   }
> >> > };
> >> > ...
> >> >
> >> > On Thu, Jun 2, 2011 at 8:03 AM, Sarel van der Merwe
> >> > <sfvdme...@gmail.com>
> >> > wrote:
> >> >>
> >> >> I'm busy converting Tesseract code from v2 to v3.01
> >> >> Using Visual Studio c# 2010
> >> >>
> >> >> This line of code was workin under Tesseract v2 but not under V3..
> >> >>
> >> >> public Tesseract _ocr;   error : is inaccessible due to its
> protection
> >> >> level.
> >> >>
> >> >>
> >> >> Thanks
> >> >>
> >> >> Sarel
> >> >>
> >> >> --
> >> >> You received this message because you are subscribed to the Google
> >> >> Groups "tesseract-ocr" group.
> >> >> To post to this group, send email to tesseract-ocr@googlegroups.com
> >> >> To unsubscribe from this group, send email to
> >> >> tesseract-ocr+unsubscr...@googlegroups.com
> >> >> For more options, visit this group at
> >> >> http://groups.google.com/group/tesseract-ocr?hl=en
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "tesseract-ocr" group.
> >> > To post to this group, send email to tesseract-ocr@googlegroups.com
> >> > To unsubscribe from this group, send email to
> >> > tesseract-ocr+unsubscr...@googlegroups.com
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/tesseract-ocr?hl=en
> >> >
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "tesseract-ocr" group.
> >> To post to this group, send email to tesseract-ocr@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> tesseract-ocr+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/tesseract-ocr?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "tesseract-ocr" group.
> > To post to this group, send email to tesseract-ocr@googlegroups.com
> > To unsubscribe from this group, send email to
> > tesseract-ocr+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/tesseract-ocr?hl=en
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "tesseract-ocr" group.
> To post to this group, send email to tesseract-ocr@googlegroups.com
> To unsubscribe from this group, send email to
> tesseract-ocr+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tesseract-ocr?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to tesseract-ocr@googlegroups.com
To unsubscribe from this group, send email to
tesseract-ocr+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

Reply via email to