ep0490
Posts: 2
Joined: Fri Jan 24, 2014 10:00 pm

Multiple cameras with the raspberry pi?

Fri Jan 24, 2014 10:10 pm

Hi all, Is it possible to connect multiple cameras to the raspberry pi? I got this working on the arduino: http://www.adafruit.com/products/397 and still trying to figure out how to connect multiple cameras. Could this be done on the raspberry pi since it is way faster than the arduinos? If it can be done, how could i do it? Are there any other cameras out there, of which more than one can be connected to the raspberry pi?

I will greatly appreciate your help, working on a school project and it will be awesome if i can get 4 cameras to work on the pi.

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Multiple cameras with the raspberry pi?

Sun Jan 26, 2014 2:12 am

Let me try to reproduce the post by JamesH that got lost.

The Raspberry Pi can only support one of the official CSI cameras. The soc can support two, but only one of the connections is available for a camera to connection.
You could connect 4 usb webcams to the Raspberry Pi (or three and the official camera). Be aware that you have limited band width with USB and that will be shared between your 3 or 4 USB cameras.

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

Re: Multiple cameras with the raspberry pi?

Sun Jan 26, 2014 2:17 am

This particular camera http://www.adafruit.com/products/397 is a TTL Serial interface still camera with maximum resolution of 640x480, sending the image in JPEG format at 38400 baud. You could probably connect four or more of those to a single R-Pi (using a USB hub and one USB-Serial interface module per camera- they are pretty cheap). Of course it will take a while to get each image frame due to the speed of the interface.

It's sort of ironic that the 640x480 Adafruit camera is $40 and the R-Pi camera which is 5 Mpixel with full-HD video is $25. However you can have only one R-Pi camera per R-Pi board, so that is a limitation.

ep0490
Posts: 2
Joined: Fri Jan 24, 2014 10:00 pm

Re: Multiple cameras with the raspberry pi?

Mon Jan 27, 2014 1:07 am

Thank you for the answers. Jbeale, i forgot to mention that i want to take a snapshot from each camera at the same time and have it stored into a SD card, i was told by the adafruit support that the cameras store the data and can be retrieved at a later time, so now i need to figure out a way to turn them all on simultaneously with a switch. If i do what you mentioned with the usb hub and multiple usb to serial modules per TTL camera, could the R-Pi be programmed to store the images in the SD card slot it brings?

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

Re: Multiple cameras with the raspberry pi?

Mon Jan 27, 2014 5:41 am

Certainly. Unless you have some other storage device, or save things remotely via the network, the R-Pi uses the SD card for everything (storing user files and also the entire operating system that it runs.)

Davide0000
Posts: 3
Joined: Fri Jul 31, 2015 7:16 pm

Re: Multiple cameras with the raspberry pi?

Fri Jul 31, 2015 7:24 pm

Hi, if i connect 4 cameras (5Mp) and use them sequentially, how long would it take to save the images and store it into sd card?

Davide0000
Posts: 3
Joined: Fri Jul 31, 2015 7:16 pm

Re: Multiple cameras with the raspberry pi?

Sat Aug 01, 2015 2:39 pm

My issue is to use the 4 cameras sequentially, using
http://www.arducam.com/multi-camera-ada ... pberry-pi/
as fast as possible and save, later if possible, the 4 still pictures (one for each camera).

Could i do it streaming from the cameras to a phone and save the pictures?

The best would still be write them into sd card.

I want to create a portable system.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Multiple cameras with the raspberry pi?

Sat Aug 01, 2015 3:28 pm

The big issue will be how much time you can allow between images. Using Pi cameras and a multiplexer it seems it will take at least 100ms to switch. Four shots might take up to half a second.

If you use cameras with on-board storage it should be possible to take the pictures simultaneously.

There are USB cameras that can do this, but they are much more expensive than a PiCam or cheap webcam.

The TTL cameras should work OK. You may need some extra hardware to multiplex the serial output from the cameras into the Pi serial port.

Davide0000
Posts: 3
Joined: Fri Jul 31, 2015 7:16 pm

Re: Multiple cameras with the raspberry pi?

Sat Aug 01, 2015 3:36 pm

Hi, thanks for the reply.
the delay of half second is acceptable.for me.
But how can i save the picture?

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Multiple cameras with the raspberry pi?

Sat Aug 01, 2015 3:54 pm

You could adapt the Arduino code, or ask at Adafruit. Maybe they will provide a library.

Basically, read the image data from the camera into memory then write that block of data to a file on the Pi filesystem.

StevenK
Posts: 8
Joined: Tue Dec 01, 2015 6:10 pm
Location: Minnesota, USA

Re: Multiple cameras with the raspberry pi?

Wed Dec 02, 2015 2:01 pm

Is it possible to use one USB cam and one piCam?

drgeoff
Posts: 10831
Joined: Wed Jan 25, 2012 6:39 pm

Re: Multiple cameras with the raspberry pi?

Thu Dec 03, 2015 9:10 am

StevenK wrote:Is it possible to use one USB cam and one piCam?
Read the post by AndyD above and then answer the question: 'Is 1<=3 ?'
Quis custodiet ipsos custodes?

StevenK
Posts: 8
Joined: Tue Dec 01, 2015 6:10 pm
Location: Minnesota, USA

Re: Multiple cameras with the raspberry pi?

Fri Dec 04, 2015 11:10 pm

drgeoff wrote:
StevenK wrote:Is it possible to use one USB cam and one piCam?
Read the post by AndyD above and then answer the question: 'Is 1<=3 ?'
Perhaps I don't understand enough understand your somewhat confusing comment or AndyD's early response to the initial quesrion. I understand AndyD's comment to mean you can hook up multiple USB cameras to one Pi. I asked if you can connect one USB cam and one standard PiCsm, and I guess I don't know enough to see the answer to that question in AndyD's explanation.

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

Re: Multiple cameras with the raspberry pi?

Fri Dec 04, 2015 11:22 pm

AndyD wrote: The Raspberry Pi can only support one of the official CSI cameras. The soc can support two, but only one of the connections is available for a camera to connection.
You could connect 4 usb webcams to the Raspberry Pi (or three and the official camera). Be aware that you have limited band width with USB and that will be shared between your 3 or 4 USB cameras.
So you can connect 3 USB cameras and one RPi camera (apparently- I have not tried it). That strongly suggests you can also connect just 1 USB camera and one RPi camera.

StevenK
Posts: 8
Joined: Tue Dec 01, 2015 6:10 pm
Location: Minnesota, USA

Re: Multiple cameras with the raspberry pi?

Sat Dec 05, 2015 12:31 am

jbeale wrote:
AndyD wrote: The Raspberry Pi can only support one of the official CSI cameras. The soc can support two, but only one of the connections is available for a camera to connection.
You could connect 4 usb webcams to the Raspberry Pi (or three and the official camera). Be aware that you have limited band width with USB and that will be shared between your 3 or 4 USB cameras.
So you can connect 3 USB cameras and one RPi camera (apparently- I have not tried it). That strongly suggests you can also connect just 1 USB camera and one RPi camera.
I see what you were referring to now, thanks.

Return to “Advanced users”