ZXing.Net doesn't seem to be able scan more complicated PDF417 barcodes
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 12/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- csharp
- Área
- computer-vision, mobile-dev
Línea de trabajo
The report concerns PDF417 decoding through CameraBarcodeReaderView with BarcodeReaderOptions (TryHarder, AutoRotate, Multiple, and Formats set to TwoDimensional), and the reporter says the older Xamarin ZXing build reads the same license. Start by getting a sample image of the California license back and decoding it with the core ZXing.Net PDF417 reader using TryHarder on, outside MAUI, to see whether the failure is in the library or the wrapper. Done means that image decodes through the chosen path, which needs a reproduction the issue does not yet include.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Using ZXing.Net.Maui.Controls v0.4.0, which is based on ZXing.Net library, and the basic ZXing page and configuration, it can detect simple PDF417, but it fails to detect more complex ones, like the one on the back of a California drivers license. It also doesn't keep the torch on either, but flashes once when the page initializes. I've tried the barcode images samples on the internet by searching for "PDF417 images", only the simple ones are read....
I've tried two other packages, both based on ZXing.Net, BarcodeScanning.Native.Maui and Camera.MAUI/Camera.MAUI.ZXing. Neither works either for complex PDF417.
The Xamarin version of ZXing is able to read the CA drivers license barcode, fyi..
I'm using Visual Studio v17.9.2, XCode 15.3 and .net8.
Any insight will be appreciated.
This PDF417 scanning is for an app the County of Santa Cruz, CA is creating for our local law enforcement, so any help will be appreciated!!
Thanks!
Page:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:zxing="clr-namespace:ZXing.Net.Maui.Controls;assembly=ZXing.Net.MAUI.Controls"
x:Class="MyProject.Views.ScanPage"
Title="ScanPage">
<zxing:CameraBarcodeReaderView
x:Name="barcodeView"
IsTorchOn="True"
BarcodesDetected="BarcodesDetected" />
</ContentPage>
Code behind:
public partial class ScanPage : ContentPage
{
public ScanPage()
{
InitializeComponent();
BindingContext = this;
barcodeView.Options = new ZXing.Net.Maui.BarcodeReaderOptions()
{
TryHarder = true,
AutoRotate = true,
Multiple = true,
Formats = BarcodeFormats.TwoDimensional // | ZXing.Net.Maui.BarcodeFormat.QrCode | BarcodeFormat.Pdf417
};
barcodeView.IsTorchOn = true;
}
protected void BarcodesDetected(object sender, BarcodeDetectionEventArgs e)
{
foreach (var barcode in e.Results)
{ // dumps to Debug.WriteLine()...
App.Log($"Barcode: {barcode.Format} -> {barcode.Value}");
}
var first = e.Results?.FirstOrDefault();
if (first != null)
{
Dispatcher.DispatchAsync(async () =>
{
await DisplayAlert("Barcode detected", first.Value, "OK");
});
}
}
}
MauiProgram.cs:
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.UseBarcodeReader()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
})
.ConfigureMauiHandlers(handlers =>
{
handlers.AddHandler(typeof(PillCheckbox), typeof(PillCheckboxRenderer));
});
builder.Services.AddSingleton<IImageInfo, ImageInfo>();
#if DEBUG
builder.Logging.AddDebug();
#endif
var app = builder.Build();
//ServiceProviderHelper.Initialize(app.Services);
return app;
}
}
- Lenguaje dominante
- C#
- Estrellas
- 3.1k
- Forks
- 704
- Merge medio
- 13 d 17 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de micjahn/ZXing.Net
-
crop() overrides document "0 <= top <= Height"; should be top < Height like left < WidthPosiblemente ocupada @hidingmyname la tomó hace 3 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 3/5 Medio día Aptitud para principiantes 22/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 12/100
Todos los issues de micjahn/ZXing.Net
Issues similares
-
bug evaluation required
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
MaterialDesignInXAML/MaterialDesignInXamlToolkit#4118 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
[Format]: .dartAbiertoformats
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
KnifeLemon/Filee#980 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día