ToBinary() public method

Filter: Threshold (Binary) Binarize the image (threshold)
public ToBinary ( ) : void
return void
示例#1
0
        /// <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);
            }
        }
示例#2
0
        /// <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);
            }
        }