summaryrefslogtreecommitdiff
path: root/takepix.sh
blob: db05b9f45a4cdb8b1736960f2b51851e1b536912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# define variables. Your needs may vary.
# use literal user name. Shell expansions may not work when this script is run by a service!
picdir="/home/st33v/pix"   
picdate=$(date +%Y-%m-%d_%H%M)
thispic=$picdir/$picdate.jpg
artist=$(hostname)
jpgQuality="90"

# echo thispic = $thispic

case ${artist^^} in

    LUCERNE)
    /opt/vc/bin/raspistill -vf -hf -x IFD1.Artist=${artist} -q $jpgQuality -md 4: -o $thispic;;

    NEATHERD)
    /opt/vc/bin/raspistill -x IFD1.Artist=${artist} -q $jpgQuality -md 4: -o $thispic;;

    *)
    /opt/vc/bin/raspistill -x IFD1.Artist=${artist} -q $jpgQuality -md 4: -o $thispic;;

esac

# Note: we do no image processing on this pi, because it has so little RAM
# left after devoting 128MB to the GPU (camera).
# STAN does all the heavy lifting:
#   1) delete nightshots (where threshold pixel value is not met)
#   2) resize and unsharp mask ready for display on the internet.