GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    OcrAnalyzer Class

    Namespace:
    GemBox.Pdf.Ocr
    Assembly:
    GemBox.Pdf.Ocr.dll

    A static class that analyzes images using OCR.

    • C#
    • VB.NET
    public static class OcrAnalyzer
    Public Module OcrAnalyzer
    Inheritance:
    System.Object
    OcrAnalyzer

    Methods

    DetectTextRotation(Stream)

    Detects the rotation of text in an image.

    • C#
    • VB.NET
    public static double DetectTextRotation(Stream stream)
    Public Shared Function DetectTextRotation(stream As Stream) As Double
    Parameters
    stream
    System.IO.Stream

    The stream from which to load the image.

    Returns
    System.Double

    The counterclockwise rotation of the text in degrees.

    Remarks

    The returned value ranges from -180 to 180. For example, 0 means the text is not rotated, and 90 means the text is rotated counterclockwise by 90 degrees (to read the text, your head would tilt to the left).

    DetectTextRotation(Stream, OcrReadOptions)

    Detects the rotation of text in an image.

    • C#
    • VB.NET
    public static double DetectTextRotation(Stream stream, OcrReadOptions readOptions)
    Public Shared Function DetectTextRotation(stream As Stream, readOptions As OcrReadOptions) As Double
    Parameters
    stream
    System.IO.Stream

    The stream from which to load the image.

    readOptions
    OcrReadOptions

    The reading options which can be used to define settings for OCR.

    Returns
    System.Double

    The counterclockwise rotation of the text in degrees.

    Remarks

    The returned value ranges from -180 to 180. For example, 0 means the text is not rotated, and 90 means the text is rotated counterclockwise by 90 degrees (to read the text, your head would tilt to the left).

    DetectTextRotation(String)

    Detects the rotation of text in an image.

    • C#
    • VB.NET
    public static double DetectTextRotation(string path)
    Public Shared Function DetectTextRotation(path As String) As Double
    Parameters
    path
    System.String

    The file path to the image

    Returns
    System.Double

    The counterclockwise rotation of the text in degrees.

    Remarks

    The returned value ranges from -180 to 180. For example, 0 means the text is not rotated, and 90 means the text is rotated counterclockwise by 90 degrees (to read the text, your head would tilt to the left).

    DetectTextRotation(String, OcrReadOptions)

    Detects the rotation of text in an image.

    • C#
    • VB.NET
    public static double DetectTextRotation(string path, OcrReadOptions readOptions)
    Public Shared Function DetectTextRotation(path As String, readOptions As OcrReadOptions) As Double
    Parameters
    path
    System.String

    The file path to the image

    readOptions
    OcrReadOptions

    The reading options which can be used to define settings for OCR.

    Returns
    System.Double

    The counterclockwise rotation of the text in degrees.

    Remarks

    The returned value ranges from -180 to 180. For example, 0 means the text is not rotated, and 90 means the text is rotated counterclockwise by 90 degrees (to read the text, your head would tilt to the left).

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.