logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
sobemonster  
#1 Posted : Friday, June 24, 2016 6:46:38 AM(UTC)
sobemonster

Rank: Newbie

Groups: Registered
Joined: 6/24/2016(UTC)
Posts: 2
Location: US

I'm running the Tesseract OCR in an automation environment to verify printed documents. Using a very simple Windows Forms program, Visual Studio 2015 Update 2, i'm able to extract text without a problem. I haven't set up any environment variables, nothing special at all.

However, when running through automation utilizing TestStack.White (runs like unit tests through NUnit), I get the following error:

Directory not Found
Additional information: Could not find a part of the path 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\tessdata'.

I have a bin folder where i compile all the code to, so i have a \bin\debug\tessdata folder with the files, and my unit tests run from \bin\debug. I'm not sure why it's looking in the above folder and can't find an option to explicitly direct Tesseract to the appropriate folder.

Thanks in advance for any help!

Kevin
Paul Rayman  
#2 Posted : Friday, June 24, 2016 7:55:28 AM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
Hi Kevin,

In the second case the current directory points MSVS directory instead your app folder.
You can specify the path to the TessData folder during initialization.
Please find more details here: https://tesseract.pataga...ames_Ocr_OcrApi_Init.htm
Also please see initialization section here: https://blog.patagames.c...e-pdf-from-scanned-pages
sobemonster  
#3 Posted : Monday, June 27, 2016 2:01:02 PM(UTC)
sobemonster

Rank: Newbie

Groups: Registered
Joined: 6/24/2016(UTC)
Posts: 2
Location: US

That worked great, i'm off and running. Appreciate your time!
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.