roos
Posts: 5
Joined: Sat Jun 27, 2015 8:29 am

Raspi Zbar speed compared to simple Tablet

Sat Jun 27, 2015 8:52 am

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

aimc
Posts: 31
Joined: Mon Jun 30, 2014 2:58 am

Re: Raspi Zbar speed compared to simple Tablet

Mon Jun 29, 2015 4:39 pm

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.

roos
Posts: 5
Joined: Sat Jun 27, 2015 8:29 am

SOLVED Raspi Zbar speed compared to simple Tablet

Wed Jul 08, 2015 11:05 am

I did a:

v4l2-ctl -vwidth=320,height=240,pixelformat=YUYV

now everything is perfect.

Recognition in less than 1 second.

Return to “Advanced users”