edi9999 / jsqrcode

[deprecated] Lazarsoft's jsqrcode as a node module, object oriented, and with tests
Apache License 2.0
278 stars 63 forks source link

Couldn't find enough finder patterns #32

Open AjayPoshak opened 7 years ago

AjayPoshak commented 7 years ago

It is generating an error saying - "Couldn't find enough error patterns:0 patterns found"

edi9999 commented 7 years ago

Can you send your image that you are trying to decode ?

AjayPoshak commented 7 years ago

static_qr_code_without_logo

adrai commented 7 years ago

Which cam do you use? I have the same issue but only with the in-built macbook cam... any ideas?

0xganz commented 5 years ago

I have the same issue.Is there any solution?

ipchi9012 commented 4 years ago

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)
}

3 4 5 9 10

edi9999 commented 4 years ago

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.

ipchi9012 commented 4 years ago

ok, thanks, I'll give other qr readers a try