How to Read QR Codes with Different Scanning Modes

Reading QR codes has become a routine task in 2025 as more products move toward digitization and always-online access. Storing necessary data in compact, read-only imprints is now the standard, and developers need effective ways to extract that information in different environments.

IronQR provides 3 read options for QR codes, each designed for specific use cases.

In this how-to guide, all three methods will be explained with clear examples. If you haven’t checked it out yet, take a look at the previous guide on reading QR codes from images or writing your own QR code.

Understanding QR Code Scanning Modes

IronQR offers three powerful scanning modes through the QrScanMode enumeration:

  • Auto Mode (QrScanMode.Auto): combines both machine learning detection and basic scanning algorithms for maximum accuracy and reliability
  • Only Basic Scan Mode (QrScanMode.OnlyBasicScan): uses conventional image processing techniques for fast, reliable scanning when QR codes are clearly visible
  • Detection Model Mode (QrScanMode.OnlyDetectionModel): Leverages machine learning to detect QR code positions, ideal for extracting coordinate data

Let's explore each scanning method in detail.


Only Basic Scan Mode

Only Basic Scan mode uses traditional image processing algorithms without the use of machine learning. This method is fast and efficient when QR codes are clearly visible and well-positioned; however, it still works on damaged QRs if the three corner squares are readable.

:path=/static-assets/qr/content-code-examples/how-to/read-qr-codes-with-scan-modes-basic.cs
using System.Linq;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;
using System.IO;

 // Load the image
var bmp = AnyBitmap.FromFile("damaged-qr.png");

// Create scan input using Only Basic Scan mode
var input = new QrImageInput(bmp, QrScanMode.OnlyBasicScan);

// Get the result
var result = new QrReader().Read(input).FirstOrDefault();

// Save the output to a text file
File.WriteAllText("basic-scan-output.txt", result.Value);
$vbLabelText   $csharpLabel

Scan input

Damaged QR code

Saved text file

Text File

Auto Scan Mode

Auto Scan mode is the default (for QrScanMode) and the most versatile option available. It automatically combines machine learning detection with traditional scanning algorithms to deliver the best possible results across a range of image conditions.

The example shows an image being loaded and activating the Auto mode. It then scans the image and collects every QR code it finds into a list. Finally, it goes through the results collection and prints the text of each value within to the console (In this case, just the URL).

:path=/static-assets/qr/content-code-examples/how-to/read-qr-codes-with-scan-modes-auto.cs
using System;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;

// Load the image file
var bmp = AnyBitmap.FromFile("cup.png");

// Create scan input using Auto Scan mode
var input = new QrImageInput(bmp, QrScanMode.Auto);

// Scan and read all QR codes
var results = new QrReader().Read(input);

// Initialize a counter to track the number of QR codes
int count = 1;

// Loop through each discovered QR code
foreach (var result in results)
{
    Console.WriteLine($"QR {count}: {result.Value}");
    count++;
}
$vbLabelText   $csharpLabel

Scan input

Cup with a link to the Cafe website

Console display

The URL of the cafe website gets logged after scanning the photo via IronQR.

Console display of Website URl

Detection Model Mode

The Detection Model mode uses machine learning specifically for detecting QR code positions within images. This quality makes it invaluable for spatial analysis and computer vision applications. The coordinate system that it uses has the origin at (0, 0).

Generally, QR scanners make use of standard decoding algorithms which relies on three finder patterns, this model captures all four vertices of the ID. The result object contains a Points collection that you iterate through to retrieve the position data.

The code reuses the cup photo from the previous example to demonstrate the detection of positional values within the image.

Please noteThe coordinates that are returned by this function are stored in a strict "zig-zag" sequence: top-left, top-right, bottom-left, and finally, bottom-right

:path=/static-assets/qr/content-code-examples/how-to/read-qr-codes-with-scan-modes-detection-model.cs
using System;
using System.Linq;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;

// Load the image
var bmp = AnyBitmap.FromFile("cup.png");

// Create scan input using Detection Model mode
var input = new QrImageInput(bmp, QrScanMode.OnlyDetectionModel);

// Read QR code
var result = new QrReader().Read(input).FirstOrDefault();

// Print position data
if (result != null)
{
    if (result.Points != null)
    {
        foreach (var point in result.Points)
        {
            Console.WriteLine($"Point: X={point.X}, Y={point.Y}");
        }
    }
}
$vbLabelText   $csharpLabel

Labelled cup image

Labelled Cup

Labelled console

Labelled Console

Comparison of Scanning Methods

Feature (QRScanMode)Basic Scan (OnlyBasicScan)Auto Scan (Auto)Detection Model (OnlyDetectionModel)
OutputDecoded Text (Value)Decoded Text (Value)Coordinates (Points)
AlgorithmTraditional OnlyHybrid (ML + Traditional)Machine Learning Only
FocusSpeedReadability / RetrievalLocalization / Computer Vision

Conclusion

IronQR's three scanning modes provide flexibility for any QR code reading scenario:

  • Auto Scan: Maximum accuracy and reliability for general use
  • Basic Scan: Speed and efficiency for high-quality images
  • Detection Model: Position awareness for spatial applications

By understanding the strengths of each method, you can optimize your QR code reading implementation for your specific requirements. Whether you need comprehensive data extraction, lightning-fast processing, or precise position detection, IronQR has you covered.

For more examples and detailed API information, visit the IronQR documentation or explore the code examples on GitHub.

Ahmad Sohail
Full Stack Developer

Ahmad is a full-stack developer with a strong foundation in C#, Python, and web technologies. He has a deep interest in building scalable software solutions and enjoys exploring how design and functionality meet in real-world applications.

Before joining the Iron Software team, Ahmad worked on automation projects ...

Read More
Ready to Get Started?
Nuget Downloads 54,926 | Version: 2025.12 just released