using IronQr;
using IronSoftware.Drawing;
using System;
using System.Collections.Generic;
// Open the asset to read a QR Code from
var inputBmp = AnyBitmap.FromFile("IMAGE_TO_READ.png");
// Load the asset into QrImageInput
QrImageInput imageInput = new QrImageInput(inputBmp);
// Create a QR Reader object
QrReader reader = new QrReader();
// Read the Input an get all embedded QR Codes
IEnumerable<QrResult> results = reader.Read(imageInput);
// Use and Store the information as required
foreach (QrResult result in results)
{
// String value of the QR Code
Console.WriteLine(result.Value);
// URI value of the QR Code
Console.WriteLine(result.Url);
// Coordinates of the QR Code
foreach (IronSoftware.Drawing.PointF point in result.Points)
{
Console.WriteLine($"{point.X}, {point.Y}");
}
}
Imports IronQr
Imports IronSoftware.Drawing
Imports System
Imports System.Collections.Generic
' Open the asset to read a QR Code from
Private inputBmp = AnyBitmap.FromFile("IMAGE_TO_READ.png")
' Load the asset into QrImageInput
Private imageInput As New QrImageInput(inputBmp)
' Create a QR Reader object
Private reader As New QrReader()
' Read the Input an get all embedded QR Codes
Private results As IEnumerable(Of QrResult) = reader.Read(imageInput)
' Use and Store the information as required
For Each result As QrResult In results
' String value of the QR Code
Console.WriteLine(result.Value)
' URI value of the QR Code
Console.WriteLine(result.Url)
' Coordinates of the QR Code
For Each point As IronSoftware.Drawing.PointF In result.Points
Console.WriteLine($"{point.X}, {point.Y}")
Next point
Next result
Install-Package IronQR
閱讀進階 QR 碼
我們透過整合最先進的機器學習 (ML) 模型,展現了對提供頂尖 QR 碼讀取體驗的承諾。 透過運用尖端的機器學習技術,我們將 QR 碼讀取功能提升至全新境界。 我們的先進機器學習模型能讓您的應用程式以無與倫比的準確度和效率解碼 QR 碼,即使在艱鉅的場景下亦然。 無論您是從圖片、影片或即時鏡頭畫面中讀取 QR 碼,我們這套由機器學習驅動的解決方案都能確保您迅速且可靠地取得所需資訊。 這項創新不僅簡化了資料擷取流程,更能提升安全性,因為它能夠區分合法的 QR 碼與潛在威脅。 透過我們的機器學習模型,您可以確信您的 QR 碼讀取功能處於技術前沿,為您的使用者提供流暢且可靠的體驗。