implementation of the receiving side
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Decoder/a.png
|
||||||
|
Decoder/chunks/
|
||||||
|
Decoder/output.dat
|
||||||
13
Decoder/adjustpic.html
Normal file
13
Decoder/adjustpic.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Adjust picture</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<img src=a.png>
|
||||||
|
<script>
|
||||||
|
window.setTimeout(_=>{window.location.reload()},1000);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
Decoder/combineChunks.sh
Executable file
15
Decoder/combineChunks.sh
Executable file
@@ -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
|
||||||
|
|
||||||
12
Decoder/decodeAllFiles.sh
Normal file → Executable file
12
Decoder/decodeAllFiles.sh
Normal file → Executable file
@@ -1,11 +1,11 @@
|
|||||||
#/bin/bash
|
#/bin/bash
|
||||||
ls input/ | sort | while read f;do
|
while /bin/true;do
|
||||||
dta=$(zbarimg --raw --nodbus input/$f)
|
fswebcam -q -r 800x800 a.png
|
||||||
|
#dta=$(fswebcam -q -r 1280x720 - | zbarimg -q --raw --nodbus -)
|
||||||
|
dta=$(zbarimg -q --raw --nodbus a.png)
|
||||||
chunkNum=${dta/|*/}
|
chunkNum=${dta/|*/}
|
||||||
chunkData=${dta/*|/}
|
chunkData=${dta/*|/}
|
||||||
echo ${chunkNum}
|
echo received: ${chunkNum}
|
||||||
|
echo $chunkData | base64 -d > chunks/${chunkNum}.chunk
|
||||||
|
|
||||||
# >> output.dat
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
0
Decoder/decodeSingleFile.sh
Normal file → Executable file
0
Decoder/decodeSingleFile.sh
Normal file → Executable file
Reference in New Issue
Block a user