Browse our Products

Aspose.OCR for .NET 21.10 - Release Notes

All Features

KeySummaryCategory
OCRNET-425Ability to set letters/symbols enum in Recognition settingsEnhancement
OCRNET-422Investigate contrast correction algorythm in OCR-cloud codeEnhancement
OCRNET-420Implement median blur filter.Enhancement
OCRNET-419Implement adaptive median thresholding.Enhancement
OCRNET-421Implement MorphologyEx: advanced morphological transformations.Enhancement

Enhancements

  • added ability to set contrast correction preprocessing filter before recognition
  • extended preprocessing filters with median and contrast correction filters
  • added ability to set only digits or latin letters recognition

Public API and Backwards Incompatible Changes

New API

  • added new filters in the PreprocessingFilters: Median, ContrastCorrectionFilter
  • added new property in the RecognitionSettings class: - AutoContrast - AllowedCharacters
  • added enum CharactersAllowedType

Removed APIs

Will be deprecated

Usage Example

using Aspose.OCR;

namespace ProgramOCR
{
    class Program
    {
        static void Main(string[] args)
        {
            // Get API
            AsposeOcr api = new AsposeOcr();

            // Create license
            License lic = new License();

            // Set license 
            lic.SetLicense("Aspose.Total.lic");

            // Get image file for recognize
            string image = "img.png";

            // set filters as you need
            PreprocessingFilter filters = new PreprocessingFilter
            {
                 PreprocessingFilter.Median(),
				 PreprocessingFilter.ContrastCorrectionFilter()
            };
			
            // use filters as settings in recognition process
            var res = api.RecognizeImage(image, new RecognitionSettings { PreprocessingFilters = filters });
            Console.WriteLine(res.RecognitionText);
			
			
					
			// Set allowed characters (only digits)
			 var res2 = api.RecognizeImage(imgPath, new RecognitionSettings
            {
                AllowedCharacters = CharactersAllowedType.DIGITS // ALL, LATIN_ALPHABET
            });
        }
    }
}