Leadtools.Document Deprecated as of v16. Refer to: Leadtools.Forms.Ocr | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
RecognitionStatistic Property
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : RecognitionStatistic Property



Gets the last recognition status.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property RecognitionStatistic As RasterDocumentRecognitionStatistic
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim value As RasterDocumentRecognitionStatistic
 
value = instance.RecognitionStatistic
C# 
public RasterDocumentRecognitionStatistic RecognitionStatistic {get;}
C++/CLI 
public:
property RasterDocumentRecognitionStatistic RecognitionStatistic {
   RasterDocumentRecognitionStatistic get();
}

Return Value

A RasterDocumentRecognitionStatistic value which provides information about the recognition status.

Example

Visual BasicCopy Code
Public Sub RecognitionStatisticExample()
   ' Note that this is a sample key, which will not work in your toolkit
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")

   Dim rasterDocument As RasterDocumentEngine
   rasterDocument = RasterDocumentEngine.Instance
   rasterDocument.Startup()
   'assume page is added, refer to AddPage example for more information
   'assume zones are added, refer to AddZone example or FindZones for more information
   'assume page is recognized, refer to Recognize example for more information

   Dim status As RasterDocumentRecognitionStatistic = New Leadtools.Document.RasterDocumentRecognitionStatistic()
   status = rasterDocument.RecognitionStatistic

   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void RecognitionStatisticExample() 

   // Note that this is a sample key, which will not work in your toolkit 
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey"); 
 
   RasterDocumentEngine rasterDocument; 
   rasterDocument = RasterDocumentEngine.Instance; 
   rasterDocument.Startup(); 
 
   RasterDocumentRecognitionStatistic status = new RasterDocumentRecognitionStatistic(); 
   status = rasterDocument.RecognitionStatistic; 
 
   MessageBox.Show ("Recognized Characters = " + status.RecognizedCharacterCount + "\n" +  
      "Recognized Words = " + status.RecognizedWordCount +  "\n" +  
      "Rejected Characters = " + status.RejectCharacterCount +  "\n" +  
      "Rejected Words = " + status.RejectWordCount +  "\n" +  
      "Recognized Time = " + status.RecognizedTime +  "\n" +  
      "Reading Time = " + status.ReadingTime +  "\n" +  
      "Pre Process time = " + status.PreprocessTime +  "\n" +  
      "Decomposition  = " + status.DecompositionTime); 
 
   rasterDocument.Shutdown(); 
}

Remarks

Returns information about the accuracy and timing data of the last recognition status. Call this method after calling Recognize.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

The Leadtools.Document namespace is deprecated and no longer supported as of LEADTOOLS v16. For v16 and later, please refer to: Leadtools.Forms.Ocr. This documentation is retained for v15 and earlier informational use only.