IRONSOFTWAREHOME
Read MICR Cheque
using IronOcr;
using IronSoftware.Drawing;
using System;

// Create a new instance of IronTesseract for performing OCR operations
var ocr = new IronTesseract();

// Set the OCR language to MICR to recognize magnetic ink characters
// Must have MICR (IronOcr.Languages.MICR) installed beforehand
ocr.Language = OcrLanguage.MICR;

// Specify the file path of the input image containing MICR text
using (var input = new OcrInput())
{
    // Specify the MICR of the image to focus on for OCR (coordinates in pixels)
    var contentArea = new Rectangle(x: 124, y: 238, width: 309, height: 13);
    // Load the image with the defined content area
    input.LoadImage("micr.png", contentArea);
    // Run the OCR engine to read the MICR text from the input image
    var result = ocr.Read(input);

    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}
Imports IronOcr
Imports IronSoftware.Drawing
Imports System

' Create a new instance of IronTesseract for performing OCR operations
Dim ocr = New IronTesseract()

' Set the OCR language to MICR to recognize magnetic ink characters
' Must have MICR (IronOcr.Languages.MICR) installed beforehand
ocr.Language = OcrLanguage.MICR

' Specify the file path of the input image containing MICR text
Using input = New OcrInput()
    ' Specify the MICR of the image to focus on for OCR (coordinates in pixels)
    Dim contentArea = New Rectangle(x:=124, y:=238, width:=309, height:=13)
    ' Load the image with the defined content area
    input.LoadImage("micr.png", contentArea)
    ' Run the OCR engine to read the MICR text from the input image
    Dim result = ocr.Read(input)

    ' Output the recognized text to the console
    Console.WriteLine(result.Text)
End Using
NuGet Download
PM > Install-Package IronOcr
Read MICR Cheque

Read MICR Cheque

Cheques are a trusted method for handling significant transactions. With IronOCR, you can reliably process E-13B MICR cheques to automate bank deposits and other financial workflows. The specialized engine is tuned to deliver the highest accuracy for critical information, including routing numbers, account numbers, and check numbers.

The following code example demonstrates how to scan a MICR check in just a few simple steps.

Code Explanation

To read a MICR cheque, we first need to set the OCR.Language to OcrLanguage.MICR to ensure IronOCR recognizes that this reading is specifically for MICR checks. However, please note that the OcrLanguage.MICR package must be installed before use, or an error will be thrown.

Afterward, we define a rectangle as our OCR region to specify IronOCR to look for the MICR portion in the MICR cheque, ensuring the highest accuracy.

Afterward, we call the LoadImage to load your cheque image along with the content area defined in the line above. Finally, we call the Read method to scan the sample cheque image. Then print out the extracted text from the OCR process.

Unlock the Power of MICR Cheque Recognition with Our Comprehensive C# Guide!
View on GitHub

Ready to Get Started?

Nuget Downloads 6,236,385Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required