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!

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)

  • 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) – Matthew Steeples May 7 '13 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 '14 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 '14 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 – Matthew Steeples Mar 13 '14 at 19:27
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.

  • 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 '14 at 19:03
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.

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.

0

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

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.