CharacterLevelAnnotation

data class CharacterLevelAnnotation(val plotCenter: PointF, val plotWidth: Double, val plotHeight: Double, val ocrability: Double, val contrast: Double, val fontSize: Double, val orientation: Double, val orientationNormalized: Double, val orientationDeviation: Double) : Parcelable

Character level annotation, contains information about the quality of a character in the document.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(plotCenter: PointF, plotWidth: Double, plotHeight: Double, ocrability: Double, contrast: Double, fontSize: Double, orientation: Double, orientationNormalized: Double, orientationDeviation: Double)

Properties

Link copied to clipboard

Estimated contrast of the character, in the range of 0, 1, where 0 means no contrast and 1 means perfect contrast.

Link copied to clipboard

Estimated height of the character in pixels.

Link copied to clipboard

Estimated OCRability of the character, in the range of 0, 1, where 0 means not readable and 1 means perfect readability.

Link copied to clipboard

Orientation of the character in degrees counter-clockwise, where 0 means straight, and the value is in the range of -180, 180.

Link copied to clipboard

Deviation of the character's normalized orientation from dominant orientation of the line, in degrees.

Link copied to clipboard

Same as orientation, but takes into account surrounding characters to smooth the orientation values of characters in a line.

Link copied to clipboard

Coordinates of the character's center in the image. The coordinates are in pixels, with (0, 0) being the top-left corner of the image. The rectangle described by the plotCenter, plotWidth, and plotHeight fields serve as a rough estimate of the position of the character in the input image, intended for plotting.

Link copied to clipboard

Height of the character in pixels.

Link copied to clipboard

Width of the character in pixels.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject