C# Class ARKBreedingStats.ArkOCR

Show file Open project: cadon/ARKStatsExtractor

Public Properties

Property Type Description
ARKProcess System.Diagnostics.Process
alphabet ].Bitmap[
currentResolution int
hashMap List>.Dictionary
lastLetterPositions Point>.Dictionary
reducedAlphabet ].Bitmap[
statPositions Point>.Dictionary

Public Methods

Method Description
ArkOCR ( ) : System
CalibrateFromImage ( int resolution, Bitmap source, string textInImage ) : void
GetGreyScale ( Bitmap source, bool writingInWhite = false ) : Bitmap
PercentageMatch ( Bitmap img1, Bitmap img2 ) : float
SubImage ( Bitmap source, int x, int y, int width, int height ) : Bitmap
calibrate ( Bitmap screenshot ) : bool
doOCR ( string &OCRText, string &dinoName, string useImageFilePath = "", bool changeForegroundWindow = true ) : float[]
isDinoInventoryVisible ( ) : bool
lastLetterPosition ( Bitmap source ) : int
removePixelsUnderThreshold ( Bitmap source, int threshold ) : Bitmap

Private Methods

Method Description
AddBitmapToDebug ( Bitmap bmp ) : PictureBox
GenerateLetterImagesFromFont ( Int16 pixelSize ) : void
HasWhiteInVerticalLine ( Bitmap source, int posXInImage ) : bool
StoreImageInAlphabet ( int resolution, char letter, Bitmap source, int letterStart, int letterEnd ) : void
letterRect ( Bitmap source, int hStart, int hEnd ) : Rectangle
readImage ( int resolution, Bitmap source, bool onlyMaximalMatches, bool onlyNumbers, bool writingInWhite = true ) : string
readImageAtCoords ( int resolution, Bitmap source, int x, int y, int width, int height, bool onlyMaximalMatches, bool onlyNumbers, bool writingInWhite = true ) : string
setDebugPanel ( System.Windows.Forms.FlowLayoutPanel OCRDebugLayoutPanel ) : void

Method Details

ArkOCR() public method

public ArkOCR ( ) : System
return System

CalibrateFromImage() public method

public CalibrateFromImage ( int resolution, Bitmap source, string textInImage ) : void
resolution int
source System.Drawing.Bitmap
textInImage string
return void

GetGreyScale() public method

public GetGreyScale ( Bitmap source, bool writingInWhite = false ) : Bitmap
source System.Drawing.Bitmap
writingInWhite bool
return System.Drawing.Bitmap

PercentageMatch() public method

public PercentageMatch ( Bitmap img1, Bitmap img2 ) : float
img1 System.Drawing.Bitmap
img2 System.Drawing.Bitmap
return float

SubImage() public method

public SubImage ( Bitmap source, int x, int y, int width, int height ) : Bitmap
source System.Drawing.Bitmap
x int
y int
width int
height int
return System.Drawing.Bitmap

calibrate() public method

public calibrate ( Bitmap screenshot ) : bool
screenshot System.Drawing.Bitmap
return bool

doOCR() public method

public doOCR ( string &OCRText, string &dinoName, string useImageFilePath = "", bool changeForegroundWindow = true ) : float[]
OCRText string
dinoName string
useImageFilePath string
changeForegroundWindow bool
return float[]

isDinoInventoryVisible() public method

public isDinoInventoryVisible ( ) : bool
return bool

lastLetterPosition() public method

public lastLetterPosition ( Bitmap source ) : int
source System.Drawing.Bitmap
return int

removePixelsUnderThreshold() public method

public removePixelsUnderThreshold ( Bitmap source, int threshold ) : Bitmap
source System.Drawing.Bitmap
threshold int
return System.Drawing.Bitmap

Property Details

ARKProcess public property

public Process,System.Diagnostics ARKProcess
return System.Diagnostics.Process

alphabet public property

public Bitmap[,] alphabet
return ].Bitmap[

currentResolution public property

public int currentResolution
return int

hashMap public property

public Dictionary> hashMap
return List>.Dictionary

lastLetterPositions public property

public Dictionary lastLetterPositions
return Point>.Dictionary

reducedAlphabet public property

public Bitmap[,] reducedAlphabet
return ].Bitmap[

statPositions public property

public Dictionary statPositions
return Point>.Dictionary