jsqrcode
jsqrcode copied to clipboard
Couldn't find enough finder patterns
It is generating an error saying - "Couldn't find enough error patterns:0 patterns found"
Can you send your image that you are trying to decode ?
Which cam do you use? I have the same issue but only with the in-built macbook cam... any ideas?
I have the same issue.Is there any solution?
all these failed due to same issue... about 20% of qrcode images can be parsed successfully I am using node12, code here:
const QRReader = require('qrcode-reader')
const fs = require('fs')
const sharp = require('sharp')
const f = process.argv[2]
run().catch(error => console.error(error.stack))
async function run () {
const img = await sharp('./' + f)
.raw()
.toBuffer({ resolveWithObject: true })
const bitmap = { width: img.info.width, height: img.info.height, data: img.data }
console.log(bitmap.width, bitmap.height)
const qr = new QRReader()
const value = await new Promise((resolve, reject) => {
qr.callback = (err, v) => err != null ? reject(err) : resolve(v)
qr.decode(bitmap)
})
console.log(value)
}
This project is no more maintained. Explanation : Lazarsoft's qrcode reader is not maintained since 2 years, so I decided to fork it one year ago to fix some issues. However, there are many things missing on this project, such as proper test cases. Also, I still haven't had the time to understand how the qrcode processing really works under the hood. On the other side, a new library called : https://github.com/cozmo/jsQR exists for over a year, is maintained and has multiple test cases. I have personally moved to this library instead.
ok, thanks, I'll give other qr readers a try