Malayalam OCR in C# and .NET

126 More Languages

IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Malayalam. It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines in both speed and accuracy.

Contents of IronOcr.Languages.Malayalam

This package contains 126 OCR languages for .NET:

  • Malayalam
  • MalayalamBest
  • MalayalamFast
  • MalayalamAlphabet
  • MalayalamAlphabetBest
  • MalayalamAlphabetFast

Download

Malayalam Language Pack [മലയാളം]

Installation

The first thing we have to do is install the Malayalam OCR package into your .NET project.

Install-Package IronOCR.Languages.Malayalam

Code Example

This C# code example reads Malayalam text from an Image or PDF document.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the language to Malayalam
        Ocr.Language = OcrLanguage.Malayalam;

        // Process the image to extract text using OCR
        using (var Input = new OcrInput(@"images\Malayalam.png"))
        {
            // Read the text from the input object
            var Result = Ocr.Read(Input);

            // Extract and store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the language to Malayalam
        Ocr.Language = OcrLanguage.Malayalam;

        // Process the image to extract text using OCR
        using (var Input = new OcrInput(@"images\Malayalam.png"))
        {
            // Read the text from the input object
            var Result = Ocr.Read(Input);

            // Extract and store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create a new instance of IronTesseract
		Dim Ocr = New IronTesseract()

		' Set the language to Malayalam
		Ocr.Language = OcrLanguage.Malayalam

		' Process the image to extract text using OCR
		Using Input = New OcrInput("images\Malayalam.png")
			' Read the text from the input object
			Dim Result = Ocr.Read(Input)

			' Extract and store the recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • The code demonstrates setting up IronOCR to perform OCR on a specified image with the Malayalam language.
  • The OcrInput object is used to input the image file.
  • The Ocr.Read function processes the image and extracts the text.
  • The extracted text is stored in AllText and printed to the console.