Hi,
   Once again from Chandrakanth.

   What ever thigs were given in that same thing i have followed.

   And if i added some code in program.cs file, i build that and published.

   Next i was added into reference through Addreference.

   Again i was build that and checked . Problem is that coding is not
effecting.

    Here i have given that code and all for Program.CS

   For Checking purpose i* have added some code in that Program To Create a
directory while clicking DOOCR Button . *But it  was not reflecting  into
that DLL.

Can any one pls give me reply for this .


---------------------------------------------------------------Program.CS------------------------------------------------------


using System;

using System.Collections.Generic;

using System.Text;

using System.Drawing;

using System.Threading;

using System.IO;

namespace TesseractConsole

{

class Program

{

static void Main(string[] args)

{

// Code usage sample

Ocr ocr = new Ocr();

Bitmap bmp = new Bitmap(@"D:\temp\ocr\b1.bmp");

// Tessdata directory must be in the directory than this exe

Console.WriteLine("Multithread version");

ocr.DoOCRMultiThred(bmp, "eng");

Console.WriteLine("Normal version");

ocr.DoOCRNormal(bmp, "eng");

}

}

public class Ocr

{

public void DumpResult(List<tessnet2.Word> result)

{

foreach (tessnet2.Word word in result)

Console.WriteLine("{0} : {1}", word.Confidence, word.Text);

}

public List<tessnet2.Word> DoOCRNormal(Bitmap image, string lang)

{

tessnet2.Tesseract ocr = new tessnet2.Tesseract();

ocr.Init(lang, false);

List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);

DumpResult(result);

return result;

}

ManualResetEvent m_event;

public void DoOCRMultiThred(Bitmap image, string lang)

{

tessnet2.Tesseract ocr = new tessnet2.Tesseract();

ocr.Init(lang, false);

// If the OcrDone delegate is not null then this'll be the multithreaded
version

ocr.OcrDone = new tessnet2.Tesseract.OcrDoneHandler(Finished);

// For event to work, must use the multithreaded version

ocr.ProgressEvent += new tessnet2.Tesseract.ProgressHandler
(ocr_ProgressEvent);

m_event = new ManualResetEvent(false);

ocr.DoOCR(image, Rectangle.Empty);

// Wait here it's finished

m_event.WaitOne();

}

public void Finished(List<tessnet2.Word> result)

{

ocr_txtFileSaveLog();

DumpResult(result);

m_event.Set();

}

void ocr_ProgressEvent(int percent)

{

Console.WriteLine("{0}% progression", percent);

}

*public void** ocr_txtFileSaveLog()*

*{*

*string** strFolderName, strFolderPath , ApplicationPath;*

*strFolderName = **"TiffToText"**;*

*ApplicationPath = **"C:\\Aurobindo\\GoogleOCR\\"**;*

*strFolderPath = ApplicationPath + **@"\"** + strFolderName; *

*DirectoryInfo dr = new DirectoryInfo**(strFolderPath);*

*if (dr.Exists == false**)*

*dr.Create();*

**

*}*

*}*

}
 Thanks and Regards
Chandrakanth.G

------------------------------------------------------------------Program.CS---------------------------------------------------







2009/2/6 bharath bhooshan <[email protected]>

> please read the guidelines to use the googeocr..
>
>
>
>
>
>
> On Fri, Feb 6, 2009 at 3:30 PM, chandra CHANDRA <[email protected]>wrote:
>
>> HI,
>>
>>    This is from Chandrakanth.
>>
>>   Issue is ,
>>
>>    when i am clicking on button, that GUI of GoogleOCR is displaying at
>> runtime.
>>
>>  And by  Clicking on *SELECTIMAGE* button, we are going to select image
>> from source.
>>   Here after by clicking on *DOOCR ,* TiffToText Format is not working.
>>
>>  And that text file also is not saving  into some place.
>>
>>   Can any one tell me what to do for that.
>>
>>   Thanks and Regards
>> Chandrakanth
>>
>>
>> 2009/2/6 rthomas <[email protected]>
>>
>>
>>> Hi,
>>>
>>> The error is clear no ? Can't find tessnet2.dll
>>> You used the tessnet2 lib, you need to deploy it.
>>>
>>> Rémi
>>>
>>> On Feb 6, 6:54 am, chandra CHANDRA <[email protected]> wrote:
>>> > Hi,
>>> >
>>> >   This is from Chandrakanth.
>>> >
>>> >   Actually we are working on  GoogleOCR for to convert Tif File  to
>>> Text
>>> > File in C#.
>>> >
>>> >   Actually we got some Zip File. *And we got download
>>> > "tesseract-2[1].00.eng.tar.gz" ,"tesseract-2[1].01.tar.gz"*
>>> >
>>> >  That incldes one *ClassFile i.e Program.CS, tesseract.OCR,
>>> tesseract.DLL.
>>> > Actually we are tring to   acces that, meanwhile it *
>>> > *is not* * working properly. we are getting some errors.Like "COULD NOT
>>> FIND
>>> > FILE OR ASSEMBLY tessnet2, VERSION=2.0.3.6, CULTURE=NEUTRAL,PUBLIC KEY
>>> > TOKEN=NULL' OR ONE OF ITS DEPENDENCIES.THE SYSTEM COULD NOT FIND THE
>>> FILE
>>> > SPECIFIED. " .*
>>> > **
>>> >  How can we rectify that error.
>>> >
>>> >  Can any one give me reply for this as early as possible.
>>> >
>>> > --
>>> > Thanks and Regards
>>> > Gaddam.Chandrakanth
>>>
>>>
>>
>>
>> --
>> Thanks and Regards
>> Gaddam.Chandrakanth
>>
>>
>>
>
> >
>


-- 
Thanks and Regards
Gaddam.Chandrakanth

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

Reply via email to