Raspberry Pi Camera

Connect it to the pi – watch that
nice docu here

first image after raspi-config
raspistill -o image.jpg

not very fast?? set -t 1, but WARNING – bad exposure results, see below!
raspistill -t 1 -o image.jpg

other nice options: width, height, ISO, verbose
raspistill -t 1 -w 400 -h 300 -v -n -ISO 800 -o image.jpg

want a funny effect
raspistill -t 1 -ifx sketch -o image.jpg

to disable the red camera led add this code to your /boot/config.txt
disable_camera_led=1

making pics for timelapes-videos is very easy
take every second one pic for 300 seconds
raspistill -w 800 -h 600 -o /media/RALLY2/www/camera/099dea17/%04d.jpg -tl 1000 -t 300000 -v
http://www.time-science.com/timescience/timelapse.asp#calculator
taking a pic every second is can cause some missing frames (pics) – see error „mmal: skipping frame“
sample for 1minute video: take 4 pics every minute for 7 hours = 1680 pics; 25200000 ms

if you have some missing pics (eg. 0071.jpg 0073.jgp) you can use this script to rename your files with sequential numbers
#!/bin/bash
a=1
for i in *.jpg; do
  new=$(printf „%04d.jpg“ ${a}) #04 pad to length of 4
  mv ${i} ${new}
  let a=a+1
done

my OS X workflow to create a video-file
first zip all jpgs on the pi (or just copy all files over the network – as you like…)
tar -zcvf timelapse.zip *.jpg
and then copy the zip file to the mac
scp pi@192.168.0.1:/home/pi/camera/my.zip /Users/me/raspberry/camera

then use ffmpg to create the video from the pics
/Applications/ffmpegX.app/Contents/Resources/ffmpeg -qscale 5 -r 24 -b 64k -i %04d.jpg timelapse.mp4

add the current date/time onto the image with convert
install convert tool
sudo apt-get install imagemagick

then, depending on photo-dimensions add the date to test.jpg and create test1.jpg
convert -pointsize 20 -fill white -draw „text 670,740 ‚$(date)'“ test.jpg test1.jpg

ERRORS/PROBLEMS/BUGS
i had one hang-up after making too many large photos one after another (1 sec.). after a reboot everythins was ok.

do not start the camera within more than one app! see http://www.raspberrypi.org/phpBB3/viewtopic.php?t=44491&p=436584

the -t 1 option results in bad exposure results. values above 1000 are much better ! !

links
http://www.designspark.com/knowledge-item/raspberry-pi-camera-setup
motion detection
http://www.codeproject.com/Articles/665518/Raspberry-Pi-as-low-cost-HD-surveillance-camera
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=45235

Advertisements

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s