OcrAnalyzer Class
A static class that analyzes images using OCR.
- Inheritance:
- System.ObjectOcrAnalyzer
Methods
DetectTextRotation(Stream)
Detects the rotation of text in an image.
public static double DetectTextRotation(Stream stream)Public Shared Function DetectTextRotation(stream As Stream) As DoubleParameters
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.
public static double DetectTextRotation(Stream stream, OcrReadOptions readOptions)Public Shared Function DetectTextRotation(stream As Stream, readOptions As OcrReadOptions) As DoubleParameters
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.
public static double DetectTextRotation(string path)Public Shared Function DetectTextRotation(path As String) As DoubleParameters
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.
public static double DetectTextRotation(string path, OcrReadOptions readOptions)Public Shared Function DetectTextRotation(path As String, readOptions As OcrReadOptions) As DoubleParameters
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).