0

I'm using a Raspberry Pi B+ board for color processing in real time and the current processing speed is extremely slow. While I don't need to show the processed image to a display, the speed of processing is too slow for my liking. I found a tutorial (http://www.pyimagesearch.com/2015/12/21/increasing-webcam-fps-with-python-and-opencv/) that allows me to increase the fps of the webcam using threading.

Will this in any way help me in increasing processing speed of the RPi?

2

Admittedly the CPU on the RPI B+ isnt the greatest (single core, 700MHz w/o overclocking), but there is a chance there might be other issues slowing down your processing pipeline

Have you done any profiling to identify the bottlenecks in your script(s) ?

In my experience, One of the slowest operations is I/O to disk (microsd card or USB storage). If your pipeline involves one or more disk IO there is a good chance that is pulling down your overall fps throughput.

The simplest way (without resorting to external tools) to identify such problems is to simply comment out or bypass some sections of your scripts and looking at the fps. If no improvement in fps, then restore it and move on to another section.

if you are open to using additional or external tools, here are some links I think you might find useful

While multithreading can improve responsiveness it doesnt really improve throughput for CPU intensive applications on single core devices if you find the CPU is indeed your bottleneck your options are somewhat limited

  • Overclocking
  • use a RPi2/RPI3 (quad core @ 900/1200 MHz)

Here are some interesting writeups on the pros/cons of multithreading targeting different types of applications and scenarios (I/O bound, CPU bound, UI interaction etc)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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