Skip to content

Commit

Permalink
[scripts] fix picture_snap.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rroohhh committed Nov 23, 2019
1 parent ae979c9 commit d24024d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions makefiles/in_chroot/requirements_pacman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ devmem
i2c-tools
cmake
bc
## axiom-picture-snap.sh
dcraw
imagemagick
# control daemon uses ninja now
ninja

Expand All @@ -41,3 +44,9 @@ mlocate
stress
screen
minicom

# wifi utilities
iw
wpa_supplicant
networkmanager
dnsmasq
6 changes: 4 additions & 2 deletions software/scripts/picture_snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
cd $(dirname $(realpath $0)) # change into script dir

. ./cmv.func

PARAMS=$1
IMAGENAME=`date +%Y%m%d_%H%M%S`
Expand All @@ -14,6 +15,7 @@ echo /opt/picture-snap/$IMAGENAME/$IMAGENAME.raw12
fil_reg 15 0

#capture frame
../sensor_tools/snap/snap -e $PARAMS -2 -r -b > /dev/null
../sensor_tools/snap/snap -e $PARAMS -2 -r -b > /opt/picture-snap/$IMAGENAME/$IMAGENAME.raw12

echo "raw12 written"
Expand All @@ -22,7 +24,7 @@ echo "raw12 written"
fil_reg 15 0x01000100

#convert to DNG
./raw2dng /opt/picture-snap/$IMAGENAME/$IMAGENAME.raw12 --swap-lines
raw2dng /opt/picture-snap/$IMAGENAME/$IMAGENAME.raw12 --swap-lines

echo "DNG written"

Expand All @@ -36,7 +38,7 @@ convert /opt/picture-snap/$IMAGENAME/$IMAGENAME.ppm /opt/picture-snap/$IMAGENAME

echo "JPG written"

md5sum /root/darkframe-x1.pgm > /opt/picture-snap/$IMAGENAME/$IMAGENAME.meta
# md5sum /root/darkframe-x1.pgm > /opt/picture-snap/$IMAGENAME/$IMAGENAME.meta


echo "all done!"

0 comments on commit d24024d

Please sign in to comment.