public ArkOCR()
{
Bitmap origBitmap, bmp;
origBitmap = Properties.Resources.ARKCalibration1080;
bmp = removePixelsUnderThreshold(GetGreyScale(origBitmap), whiteThreshold);
CalibrateFromImage(0, bmp, @"1234567890?,.;/:+=@|#%abcdeghijklm " + @"n opqrstuvwxyz&é'(§è!çà)-ABCDEFGHIJLMNOPQRSTUVWXYZ£µ$[]{}ñ<>/\f lK");
origBitmap = Properties.Resources.ARKCalibration1050;
bmp = removePixelsUnderThreshold(GetGreyScale(origBitmap), whiteThreshold);
CalibrateFromImage(1, bmp, @"1234567890.,?;.:/=+ù%µ$* ABCDEFGHIJ-LMNOPQRSTUVWXYZabcdeghijklmnopqrstuvwxyz&#'()[]{}!@flK"); // £ missing
//bmp.Save("D:\\temp\\calibration_threshold_1050.png");// TODO comment out
origBitmap = Properties.Resources.ARKCalibration1050;
bmp = removePixelsUnderThreshold(GetGreyScale(origBitmap), whiteThreshold);
CalibrateFromImage(2, bmp, @"1234567890.,?;.:/=+ù%µ$* ABCDEFGHIJ-LMNOPQRSTUVWXYZabcdeghijklmnopqrstuvwxyz&#'()[]{}!@flK"); // £ missing
// add weightings to chars. More probable chars get higher weighting
for (int l = 32; l < charWeighting.Length; l++)
{
if (l == 37) charWeighting[l] = 1; // %
else if (l < 44) charWeighting[l] = 0.9;
else if (l < 58) charWeighting[l] = 1; // numbers ,-./
else if (l < 65) charWeighting[l] = 0.9; // :;<=>?@
else if (l < 91) charWeighting[l] = 0.98; // capital letters
else if (l < 97) charWeighting[l] = 0.9; // [\]^_'
else if (l < 123) charWeighting[l] = 1; // lowercase letters
else if (l < 165) charWeighting[l] = 0.97; // letters with accents
else charWeighting[l] = 0.8; // symbols
}
}