1

I'm working on a project with my Raspberry Pi at the moment. I'll give a brief summary of what I'm trying to achieve.

  1. I would like my RPi to take high resolution pictures through a USB webcam at intervals, say every 5 minutes
  2. I would then like to upload each image into the web, preferably to my Dropbox account (Possible?)
  3. I will then set the desktop background settings of my Windows 7 machine to look in the directory where these images are stored
  4. End result: I can set the RPi up on the farm where I grew up so my desktop background will keep me up to date on what's going on up there while I'm stuck behind my desk at work wondering why I didn't become a farmer!

Sound like a fun idea?

So my question at this stage in my project is about your experience with cameras that work well with the RPi and what I should look for the get the highest res possible out of it. Also if anyone knows of any good software for taking picture at intervals that would be useful too! I have read about the 'motion' app but it seems to have issues with high resolution.

All advice/ ideas will be highly appreciated!

5 Answers 5

1

You can check if your camera is in the list of working hardware (not a complete list), to make sure it will work: http://elinux.org/RPi_VerifiedPeripherals

For working with the camera and taking snapshots etc. you could use motion

Regarding loading the images to an webserver or dropbox: It should be doable to write a small Phyton script to load images onto a web/ftp server. Or you could make your Raspberry Pi accessible from the web / use it as a webserver (for example nginx)

4
  • I believe motion has this functionality (as a webserver) built in. You can open it up as by default it's disabled (and when enabled it's restricted to localhost) May 7, 2013 at 17:45
  • @MatthewSteeples You could use motion as software, make it save the file in the ram (/var/tmp/ for example) and then use motion to call a script after an image is saved (MotionConf> on_picture_save, Values: Max 4095 characters Default: Not defined, Command to be executed when an image is saved. You can use Conversion Specifiers and spaces as part of the command. Use %f for passing filename (with full path) to the command.) But I'd think motion is not the right program for this usage.
    – ExploWare
    Mar 13, 2014 at 19:23
  • Keep in mind that saving a whole lot of images to your sdcard reduces its lifetime. My advice is to save the files in the ram (/var/tmp/ for example)
    – ExploWare
    Mar 13, 2014 at 19:25
  • If the webserver is on the same network as the raspberry pi then you could mount the location and save the images directly to the webserver Mar 13, 2014 at 19:27
1

i use gphoto2 package (commandline shoot) with Raspi to shoot (by usb) every X seconds with a Canon DSLR camera and upload it to a local web server. so later, make time lapse videos with it.

1

Definitely use gphoto2. Here is a great script for installing gphoto2 on the pi: https://github.com/gonzalo/gphoto2-updater/

Note that you can email to a dropbox, so if the Pi is connected to the internet you could have your script email each image capture using mpack.

0

I'd wait for the 5-megapixel official camera module if I were you.

0

I use the dropbox_uploader script. I made a simple photo-capture script which writes to /var/tmp, a fake directory in the memory instead of the sdcard, to reduce sd-card wear! My own script.sh

#!/bin/bash
filename="shot-`date +%s`.jpg"
tmpdir="/var/tmp/"
dropboxfolder="/webcam/"
#Take a picture usinusingg a command which works for your camera, save it to $filename
/home/pi/Dropbox-Uploader/dropbox_uploader.sh -s -q upload $tmpdir$filename $dropboxfolder$filename
/bin/rm $tmpdir$filename

Then chmod +x script.sh and edit /etc/crontab, add the line
*/5 * * * * pi /home/pi/script.sh
(edit to your filename/locations ofcourse)

It works perfect for me.

1
  • note: if the dropbox_uploader is installed as user pi, its not also installed for root. So install for every user who needs to be able to reach it, and who's not able to use su pi -c /home/pi/script.sh
    – ExploWare
    Mar 13, 2014 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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