diff options
| author | st33v <github@f3rr3t.com> | 2016-02-23 20:16:09 +1100 |
|---|---|---|
| committer | st33v <github@f3rr3t.com> | 2016-02-23 20:16:09 +1100 |
| commit | d05bcfedfd3547838ac60204fbd47e442dc88b2c (patch) | |
| tree | d02edb5f1891cfae31ac15916f508b97b9eddc40 | |
| parent | c9088a1021d0139b96423ed92b5c0618d5dbace4 (diff) | |
smaller pix bevcecause not enough ram to analyse pix.
| -rwxr-xr-x | takepix.sh | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,6 +1,21 @@ #!/bin/bash - +picdir="/home/st33v/pix" picdate=$(date +%Y-%m-%d_%H%M) -/opt/vc/bin/raspistill -x IFD1.Artist=neatherd -o /home/st33v/pix/${picdate}.jpg +thispic=$picdir/$picdate.jpg + +echo thispic = $thispic + +/opt/vc/bin/raspistill -x IFD1.Artist=neatherd -w 1200 -o $thispic + +# now check to see if the pic is too dark (i.e. taken at night) +mean=$(identify -format %[mean] $thispic | sed s/[.].*//) + +echo mean is "$mean" +# too dark +if [ $mean -lt 2000 ]; then + rm $pixdir/$thispic + echo mean of $mean is too low. + exit 13 +fi |
