Click or drag to resize

OcrHocrRenderer Class

Create HOcr Renderer interface for rendering tesseract results into a document
Inheritance Hierarchy
SystemObject
  Patagames.OcrOcrResultRenderer
    Patagames.OcrOcrHocrRenderer

Namespace: Patagames.Ocr
Assembly: Patagames.Ocr (in Patagames.Ocr.dll) Version: 4.6.411
Syntax
public class OcrHocrRenderer : OcrResultRenderer

The OcrHocrRenderer type exposes the following members.

Properties
 NameDescription
Public propertyExtension Gets renderer extension
(Inherited from OcrResultRenderer)
Public propertyHandle Handle to internal tesseract renderer
(Inherited from OcrResultRenderer)
Public propertyImageCount Gets the index of the last image given to AddImage (i.e. images are incremented whether the image succeeded or not)
(Inherited from OcrResultRenderer)
Public propertyTitle Gets document title
(Inherited from OcrResultRenderer)
Top
Methods
 NameDescription
Public methodAddImage Adds the recognized text from the source image to the current document. Invalid if BeginDocument not yet called.
(Inherited from OcrResultRenderer)
Public methodBeginDocument Starts a new document with the given title. This clears the contents of the output data.
(Inherited from OcrResultRenderer)
Public methodStatic memberCreate(String) Create new instance of OcrHocrRenderer class.
Public methodStatic memberCreate(String, Boolean) Create new instance of OcrHocrRenderer class.
Public methodDispose Releases all resources used by this OcrResultRenderer
(Inherited from OcrResultRenderer)
Public methodEndDocument Finishes the document and finalizes the output data. Invalid if BeginDocument(String) not yet called.
(Inherited from OcrResultRenderer)
Public methodInsert Insert renderer
(Inherited from OcrResultRenderer)
Public methodNext Get next rendeder.
(Inherited from OcrResultRenderer)
Top
Remarks
This interface is then used to inject the renderer class into tesseract when processing images.

For simplicity implementing this with tesesract version 3.01, the renderer contains document state that is cleared from document to document just as the TessBaseAPI is. This way the base API can just delegate its rendering functionality to injected renderers, and the renderers can manage the associated state needed for the specific formats in addition to the heuristics for producing it.

See Also