Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a raspberry pi compute module and my question is : Can we use the GPU to decode QRCODE ?

I am using my own function inspired by the one from QRTOOLS and by doing so the timing is divided by 3 or 4.

But it took me approximately 700ms and it is way too long..

I already tried a lot of things, like zxing etc.. But zbar is the best for me.

Why I want to use the GPU? Because I'm not using it since I use SSH and I need the CPU for a lot of things.

Thank you !

share|improve this question
up vote 4 down vote accepted

In theory, you could use the OpenGL API to speed things up a bit. There's no implementation of OpenCL for now. You could design your code such that its calculations are a fragment shader according to this answer.

You should also take a look at this link.

But before you do any GPU magic, take note that this will impose some overhead on the CPU. Only do this when you're planning on doing simple, long running computations on the GPU (protein folding, image processing, etc.) so the CPU vs GPU load ratio is something significant. Doing things back and forth quickly places load on the CPU and GPU making your optimizations worthless.

In my opinion, 700ms is already fast and using the GPU to lower that time by a few milliseconds isn't worth it.

My Samsung phone with an Exynos 7420 Octa-core 2.1GHz processor with 3GB of RAM decodes QR codes in about 500ms using the ZXing barcode reader app. Think about that first.

share|improve this answer
    
Thanks for your response ! – Tagadac Mar 11 at 10:46
    
@Tagadac No problem :) – PandaLion98 Mar 11 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.