0

I have 4 raspberry pis and one picamera. I wish to distribute my OpenCV task among the 4 pis. I haven't been able to find any good resources for how I could this efficiently anywhere. An approach I had in mind was to pipeline the architecture, but implementing the handshakes that would be involved would be quite hectic and I was wondering if there was any library which could help with distributed computing. And if possible, can I also include some other processing devices such as a laptop or an Android device.

  • 1
    Google MPI for one possible library, although it's not tailored to your application. This is not really Pi-specific since it's just a question of parallel processing that could occur on any system. Other sites probably more appropriate. – Brick Apr 22 at 12:36
  • @Brick I did try MPI, it's just that, I incurred a huge network delay which ended up making the simple test of turning an image grey by averaging the RGB values slower when using 4 pis instead of 1. – Prateek Dhanuka Apr 22 at 15:57
  • 1
    Making parallel code like this is partly about how to move the data but often much more about which data to move and when. That's way beyond what we can help you with here. It's still not a Pi-specific question. It's a general software design question. – Brick Apr 22 at 17:00
  • Welcome to Raspberry Pi :-) But your question doesn't belong to it. Please note that we are not a discussion style forum and open ended invitations to brainstorm are not appropriate to the format. Please take the short Tour and visit the Help Center to get an idea how things work here. – Ingo Apr 22 at 18:05
  • if task X takes 100ms to do with one computer, if you can split it cleanly(many tasks cannot be split clean and you may end up with something like 40% of the job done by each -ie 120% of the work needs to be done now). But if it takes 50ms for you to send the needed data to each of the 4 pi's you can see it is not helpful to try and split up the work. Especially if your openCV project is trying to process real time data this will not end up working well. Now if you you have 10,000 pictures to process, and each can process 2500 pictures, you will see a big improvement then. – Chad G Apr 22 at 22:01

Your Answer

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

Browse other questions tagged or ask your own question.