Previously the System.Drawing
was being used which has now been replaced with Aspose.Drawing
. This has improved the OCR performance and cross-platform support.
Better Detection of Tabular Structures in OCR
A new DetectAreasMode enumeration has been introduced that allows to choose a neural network for the automatic detection of table cells. The available values are; NONE, DOCUMENT, PHOTO, COMBINE, TABLE. The TABLE
value detects table cells with text via OCR API.
The following C# code snippet demonstrates how to detect image containing tabular content using API:
using Aspose.OCR;
namespace ProgramOCR
{
class Program
{
static void Main(string[] args)
{
// Create instance of OCR API
AsposeOcr api = new AsposeOcr();
// Set license
License lic = new License();
lic.SetLicense("ASPOSE-LICENSE.lic");
// Image path
string image = "table.jpg";
// Recognize
RecognitioResult resultTable = api.RecognizeImage(image, new RecognitionSettings {DetectAreasMode = DetectAreasMode.TABLE});
//Print recognition results
Console.WriteLine(resultTable.RecognitionText);
}
}
}
New ML Model for Image Denoising in OCR
A new recognition setting has been introduced in the OCR API that you may enable or disable to perform automatic noise removal from the detected images. The specialized neural network removes dirt, glare, unwanted gradients, spots, noise, and scratches from the images.
Please note that we have implemented both the pre-processing and post-processing algorithms for Binarized Neural Network (BNN).
The following is a C# sample code to recognize image using automatics noise removal (denoising) via API:
using Aspose.OCR;
namespace ProgramOCR
{
class Program
{
static void Main(string[] args)
{
// Create instance of OCR API
AsposeOcr api = new AsposeOcr();
// Set license
License lic = new License();
lic.SetLicense("ASPOSE-LICENSE.lic");
// Image path
string image = "noisy.jpg";
// Recognize
RecognitioResult result = api.RecognizeImage(image, new RecognitionSettings {AutoDenoising = false});
//Print recognition results
Console.WriteLine(result.RecognitionText);
}
}
}
For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.OCR for .NET 22.6 - Notes de version.