Saltar al pie de página

Código VB.NET para Comenzar

C# + VB.NET: AutoOCR AutoOCR
using IronOcr;

string imageText = new IronTesseract().Read(@"images\image.png").Text;
Imports IronOcr

Private imageText As String = (New IronTesseract()).Read("images\image.png").Text
Install-Package IronOcr

IronOCR is unique in its ability to automatically detect and read text from imperfectly scanned images and PDF documents. The IronTesseract class provides the simplest API.

Try other code samples to gain fine-grained control of your C# OCR operations.

IronOCR provides the most advanced build of Tesseract known anywhere, on any platform, with increased speed, accuracy, and a native DLL and API.

Supports Tesseract 3, Tesseract 4, and Tesseract 5 for .NET Framework, Standard, Core, Xamarin, and Mono.

Explore the IronTesseract C# OCR How-To Guide

C# + VB.NET: Idiomas intl. Idiomas intl.
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

ocrTesseract.Language = OcrLanguage.Arabic;

using (var ocrInput = new OcrInput())
{
    ocrInput.LoadImage(@"images\arabic.gif");
    var ocrResult = ocrTesseract.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}

// Example with a Custom Trained Font Being used:

var ocrTesseractCustomerLang = new IronTesseract();
ocrTesseractCustomerLang.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
ocrTesseractCustomerLang.AddSecondaryLanguage(OcrLanguage.EnglishBest);

using (var ocrInput = new OcrInput())
{
    ocrInput.LoadPdf(@"images\mixed-lang.pdf");
    var ocrResult = ocrTesseractCustomerLang.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}
Imports IronOcr
Imports System

Private ocrTesseract = New IronTesseract()

ocrTesseract.Language = OcrLanguage.Arabic

Using ocrInput As New OcrInput()
	ocrInput.LoadImage("images\arabic.gif")
	Dim ocrResult = ocrTesseract.Read(ocrInput)
	Console.WriteLine(ocrResult.Text)
End Using

' Example with a Custom Trained Font Being used:

Dim ocrTesseractCustomerLang = New IronTesseract()
ocrTesseractCustomerLang.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")
ocrTesseractCustomerLang.AddSecondaryLanguage(OcrLanguage.EnglishBest)

Using ocrInput As New OcrInput()
	ocrInput.LoadPdf("images\mixed-lang.pdf")
	Dim ocrResult = ocrTesseractCustomerLang.Read(ocrInput)
	Console.WriteLine(ocrResult.Text)
End Using
Install-Package IronOcr

IronOCR Language Support

IronOCR supports 125 international languages. Other than English, which is installed by default, additional language packs can be added to your .NET project via NuGet or downloaded from our Languages Page.

Most languages are available in Fast, Standard (recommended), and Best quality. The Best quality option may offer more accurate results, but will also be slower in processing time.

Explore OCR in Multiple Languages with IronOCR.

C# + VB.NET: Objetos de resultados Objetos de resultados
using IronOcr;
using IronSoftware.Drawing;

// We can delve deep into OCR results as an object model of
// Pages, Barcodes, Paragraphs, Lines, Words and Characters
// This allows us to explore, export and draw OCR content using other APIs/
var ocrTesseract = new IronTesseract();

ocrTesseract.Configuration.ReadBarCodes = true;

using var ocrInput = new OcrInput();
var pages = new int[] { 1, 2 };
ocrInput.LoadImageFrames("example.tiff", pages);

OcrResult ocrResult = ocrTesseract.Read(ocrInput);
foreach (var page in ocrResult.Pages)
{
    // Page object
    int PageNumber = page.PageNumber;
    string PageText = page.Text;
    int PageWordCount = page.WordCount;
    // null if we dont set Ocr.Configuration.ReadBarCodes = true;
    OcrResult.Barcode[] Barcodes = page.Barcodes;
    AnyBitmap PageImage = page.ToBitmap(ocrInput);
    double PageWidth = page.Width;
    double PageHeight = page.Height;
    double PageRotation = page.Rotation; // angular correction in degrees from OcrInput.Deskew()

    foreach (var paragraph in page.Paragraphs)
    {
        // Pages -> Paragraphs
        int ParagraphNumber = paragraph.ParagraphNumber;
        string ParagraphText = paragraph.Text;
        AnyBitmap ParagraphImage = paragraph.ToBitmap(ocrInput);
        int ParagraphX_location = paragraph.X;
        int ParagraphY_location = paragraph.Y;
        int ParagraphWidth = paragraph.Width;
        int ParagraphHeight = paragraph.Height;
        double ParagraphOcrAccuracy = paragraph.Confidence;
        OcrResult.TextFlow paragrapthText_direction = paragraph.TextDirection;
        foreach (var line in paragraph.Lines)
        {
            // Pages -> Paragraphs -> Lines
            int LineNumber = line.LineNumber;
            string LineText = line.Text;
            AnyBitmap LineImage = line.ToBitmap(ocrInput);
            int LineX_location = line.X;
            int LineY_location = line.Y;
            int LineWidth = line.Width;
            int LineHeight = line.Height;
            double LineOcrAccuracy = line.Confidence;
            double LineSkew = line.BaselineAngle;
            double LineOffset = line.BaselineOffset;
            foreach (var word in line.Words)
            {
                // Pages -> Paragraphs -> Lines -> Words
                int WordNumber = word.WordNumber;
                string WordText = word.Text;
                AnyBitmap WordImage = word.ToBitmap(ocrInput);
                int WordX_location = word.X;
                int WordY_location = word.Y;
                int WordWidth = word.Width;
                int WordHeight = word.Height;
                double WordOcrAccuracy = word.Confidence;
                foreach (var character in word.Characters)
                {
                    // Pages -> Paragraphs -> Lines -> Words -> Characters
                    int CharacterNumber = character.CharacterNumber;
                    string CharacterText = character.Text;
                    AnyBitmap CharacterImage = character.ToBitmap(ocrInput);
                    int CharacterX_location = character.X;
                    int CharacterY_location = character.Y;
                    int CharacterWidth = character.Width;
                    int CharacterHeight = character.Height;
                    double CharacterOcrAccuracy = character.Confidence;
                    // Output alternative symbols choices and their probability.
                    // Very useful for spellchecking
                    OcrResult.Choice[] Choices = character.Choices;
                }
            }
        }
    }
}
Imports IronOcr
Imports IronSoftware.Drawing

' We can delve deep into OCR results as an object model of
' Pages, Barcodes, Paragraphs, Lines, Words and Characters
' This allows us to explore, export and draw OCR content using other APIs/
Private ocrTesseract = New IronTesseract()

ocrTesseract.Configuration.ReadBarCodes = True

Dim ocrInput As New OcrInput()
Dim pages = New Integer() { 1, 2 }
ocrInput.LoadImageFrames("example.tiff", pages)

Dim ocrResult As OcrResult = ocrTesseract.Read(ocrInput)
For Each page In ocrResult.Pages
	' Page object
	Dim PageNumber As Integer = page.PageNumber
	Dim PageText As String = page.Text
	Dim PageWordCount As Integer = page.WordCount
	' null if we dont set Ocr.Configuration.ReadBarCodes = true;
	Dim Barcodes() As OcrResult.Barcode = page.Barcodes
	Dim PageImage As AnyBitmap = page.ToBitmap(ocrInput)
	Dim PageWidth As Double = page.Width
	Dim PageHeight As Double = page.Height
	Dim PageRotation As Double = page.Rotation ' angular correction in degrees from OcrInput.Deskew()

	For Each paragraph In page.Paragraphs
		' Pages -> Paragraphs
		Dim ParagraphNumber As Integer = paragraph.ParagraphNumber
		Dim ParagraphText As String = paragraph.Text
		Dim ParagraphImage As AnyBitmap = paragraph.ToBitmap(ocrInput)
		Dim ParagraphX_location As Integer = paragraph.X
		Dim ParagraphY_location As Integer = paragraph.Y
		Dim ParagraphWidth As Integer = paragraph.Width
		Dim ParagraphHeight As Integer = paragraph.Height
		Dim ParagraphOcrAccuracy As Double = paragraph.Confidence
		Dim paragrapthText_direction As OcrResult.TextFlow = paragraph.TextDirection
		For Each line In paragraph.Lines
			' Pages -> Paragraphs -> Lines
			Dim LineNumber As Integer = line.LineNumber
			Dim LineText As String = line.Text
			Dim LineImage As AnyBitmap = line.ToBitmap(ocrInput)
			Dim LineX_location As Integer = line.X
			Dim LineY_location As Integer = line.Y
			Dim LineWidth As Integer = line.Width
			Dim LineHeight As Integer = line.Height
			Dim LineOcrAccuracy As Double = line.Confidence
			Dim LineSkew As Double = line.BaselineAngle
			Dim LineOffset As Double = line.BaselineOffset
			For Each word In line.Words
				' Pages -> Paragraphs -> Lines -> Words
				Dim WordNumber As Integer = word.WordNumber
				Dim WordText As String = word.Text
				Dim WordImage As AnyBitmap = word.ToBitmap(ocrInput)
				Dim WordX_location As Integer = word.X
				Dim WordY_location As Integer = word.Y
				Dim WordWidth As Integer = word.Width
				Dim WordHeight As Integer = word.Height
				Dim WordOcrAccuracy As Double = word.Confidence
				For Each character In word.Characters
					' Pages -> Paragraphs -> Lines -> Words -> Characters
					Dim CharacterNumber As Integer = character.CharacterNumber
					Dim CharacterText As String = character.Text
					Dim CharacterImage As AnyBitmap = character.ToBitmap(ocrInput)
					Dim CharacterX_location As Integer = character.X
					Dim CharacterY_location As Integer = character.Y
					Dim CharacterWidth As Integer = character.Width
					Dim CharacterHeight As Integer = character.Height
					Dim CharacterOcrAccuracy As Double = character.Confidence
					' Output alternative symbols choices and their probability.
					' Very useful for spellchecking
					Dim Choices() As OcrResult.Choice = character.Choices
				Next character
			Next word
		Next line
	Next paragraph
Next page
Install-Package IronOcr

IronOCR returns an advanced result object for each page it scans using Tesseract 5. This contains location data, images, text, statistical confidence, alternative symbol choices, font-names, font-sizes decoration, font weights, and position for each:

  • Page
  • Paragraph
  • Line of Text
  • Word
  • Individual Character
  • Barcode

Explore How to Read OCR Results with IronOCR

Human Support related to OCR en VB.NET

Apoyo de Nuestro Equipo

Para consultas de producto o licencias, el equipo Iron está listo para apoyarte. Envíanos tus preguntas y nos aseguraremos de que la persona correcta en Iron te las responda.

Contactar
Image To Text related to OCR en VB.NET

Imágenes OCR a Texto en Aplicaciones VB.NET

Una o múltiples páginas pueden ser enviadas a IronOCR. Recibirás todo el contenido de texto, códigos de barras y QR como resultado. Agrega funcionalidad OCR a aplicaciones de Consola, Web o Escritorio .NET. Las imágenes pueden ser enviadas como PDF, JPG, PNG, GIF, BMP y TIFF.

Hecho para VB.NET, .NET, C#

Ver un Tutorial
Fast And Polite Behavior related to OCR en VB.NET

OCR con Resultados Rápidos y Precisos

El software de Reconocimiento Óptico de Caracteres ve contenido en múltiples estilos de fuentes para un OCR de texto preciso. Usa regiones de lectura rectangulares para mejorar la velocidad y la precisión. El multi-núcleo y el multi-hilo mejoran las velocidades de lectura de OCR.

Documentación de Referencia de API
Advanced Image related to OCR en VB.NET

Procesamiento de Imagen para Reconocimiento de Escaneo Imperfecto

Lo que realmente hace especial a IronOCR es su capacidad para leer documentos mal escaneados. Su biblioteca de preprocesamiento única reduce el ruido de fondo, la rotación, la distorsión y la alineación desalineada, así como la simplificación de colores y el aumento de la resolución y el contraste. Las configuraciones AutoOCR y Advanced OCR de Iron proporcionan a los desarrolladores las herramientas para lograr los mejores resultados posibles, cada vez.

Aprender Más
Support For Languages related to OCR en VB.NET

OCR Multilingüe

Paquetes de idiomas disponibles para: Árabe, Chino Simplificado, Chino Tradicional, Danés, Inglés, Finés, Francés, Alemán, Hebreo, Italiano, Japonés, Coreano, Portugués, Ruso, Español y Sueco. Otros idiomas pueden ser soportados a pedido.

Aprender Más
Output Content related to OCR en VB.NET

Datos Exportados Directamente a Tu Aplicación VB.NET

IronOCR exporta contenido como texto simple y datos de códigos de barras. Un modelo de objeto de datos estructurados alternativo permite a los desarrolladores recibir todo el contenido en el formato de encabezados, párrafos, líneas, palabras y caracteres estructurados para la entrada directa en aplicaciones .NET.

Aprender Más
Soporta:
  • El marco .NET 4.0 y superior admite C#, VB, F#
  • Microsoft Visual Studio. Icono IDE de desarrollo .NET
  • Soporte de Instalador NuGet para Visual Studio
  • Compatible con asistente de lenguaje C# JetBrains ReSharper
  • Compatible con la plataforma de alojamiento Microsoft Azure C# .NET

Licenciamiento y Precios

Licencias de desarrollo comunitario gratuitas. Licencias comerciales desde $749.

Licencias de Biblioteca para Proyecto C# + VB.NET

Proyecto

Licencia de Biblioteca C# + VB.NET para Desarrolladores

Desarrollador

Licenciamiento de Biblioteca C# + VB.NET para Organizaciones

Organización

Licenciamiento de Biblioteca C# + VB.NET para Agencias

Agencia

Licenciamiento de Biblioteca C# + VB.NET para SaaS

SaaS

Licenciamiento de Biblioteca C# + VB.NET para OEM

OEM

Ver Opciones Completas de Licencia  

Tutoriales de Reconocimiento Óptico de Caracteres VB.NET

Tutorial de Tesseract para C# | IronOCR

C# Tesseract OCR

Jim Baker es un ingeniero de desarrollo en Iron desarrollando para el producto OCR

Comparación de IronOCR y Tesseract para .NET

Jim ha sido una figura líder en el desarrollo de IronOCR. Jim diseña y construye algoritmos de procesamiento de imágenes y métodos de lectura para OCR.

Ver la Comparación de Jim de Tesseract
Cómo Leer Texto de una Imagen en .NET | Tutorial

C# OCR ASP.NET

Gemma Beckford - Ingeniera de Soluciones de Microsoft

Cómo Leer Texto de una Imagen en C# .NET

Aprenda cómo el equipo de Gemma usa IronOCR para leer texto de imágenes para su software de archivo. Gemma comparte sus propios ejemplos de código.

Ver el Tutorial de Imagen a Texto de Gemma
Los Programadores VB usan IronOcr para...

Sistemas de Contabilidad y Finanzas

  • # Recibos
  • # Informes
  • # Impresión de Facturas
Agregar Soporte de PDF a Sistemas de Contabilidad y Finanzas ASP.NET

Digitalización de Negocios

  • # Documentación
  • # Pedidos y Etiquetado
  • # Reemplazo de Papel
Casos de Uso de Digitalización de Negocios C#

Gestión de Contenidos Empresariales

  • # Producción de Contenidos
  • # Gestión de Documentos
  • # Distribución de Contenidos
Soporte de PDF CMS .NET

Aplicaciones de Datos e Informes

  • # Seguimiento del Rendimiento
  • # Mapeo de Tendencias
  • # Informes
Informes PDF en C#
Clientes Iron .NET

Miles de corporaciones, gobiernos, PYMEs y desarrolladores confían en los productos de Iron software.

El equipo de Iron tiene más de 10 años de experiencia en el mercado de componentes de software .NET.

Nexudus
ANZ
Vireq
Medcode
Foley
Marval
Equinor
GE