Got Zbar (Python) working on A Raspi 2 for decoding QR-codes. Works OK-ish with a simple € 12,= webcam as with the C920.
I also have a very...very simple € 49,= Android Tablet (TM704: 1 GHz Dual-Core , 0.3 MP camera).
Zbar on the Raspi 2 is more than 5 times as slow in recognising the QR codes: approx 2.5-3 seconds for the PI vs. 0.5 sec. for the tablet. There is a 2 second 'lag' in processing the images from either webcam although the CPU never gets near 100%.
Is there something I can do to speed up the PI in processing the webcam images and reduce this 'lag'? I already tried things like GPU_mem=512 and force_turbo=1 but to no avail.
Is forcing the simple webcam to downscale and use 320x240 an idea? Less computing time maybe ?
Thanks
Re: Raspi Zbar speed compared to simple Tablet
Hi
Don't know about Zbar, but definitely lowing the resolution will speed up the process, as the image is now smaller and there are less "elements to iterate". I had a similar behaviour ( high speed with lower res ) on another project that uses pygame , so you should give it a try.
greetings.
Don't know about Zbar, but definitely lowing the resolution will speed up the process, as the image is now smaller and there are less "elements to iterate". I had a similar behaviour ( high speed with lower res ) on another project that uses pygame , so you should give it a try.
greetings.
SOLVED Raspi Zbar speed compared to simple Tablet
I did a:
v4l2-ctl -vwidth=320,height=240,pixelformat=YUYV
now everything is perfect.
Recognition in less than 1 second.
v4l2-ctl -vwidth=320,height=240,pixelformat=YUYV
now everything is perfect.
Recognition in less than 1 second.