Skip to content

Commit d72f746

Browse files
committed
Try using long exposure on raspicam
1 parent 55988c2 commit d72f746

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

enhance2.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
echo "say cheese" | festival --tts
3+
sleep 5;
4+
FILENAME="shot-`date +%F.%H-%M-%S`.jpg"
5+
FILE="/tmp/$FILENAME"
6+
echo "Ca-cheek" | festival --tts &
7+
/opt/vc/bin/raspistill --nopreview -t 8 --ISO 800 --exposure verylong --imxfx denoise -w 1280 -h 960 -o $FILE.1.jpg
8+
if [ "$?" != "0" ]; then exit 1; fi
9+
curl -o $FILE.2.jpg http://10.0.0.64:8080/latest.jpg
10+
if [ "$?" == "0" ]; then
11+
convert $FILE.2.jpg -resize 1280x960 $FILE.3.jpg
12+
convert $FILE.1.jpg $FILE.3.jpg +append $FILE
13+
else
14+
mv $FILE.1.jpg $FILE
15+
fi
16+
rm $FILE.1.jpg
17+
rm $FILE.2.jpg
18+
rm $FILE.3.jpg
19+
#Set the white level to the mean level plus one standard deviation
20+
/usr/bin/mogrify -level 0%,$(bc <<< "$(identify -verbose $FILE | grep -A 7 'Image statistics' | tr \) \( | grep 'mean' | cut -d \( -f 2) * 100 + $(identify -verbose $FILE | grep -A 7 'Image statistics' | tr \) \( | grep 'standard deviation' | cut -d \( -f 2) * 100")% $FILE
21+
/usr/bin/scp -p $FILE www.somakeit.org.uk:www
22+
if [ "$?" != "0" ]; then exit 1; fi
23+
echo "Enhanced: http://irccat.somakeit.org.uk/$FILENAME"
24+
rm $FILE

0 commit comments

Comments
 (0)