Open markchanosa opened 2 years ago
ML Kit does not currently claim to support Code 93 Extended, only Code 93.
Nevertheless, the decoding is incorrect. The correct behaviour when encountering the implicit (%)
codeword is not to scan when lacking support for extended characters.
So this seems to be both a bug report and a feature request.
nuget inall ZXing.Net.Maui.Controls
var buffer = iImageProxy.GetPlanes()[0].Buffer;
var size = new Size(iImageProxy.Width, iImageProxy.Height);
var pb = new PixelBufferHolder { Data = buffer, Size = size };
LuminanceSource ls = new ByteBufferYUVLuminanceSource(pb.Data, (int)size.Width, (int)size.Height, 0, 0, (int)size.Width, (int)size.Height);
var bitmap = new BinaryBitmap(new HybridBinarizer(ls));
ZXing.Net.Maui.Readers.IBarcodeReader barcodeReader = new ZXingBarcodeReader
{
Options = new BarcodeReaderOptions
{
Formats = ZXing.Net.Maui.BarcodeFormat.Code93,
TryInverted = false,
TryHarder = true,
AutoRotate = false,
Multiple = false
}
};
var barcodes1 = barcodeReader.Decode(pb);
if (barcodes1?.Any() ?? false)
{
foreach (var barcode in barcodes1)
{
System.Diagnostics.Debug.WriteLine($"Barcodes: {barcode.Format} -> {barcode.Value}");
barcodeListerner?.Invoke(new ScannedResult(barcode.Value, barcode.Format.ToString()));
}
}
Describe the bug Special characters are allowed in Code 93 Extended like "", but in mlkit app will not recognize the special character and showing "bO" if this is a "" character. However, in zxing app it can recognize the "_" correctly. Is there any setting it can be used to recognize these special characters?
To Reproduce Example Steps to reproduce the behavior in sample app:
If applicable, please include
code snippet
andsample input(image, video, text, etc)
Expected behavior A clear and concise description of what you expected to happen. Showing correct result '123_456'
SDK Info:
Smartphone:
Development Environment: (For Android issue feel free to skip this section)