User avatar
waveform80
Posts: 305
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK

Compound Pi

Fri May 23, 2014 11:37 pm

Hi everyone,

Your friendly picamera author popping up again with an announcement of a project I've been spending some time on recently, which has just reached version 0.3 and might be vaguely useful at this point: Compound Pi.

The purpose of the project is to allow control of multiple Pi camera modules (attached to multiple Pis) from a single client. At the moment the main goal is simultaneous capture from numerous cameras (20+) but in the future I might look into things like staggered capture and so on.

The application consists of a server (daemon) which runs on the Pi (or rather Pis - as many as you can lay your hands on with camera modules), and a client (console and GUI) which runs on Ubuntu (and probably other platforms but I haven't tested any yet). The client controls the servers telling them to configure their resolution, framerate, and what-not, take pictures, and send those pictures to the client. The networking is mostly done with UDP, with broadcasts being utilized for mass control.

The docs (including installation and quickstart instructions) are available at http://compoundpi.readthedocs.org/ and you can also find links from there to the code, bug tracker, and so on. Feedback is welcome, but bear in mind it's a project in its infancy so there's quite a few rough edges (at the moment it's only been tested with 4 Pis, but next week I'm hoping to test it with the full 20+). Also, I've only just released 0.3, so it'll be a few days before the packages hit the Raspbian repos (but the truly eager can find it on PyPI now!).


Dave.

t-roush
Posts: 1
Joined: Wed Sep 10, 2014 11:14 pm

Re: Compound Pi

Wed Sep 10, 2014 11:19 pm

Wow. I have trying to get this same thing going, with progress measured in baby steps. Thanks for your work, it has been a huge help.

User avatar
waveform80
Posts: 305
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK

Re: Compound Pi

Fri Mar 20, 2015 6:25 pm

t-roush wrote:Wow. I have trying to get this same thing going, with progress measured in baby steps. Thanks for your work, it has been a huge help.
No prob - do feel free to open tickets on the compoundpi issue tracker if you run into problems!

Dave.

User avatar
jbeale
Posts: 3499
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Compound Pi

Fri Mar 20, 2015 6:35 pm

Very neat stuff! Have you tried any measurements to see how closely matched the timing is, when triggering with a broadcast packet?

User avatar
waveform80
Posts: 305
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK

Re: Compound Pi

Fri Mar 20, 2015 6:45 pm

jbeale wrote:Very neat stuff! Have you tried any measurements to see how closely matched the timing is, when triggering with a broadcast packet?
The short answer is: up to a frame's worth of difference plus whatever latency the network introduces (i.e. if your cameras are running at 30fps, and your network introduces 5ms of latency then the greatest difference in capture time between any two cameras should be no more than 33.333ms + 5ms) assuming you're capturing from the video port and every node receives the broadcast perfectly. If you're capturing from the still port, the mode switch introduces more variability so I'm not sure about that case.

The long answer is here.

I should add I have no experimental evidence of this - the above is based on reasoning alone. If someone wants to actually measure this stuff empirically I'd be most interested in the results!

Dave.

User avatar
jbeale
Posts: 3499
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Compound Pi

Sun Mar 22, 2015 6:14 am

On my LAN the ping time is always < 1 msec so if that really is the only other delay (not some internal processing of the network packet) then by far the dominant factor would be the camera frame rate. In that case, the only way to decrease the difference in capture time would be to have all the camera clocks running in sync, plus the frame-start time in sync, which is as far as I know is not feasible (except possibly with two cameras on the same R-Pi compute module). Anyway I was just curious, I don't actually have an application needing synchronized cameras at the moment!

zenmsav
Posts: 4
Joined: Mon Jul 13, 2015 7:42 pm

Re: Compound Pi

Fri Jul 17, 2015 7:44 am

I've been having massive problems with the configuration. It seems like I've followed the documentation but the client still isn't finding the Pi's. I have check that indeed on both sides compoundpi is available in the module lists. Additionally, no sign of the led on the camera upon boot. Using Ubuntu 14.04, (should note i'm a very new user and could be over looking something in plain sight)

SamC-E
Posts: 2
Joined: Mon Mar 16, 2015 9:54 pm

Re: Compound Pi

Mon Aug 03, 2015 12:33 pm

Hi Dave, I have been playing around with this for 4 months now and feel I know it pretty well but one thing I have not been able to get to work yet are various client commands such as brightness, contrast etc, I am just given syntax error as a response. I have followed your guide on the readthedocs and also tried different ways on writing the command but to no avail. Could you guide me into the right direction with using these client commands please?

Many Thanks

User avatar
waveform80
Posts: 305
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK

Re: Compound Pi

Mon Aug 03, 2015 4:02 pm

SamC-E wrote:Hi Dave, I have been playing around with this for 4 months now and feel I know it pretty well but one thing I have not been able to get to work yet are various client commands such as brightness, contrast etc, I am just given syntax error as a response. I have followed your guide on the readthedocs and also tried different ways on writing the command but to no avail. Could you guide me into the right direction with using these client commands please?

Many Thanks
Hi,

Do feel free to open a bug report on github for any issues you're having - but it would be useful to have a paste of the actual syntax error you're seeing (along with things like the version that you're using and how it was installed). I'm currently trying to get 0.4 polished off and released but things are going rather slowly as I'm terribly busy with family and other commitments so it's probably not going to be done this week (I was really hoping to get the last couple of tickets done this last weekend, but things got in the way again).

I should also take this opportunity to apologise to the growing list of people who've e-mailed and who I haven't responded to yet - sorry! Just too swamped at the moment, but I will get back to you all when I'm able!


Dave.

User avatar
waveform80
Posts: 305
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK

Re: Compound Pi

Mon Aug 24, 2015 7:02 pm

Finally! Over a year since 0.3 was released, now 0.4 has been released. Plenty of new stuff in here most of which is in the changelog as usual (http://compoundpi.readthedocs.org/en/re ... gelog.html) but just to go through it more fully:

I've included lots more features from picamera so you can now control things like white balance across all the cameras in the array, and there's a command to "just copy all settings from this camera to all the others". Bear in mind that gains can't be specifically set on the pi's camera (just locked at their current level) so this still isn't a perfect "shoot everything consistently" solution, but it's much closer than before.

The command line and GUI clients have grown a few new features. The major one is that the server list is no longer a set but an ordered list which can be re-ordered / sorted / etc. This doesn't do much in these clients for the time being but is useful in...

The new batch client. The common client code used by the command line and GUI clients is now documented (http://compoundpi.readthedocs.org/en/re ... batch.html) making it easy to construct your own scripts for doing whatever you like with your array of pi cameras, including outputting images in a particular order.

You can also now have the camera array record videos (in H264 or MJPEG formats) including motion vector estimation data (with H264 output only). This isn't available from the GUI client (I ran out of time), is available in rudimentary form in the command line client, and is fully accessible in the batch interface (obviously) so now you should be able to emulate those bullet-time scenes in the Matrix much more easily!

Everything's available from PyPI and/or GitHub now - hopefully the packages should hit the Raspbian repos in the next few days.

Have fun!

Dave.

Dryan
Posts: 1
Joined: Tue Oct 30, 2018 3:24 pm

Re: Compound Pi

Tue Oct 30, 2018 3:47 pm

I want to ask a question. When I set capture_count to 30 during the experiment, the system will return an error when downloading the image. Have you ever had a similar problem?

Return to “Camera board”