Provide ignored characters during OCR operation

Provide ignored characters during OCR operation

In case you know the characters that aren’t present in the image, you can pass those characters as a value for property **RecognitionSettings.IgnoredCharacters **. Doing this will ensure that the provided characters aren’t matched in the OCR process.┬áThe following code snippet demonstrates setting the ignored characters for the OCR process.

Sample Code

...

	// For complete examples and data files, please go to https://github.com/aspose-ocr/Aspose.OCR-for-.NET
	// The path to the documents directory.
	string dataDir = RunExamples.GetDataDir_OCR();

	// Initialize an instance of AsposeOcr
	AsposeOcr api = new AsposeOcr();

	// Recognize image
	RecognitionResult result = api.RecognizeImage(image, new RecognitionSettings
	{
		IgnoredCharacters  = "ab1"
	});
			
	// Display the recognized text
	Console.WriteLine(result.RecognitionText);