diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7925756 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Decoder/a.png +Decoder/chunks/ +Decoder/output.dat diff --git a/Decoder/adjustpic.html b/Decoder/adjustpic.html new file mode 100644 index 0000000..73b16c5 --- /dev/null +++ b/Decoder/adjustpic.html @@ -0,0 +1,13 @@ + + +
+
+
+
+
+
diff --git a/Decoder/combineChunks.sh b/Decoder/combineChunks.sh
new file mode 100755
index 0000000..151b7cd
--- /dev/null
+++ b/Decoder/combineChunks.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+rm output.dat
+currFN=0
+echo "processing chunks "
+while /bin/true; do
+ if [ ! -f chunks/${currFN}.chunk ] ; then
+ echo chunk $currFN is missing!
+ exit 1
+ else
+ echo -n $currFN/
+ fi
+ cat chunks/${currFN}.chunk >> output.dat
+ let currFN=$currFN+1
+done
+
diff --git a/Decoder/decodeAllFiles.sh b/Decoder/decodeAllFiles.sh
old mode 100644
new mode 100755
index c253aa1..307caec
--- a/Decoder/decodeAllFiles.sh
+++ b/Decoder/decodeAllFiles.sh
@@ -1,11 +1,11 @@
#/bin/bash
-ls input/ | sort | while read f;do
-dta=$(zbarimg --raw --nodbus input/$f)
+while /bin/true;do
+fswebcam -q -r 800x800 a.png
+#dta=$(fswebcam -q -r 1280x720 - | zbarimg -q --raw --nodbus -)
+dta=$(zbarimg -q --raw --nodbus a.png)
chunkNum=${dta/|*/}
chunkData=${dta/*|/}
-echo ${chunkNum}
-
-
-# >> output.dat
+echo received: ${chunkNum}
+echo $chunkData | base64 -d > chunks/${chunkNum}.chunk
done
diff --git a/Decoder/decodeSingleFile.sh b/Decoder/decodeSingleFile.sh
old mode 100644
new mode 100755