Show / Hide Table of Contents

Class OcrContrast

Get text contrast information using OCR for a line of text.

Inheritance
System.Object
OcrContrast
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Tiresias
Assembly: Phoenix.Plugin.Tiresias.dll
Syntax
public class OcrContrast

Constructors

View Source

OcrContrast(Rect[], BitmapImage, String, Double)

Initializes a new instance of the OcrContrast class.

Declaration
public OcrContrast(Rect[] wordBoundaries, BitmapImage image, string foundText, double worstContrastCandidatePercentile)
Parameters
Type Name Description
System.Windows.Rect[] wordBoundaries

Array of Rect objects that denotes the boundaries of each word in the line.

System.Windows.Media.Imaging.BitmapImage image

The original image that the OCR is run on.

System.String foundText

The text found by the OCR.

System.Double worstContrastCandidatePercentile

The bottom percentile of worst candidates to be discarded from consideration for the worst contrast.

Properties

View Source

BackgroundColor

Gets or sets the System.Drawing.Color object containing the background color.

Declaration
public Color BackgroundColor { get; set; }
Property Value
Type Description
System.Drawing.Color
View Source

BackgroundX

Gets or sets the X-coordinate of the background point.

Declaration
public double BackgroundX { get; set; }
Property Value
Type Description
System.Double
View Source

BackgroundY

Gets or sets the Y-coordinate of the background point.

Declaration
public double BackgroundY { get; set; }
Property Value
Type Description
System.Double
View Source

ForegroundColor

Gets or sets the System.Drawing.Color object containing the foreground color.

Declaration
public Color ForegroundColor { get; set; }
Property Value
Type Description
System.Drawing.Color
View Source

ForegroundX

Gets or sets the X-coordinate of the foreground point.

Declaration
public double ForegroundX { get; set; }
Property Value
Type Description
System.Double
View Source

ForegroundY

Gets or sets the Y-coordinate of the foreground point.

Declaration
public double ForegroundY { get; set; }
Property Value
Type Description
System.Double

Methods

View Source

ColorToHex(Color)

Get the hex value of the color.

Declaration
public static string ColorToHex(Color color)
Parameters
Type Name Description
System.Drawing.Color color

System.Drawing.Color object containing the color.

Returns
Type Description
System.String

String indicating the hex value of the color.

View Source

ColorToRGB(Color)

Get the RGB value of the color.

Declaration
public static int[] ColorToRGB(Color color)
Parameters
Type Name Description
System.Drawing.Color color

System.Drawing.Color object containing the color.

Returns
Type Description
System.Int32[]

int[3] indicating the RGB value of the color.

View Source

RunColorBrightness()

Run color brightness test on the line of text.

Declaration
public ContrastTests RunColorBrightness()
Returns
Type Description
ContrastTests

ContrastTests object containing the color brightness test results.

View Source

RunColorDifference()

Run color difference test on the line of text.

Declaration
public ContrastTests RunColorDifference()
Returns
Type Description
ContrastTests

ContrastTests object containing the color difference test results.

View Source

RunLuminance()

Run luminance test on the line of text.

Declaration
public ContrastTests RunLuminance()
Returns
Type Description
ContrastTests

ContrastTests object containing the luminance test results.

  • View Source
In This Article
Back to top Generated by DocFX