Navegue pelos nossos produtos

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.

 

Aspose.ocr for Net 22.8 (MSI)

Download  Download 

Detalhes do arquivo

  • Downloads:
  • 1
  • Tamanho do arquivo:
  • 162.34MB
  • data adicionada:
  • 26/8/2022

Descrição

Filtros de pré -processamento para a área, reconhecem a imagem de bytes

Detalhes do arquivo

Specify Image Region to Apply Preprocessing Filter

This release of OCR API enable you to apply the preprocessing filters to specific areas of an image.

Aspose.OCR.Models.PreprocessingFilters.PreprocessingFilter filters = new Aspose.OCR.Models.PreprocessingFilters.PreprocessingFilter();
Aspose.Drawing.Rectangle blackRectangle = new Aspose.Drawing.Rectangle(5, 161, 340, 113);
filters.Add(Aspose.OCR.Models.PreprocessingFilters.PreprocessingFilter.Invert(blackRectangle));

Detect Images provided as Aspose.Drawing.Color Array

For the image recognition via API you may provide the image as an array of Aspose.Drawing.Color objects.

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
using(Aspose.Imaging.RasterImage image = (RasterImage)Aspose.Imaging.Image.Load("source.png"))
{
	Color[] c = image.LoadPixels(image.Bounds);
	Aspose.Drawing.Color[] c1 = new Aspose.Drawing.Color[c.Length];
	for (int i = 0; i < c.Length; i++)
	{
		c1[i] = Aspose.Drawing.Color.FromArgb(c[i].R, c[i].G, c[i].B);
	}
	Aspose.OCR.RecognitionResult recognitionResult = recognitionEngine.RecognizeImage(c1, image.Width, image.Height);
	Console.WriteLine(recognitionResult.RecognitionText);
}

Grayscale Image & Color Image Recognition

To detect images, you may provide them for recognition as a flat array of bytes where they represent the amount of each color per pixel for color images or degree of pixel saturation for grayscale images.

Recognizing grayscale images provided as byte array

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
using(Aspose.Imaging.RasterImage image = (RasterImage)Aspose.Imaging.Image.Load("source.png"))
{
	Color[] c = image.LoadPixels(image.Bounds);
	byte[] arr = new byte[c.Length*3];
	for (int i = 0; i < c.Length; i++)
	{
		arr[i] = (byte)((c[i].R + c[i].G +c[i].B)/3);
	}
	Aspose.OCR.RecognitionResult recognitionResult = recognitionEngine.RecognizeImage(pixels, image.Width, image.Height, Aspose.OCR.PixelType.BYTE);
	Console.WriteLine(recognitionResult.RecognitionText);
}

Recognizing Color Images Provided as Byte Array

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
using(Aspose.Imaging.RasterImage image = (RasterImage)Aspose.Imaging.Image.Load("source.png"))
{
	Color[] c = image.LoadPixels(image.Bounds);
	byte[] arr = new byte[c.Length*3];
	int idx = 0;
	for (int i = 0; i < c.Length*3; i += 3)
	{
		arr[i] = c[idx].R;
		arr[i+1] = c[idx].G;
		arr[i+2] = c[idx].B;
		idx++;
	}
	Aspose.OCR.RecognitionResult recognitionResult = recognitionEngine.RecognizeImage(pixels, image.Width, image.Height, Aspose.OCR.PixelType.RGB);
	Console.WriteLine(recognitionResult.RecognitionText);
}

For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.OCR for .NET 22.8 - Notas de liberação.

 Português