I just built zbar 0.10 from sources on Ubuntu 9.10 (python 2.6). All test cases in the included test_zbar.py pass.
The CLI works perfectly: `zbarimg -raw -q myimage` extracts the data from the QR code.
However when I try it from python (import the built module installed in my site-packages dir) then no symbol is found.
What exact config should I feed to the ImageScanner object? I tried `scanner.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 0)`
Is there something else to do?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I just built zbar 0.10 from sources on Ubuntu 9.10 (python 2.6). All test cases in the included test_zbar.py pass.
The CLI works perfectly: `zbarimg -raw -q myimage` extracts the data from the QR code.
However when I try it from python (import the built module installed in my site-packages dir) then no symbol is found.
What exact config should I feed to the ImageScanner object? I tried `scanner.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 0)`
Is there something else to do?
Thanks.
> scanner.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 0)
this would disable the QR decoder. you want the enable set to 1 (or just leave at the default):
scanner.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 1)
if it's still not working, make sure your image data is in the correct format - the ImageScanner only supports 8bpp grayscale (Y800)
Thanks, that was the 1.
I misinterpreted the doc in zbar.h , I'll read more carefully next time.
So to speed scanning up a bit, I can just do a
scanner.set_config(0, zbar.Config.ENABLE, 0)
scanner.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 1)
.
> that was the 1
great! glad you got it working
> So to speed scanning up a bit, I can just do a
yes, this should speed things up some and maximize the reliability (it will not be possible to get bad decodes from unwanted symbologies)