RecognizeImageFile Method of the Engine Object
This method opens the image file specified, performs its preprocessing, layout analysis, recognition, page and document synthesis, and exports the recognized text into the selected output format. The RecognizeImageFile method can process multi-page images and export the recognition results to a single file.
HRESULT RecognizeImageFile( BSTR ImageFileName, IPrepareImageMode PrepareMode, IDocumentProcessingParams* DocumentProcessingParams, FileExportFormatEnum ExportFormat, IUnknown* ExportParams, IImagePasswordCallback* PasswordCallback, BSTR OutputFileName );
void RecognizeImageFile( string ImageFileName, IPrepareImageMode PrepareMode, IDocumentProcessingParams DocumentProcessingParams, FileExportFormatEnum ExportFormat, object ExportParams, IImagePasswordCallback PasswordCallback, string OutputFileName );
Visual Basic .NET
Sub RecognizeImageFile( _ ImageFileName As String, _ PrepareMode As IPrepareImageMode, _ DocumentProcessingParams As IDocumentProcessingParams, _ ExportFormat As IFileExportFormatEnum, _ ExportParams As Object, _ PasswordCallback As IImagePasswordCallback, _ OutputFileName As String _ )
- [in] Contains the full path to an image file that is to be recognized. If this file is not in ABBYY FineReader Engine internal format, it is prepared using the default values of the PrepareImageMode properties, or, if a profile has been loaded, the parameters set by this profile are used.
- [in] This variable refers to the PrepareImageMode object that stores parameters for image conversion in internal format. This parameter may be 0 in which case default parameters of the image preparation mode are used, or, if a profile has been loaded, the parameters set by this profile are used.
- [in] Refers to the DocumentProcessingParams object that stores all processing parameters. This parameter may be 0. In this case, the document is processed using the default parameters (all processing parameters are set to default values, and the recognition language is English), or, if a profile has been loaded, the parameters set by this profile are used.
- [in] This variable of the FileExportFormatEnum type specifies the format of the output file into which the recognized text is exported.
- [in] Pass the export parameters object of type corresponding to your file format through this input parameter. For example, if you are creating an RTF file, create the RTFExportParams object, set necessary parameters in it, and pass to this method as the exporterParams input parameter. This parameter is optional and may be 0, in which case the parameters of export have default values, or, if a profile has been loaded, the parameters set by this profile are used.
- [in] Refers to the interface of the user-implemented object of the type ImagePasswordCallback which is used to handle possible password requests for accessing images in PDF format. This parameter is optional and may be 0 in which case password-protected files cannot be processed.
- [in] Contains the full path to the output file where the recognized text should be exported. If a file at this location already exists, it is overwritten without prompt, or recognized text is append to its end, depending on the mode of export.
If recognition is interrupted by the user, this method will return E_ABORT. If pattern training is interrupted by the user, this method will return FREN_E_PATTERN_TRAINING_ABORTED. It also returns the standard return codes of ABBYY FineReader Engine functions.
Depending on the value of the IEngine::MultiProcessingParams property, ABBYY FineReader Engine can distribute processing of multi-page documents to CPU cores.
3/24/2023 8:51:52 AM