Describe the bug
When trying to scan a 6x6 data matrix with BrowserMultiFormatReader(), it's having trouble detecting and decoding it from a phone's camera or a PC's webcam. It works fine with a 4x4 data matrix with the cam and it doesn't have a problem decoding if I just provide the 6x6 data matrix image directly and try to decode it with BrowserMultiFormatReader().decodeFromImage(img) like this example:
import { BrowserMultiFormatReader } from '@zxing/library';
const img = new Image();
img.src = '../DataMatrix.png';
const reader = new BrowserMultiFormatReader();
const result = await reader.decodeFromImage(img);
if (result) {
console.log("result", result.text);
}
It can't detect the barcode using this example:
import { BrowserMultiFormatReader } from '@zxing/library';
const codeReader = new BrowserMultiFormatReader();
codeReader?.decodeFromVideoDevice(undefined, 'video', (result, err) => {
if (result) {
// can't detect and decode
console.log(result.text);
}
// console still logs "NotFoundException" even when I'm seeing this issue solved here: https://github.com/zxing-js/library/pull/381
if (err && !(err instanceof NotFoundException)) {
console.error(err);
}
});
I also tried capturing an image every 0.5 seconds with a different package and decoding it with decodeFromImage() to no avail as well
Describe the bug When trying to scan a 6x6 data matrix with
BrowserMultiFormatReader()
, it's having trouble detecting and decoding it from a phone's camera or a PC's webcam. It works fine with a 4x4 data matrix with the cam and it doesn't have a problem decoding if I just provide the 6x6 data matrix image directly and try to decode it withBrowserMultiFormatReader().decodeFromImage(img)
like this example:It can't detect the barcode using this example:
I also tried capturing an image every 0.5 seconds with a different package and decoding it with
decodeFromImage()
to no avail as wellScreenshots Here is the 6x6 data matrix code that I'm using.