LEADTOOLS OCR (Leadtools.Forms.Ocr assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AutoPreprocess(OcrAutoPreprocessPageCommand,Int32,Int32,OcrProgressCallback) Method
See Also 
Leadtools.Forms.Ocr Namespace > IOcrPageCollection Interface > AutoPreprocess Method : AutoPreprocess(OcrAutoPreprocessPageCommand,Int32,Int32,OcrProgressCallback) Method



command
The preprocessing command to perform.
firstPageIndex
The zero-based index of the first page to preprocess.
lastPageIndex
The zero-based index of the last page to preprocess. A value of -1 means preprocess up to and including the last page in the OCR document.
callback
Optional callback to show operation progress.

The AutoPreprocess(OcrAutoPreprocessPageCommand,Int32,Int32,OcrProgressCallback) Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

command
The preprocessing command to perform.
firstPageIndex
The zero-based index of the first page to preprocess.
lastPageIndex
The zero-based index of the last page to preprocess. A value of -1 means preprocess up to and including the last page in the OCR document.
callback
Optional callback to show operation progress.
Perform auto image processing clean up on a range of the pages in the OCR document to enhance the quality of the pages before starting its recognition.

Syntax

Visual Basic (Declaration) 
Overloads Sub AutoPreprocess( _
   ByVal command As OcrAutoPreprocessPageCommand, _
   ByVal firstPageIndex As Integer, _
   ByVal lastPageIndex As Integer, _
   ByVal callback As OcrProgressCallback _
) 
Visual Basic (Usage)Copy Code
Dim instance As IOcrPageCollection
Dim command As OcrAutoPreprocessPageCommand
Dim firstPageIndex As Integer
Dim lastPageIndex As Integer
Dim callback As OcrProgressCallback
 
instance.AutoPreprocess(command, firstPageIndex, lastPageIndex, callback)
C++/CLI 
void AutoPreprocess( 
   OcrAutoPreprocessPageCommand command,
   int firstPageIndex,
   int lastPageIndex,
   OcrProgressCallback^ callback
) 

Parameters

command
The preprocessing command to perform.
firstPageIndex
The zero-based index of the first page to preprocess.
lastPageIndex
The zero-based index of the last page to preprocess. A value of -1 means preprocess up to and including the last page in the OCR document.
callback
Optional callback to show operation progress.

Example

For an example, refer to IOcrPageCollection.

Remarks

This method will iterate through pages between firstPageIndex and lastPageIndex in this OCR document and run IOcrPage.AutoPreprocess on each page.

You can use this method to deskew, rotate or invert the image according to command. By performing auto pre-processing on the page, you can improve the image quality of draft mode faxes.

You can use the OcrProgressCallback to show the operation progress or to abort it. For more information and an example, refer to OcrProgressCallback.

You should call this method prior to calling Recognize.

To perform auto-preprocessing on all the pages in the OCR document use AutoPreprocess(OcrAutoPreprocessPageCommand command, OcrProgressCallback callback).

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

AutoPreprocess(OcrAutoPreprocessPageCommand,Int32,Int32,OcrProgressCallback) requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features