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

Notification

Icon
Error

OCR

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, December 22, 2008 9:12:24 PM(UTC)

Roshni  
Roshni

Groups: Registered
Posts: 15


Hi!

We are currently using LeadTools v13 and are making use of the following functions for OCR:

 RecognizeOCR(OCRFLAG_CALLBACK_AUTO);
 SetPolygonSize(4);
 m_pOcr->SaveDoc(cpTextFile, FILE_ASCII_STANDARD);
 SetPolygonX(nPt, x);

 ILEADRasterOCR::AddPagesFromBitmap(..)
 ILEADRasterOCR::SegmentPage(..)
 ILEADRasterOCR::ProcessPage(..)
 ILEADRasterOCR::RecognizePage(..)
 ILEADRasterOCR::SaveDocument(..)
 ILEADRasterOCR::SetActiveLangs(..)

We make use of the following constants.
 EnableProgressEvent, UseCharacterMode, ShowVerificationDialog, EnableVerificationEvent,
 VerificationMode, VerificationFlags, LeftSingleQuote, RightSingleQuote, LeftDoubleQuote,
 RightDoubleQuote, QuestionableChar, UnrecognizedChar, DecimalChar, ThousandsChar

Are the above features offered in version 16? If so what are the corresponding dlls and ocx binaries?
Also, where do I find the help files related to the above features. I have installed the LeadTools trial version 16.

Thanks in Advance,

Roshni

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, December 23, 2008 12:42:17 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Roshni,

In version 16 of LEADTOOLS, the OCR design is completely different. Currently, there are various programming interfaces that can be used with different languages, but no ActiveX controls for OCR. If you are using Visual Basic 6, you can use the COM Interop of our .NET classes with it.

Which programming language and environment are you planning to use exactly?

In all cases, the help files are installed with the toolkit evaluation and there are tutorials that show how to use the new OCR features.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Tuesday, December 23, 2008 1:14:23 AM(UTC)

Roshni  
Roshni

Groups: Registered
Posts: 15


Hi Maen,

We do not use any .Net classes and are using COM in our application ( Raster Images ). We make use of MFC 7.2.

In the case of the mentioned functions, does version 16 offer the same functionality that we are currently using? If so, what are the corresponding dlls we need to include? Please specify.
It would be great if you could mention the corresponding functions that offer the same functionality.

Thanks,

Roshni

 
#4 Posted : Tuesday, December 23, 2008 1:55:50 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Roshni,

You can use the LEADTOOLS v16 COM Interop of our .NET classes.
As I told you, in version 16 of LEADTOOLS, the OCR design is completely different. For example, if you want to add a new page to the OCR document, you can use the documentEngine.AddPage method.
Also, to finds all zones in the specified page, you can use the
documentEngine.FindZones method. To recognize the specified page(s) of the OCR document, you can use the documentEngine.Recognize method.

Please read the following topics in the LEADTOOLS .Net documentation:
- COM Interoperability: Working with Pages
- COM Interoperability: Recognizing Pages
- COM Interoperability: Recognizing Pages
- COM Interoperability: Loading and Displaying an Image
- COM Interoperability Files to be Included with Your Application

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Wednesday, December 24, 2008 12:43:59 AM(UTC)

Roshni  
Roshni

Groups: Registered
Posts: 15


Thanks for your prompt and efficient response..

In the help files, I find no mention of anything similar to RasterOCR->SegmentPage(0, SEGMENT_FIND_ALL). In v13 this is called in preparation of the recognition process.

2. RasterOCR->ProcessPage(0, lProcessFlags) - Called to process depending on the value of the process flag. Has this been removed? Do we need to explicitly call methods such as the DeskewCommand to process?

3. RasterOCR->PutEnableProgressEvent(TRUE)
4. RasterOCR->PutEnableMethodErrors(FALSE)

Could you please mention the functions that have a similar functionality to those above?

Thanks..

 
#6 Posted : Wednesday, December 24, 2008 3:57:39 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Before we go into more details, there is something important I should tell you. Since you are using C++ and not Visual Basic 6, it will not make much sense to try to use the .NET COM interop. These objects make it possible to use .NET classes using COM interfaces, but they have some limitations that you do not need to worry about in your application.

A much better approach is to use the C-style DLL API functions. These functions work flawlessly with C++ and MFC, and in fact, our own demos that use them are built using MFC projects.

For example see the main demo installed in this folder:
[LEADTOOLS 16 folder]\Examples\CDLL\OcrUtil

About the RasterOCR->SegmentPage method, this is equivalent to the concept of Zones in the new toolkit.
Read help topic "Working with Zones" in the LEADTOOLS OCR API help file.

About the RasterOCR->ProcessPage method, Instead of using the ProcessPage method, you can use the L_DocAutoOrientPage function to Auto orient the specified page. Also, you can use the L_DeskewBitmap function to rotate the specified image to straighten it.

About the RasterOCR->PutEnableProgressEvent property, instead of using this property, you can use the L_DocSetProgressCB function to set the progress callback function.
Read the help topics "L_DocSetProgressCB" and "PROGRESSCALLBACK Function" in the LEADTOOLS OCR API help file.

About the RasterOCR->PutEnableMethodErrors property, this property has been removed and no longer available.

You can find the OCR API help file on the following folder on your machine:
[LEADTOOLS 16 folder]\Help\Ltocrdlln.chm

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#7 Posted : Monday, December 29, 2008 8:31:32 PM(UTC)

Roshni  
Roshni

Groups: Registered
Posts: 15


I went through the demo [LEADTOOLS 16 folder]\Examples\CDLL\OcrUtil. I find that, on loading a file (here, .tif file), OCRing it through the 'Recoginize Page' option and finally saving it as a text file, the contents of the previous file that was OCRed is being appended to the beginning of the text file. Is this a feature or is something wrong with the process I am following? I also get some junk characters at the start of the text file.
I would also like to know if version 16 supports OCRing a pdf file. When I load a pdf file, the "Insert Current Image" is disabled and the "Insert Pages" option shows the error 'Cant load page...'
Hence, I am unable to OCR it. What are the graphic file types being supported for OCR?

Thanks..

 
#8 Posted : Tuesday, December 30, 2008 4:12:56 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

You are getting the contents of the previous file that was OCRed with the new file, because you are using the same recognition Date File for each recognize process. To resolve this, you need to use a different recognition date file for each recognize process. You can do this as follows:
In the OcrUtil demo, when you select the menu "OCR\Recognize Page", you notice that the recognize page dialog appears. In the dialog, change the name of the recognition Data file to a new name for each recognize process.

About the PDF files, if the PDF files loads correctly using LEADTOOLS, the OCR engine should be able to recognize PDF file.
Do you face this issue with any PDF file that you try to recognize, or with specific PDF files?
Can you please send me a sample PDF file that shows the problem?
If you want to send images, please put them all in a ZIP or RAR file.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#9 Posted : Tuesday, December 30, 2008 10:54:02 PM(UTC)

Roshni  
Roshni

Groups: Registered
Posts: 15


Thanks for resolving the issue related to the content of new OCRed file.
Regarding pdf files, I face the problem on loading any pdf file. Please refer to the screen shot. The Insert Current Image option is disabled. The OCR engine is running. Please note, that the 'Close option' is also disabled at this point of time. For your reference I am attaching a sample pdf file too.

Thanks..

File Attachment(s):
Ocr.zip (117kb) downloaded 17 time(s).
 
#10 Posted : Wednesday, December 31, 2008 12:08:49 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

About the PDF file, I checked the PDF file and it loads correctly on my side. It seems the PDF file doesn't load correctly on your side.

Please send this issue in a new email to support@leadtools.com and mention this forum post in your email.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.268 seconds.