-
Notifications
You must be signed in to change notification settings - Fork 0
/
convertRGBtoCSV.sh
30 lines (27 loc) · 1.15 KB
/
convertRGBtoCSV.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
targetPrefix='/media/hornberger/data/DatenTobiasH-Juli2018-pngVersion-debayered-csved-v2/'
#targetPrefix='/media/hornberger/data/Daten-Kronauer-September2018-pngVersion-debayered-csved/'
for D in *; do
if [ -d "${D}" ]; then
#check if folder exists:
if [ ! -d "${targetPrefix}$D" ]; then
echo "creating folder ${targetPrefix}$D"
mkdir -p "${targetPrefix}$D"
fi
for D2 in ${D}/*; do
if [ -d "${D2}" ]; then
#ls "${D2}"
files=( ${D2}/*.png )
origin="${files[0]//00000/\%05d}"
#| sed -e 's/00000/%05d/g'
#if [[ $origin = *"ylinder"* ]]; then
# origin="$origin -morph"
#fi
echo "python ~/MasterarbeitTobias/scripts/segment.py -i "$origin" -o "${targetPrefix}$D2"" -nd
python ~/MasterarbeitTobias/scripts/segment.py -i "$origin" -o "${targetPrefix}$D2" -nd
#python ~/MasterarbeitTobias/scripts/debayer.py -i "$D2" -o "${targetPrefix}$D2/"
#pip freeze | grep opencv
fi
done
fi
done