/// <summary> /// run Ocr-Preprocessing filters /// TODO: run pre-OCR optimizations on separate thread/process /// </summary> /// <param name="screenshot"></param> private static void RunOcrPreProcessing(Screenshot screenshot) { //return; try { //screenshot.Crop(); //TODO: re-enable when screenshotter works again //screenshot.Resize(); // resize to 300dpi //TODO: neccessary for screenshot? screenshot.ToGrayscale(); //screenshot.SubtractMedianBlur(); //TODO: how to make it work? screenshot.ToBinary(); } catch (Exception e) { Logger.WriteToLogFile(e); } }