forked from chaowang15/RGBDPlaneDetection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_win.sh
51 lines (48 loc) · 1.73 KB
/
demo_win.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
# Function to show colored text on screen
cecho() {
local code="\033["
case "$1" in
black | bk) color="${code}0;30m";;
red | r) color="${code}1;31m";;
green | g) color="${code}1;32m";;
yellow | y) color="${code}1;33m";;
blue | b) color="${code}1;34m";;
purple | p) color="${code}1;35m";;
cyan | c) color="${code}1;36m";;
gray | gr) color="${code}0;37m";;
*) local text="$1"
esac
[ -z "$text" ] && local text="$color$2${code}0m"
echo -e "$text"
}
# RGBD="/d/3drecon/data/3dlite/apt/apt-rgbd-render/"
# RGBD="/d/3drecon/data/bundlefusion/copyroom/copyroom/"
# OUTPUT="/d/3drecon/data/bundlefusion/copyroom/copyroom-plane-temp/"
# ORIGINALRGBD="/d/3drecon/data/bundlefusion/copyroom/copyroom/"
# RGBD="/d/3drecon/data/bundlefusion/office0/office0_temp/office0_temp-original/"
RGBD="/d/3drecon/data/bundlefusion/copyroom/copyroom_all/copyroom_all-original/"
OUTPUT=$RGBD
if [ ! -d "$OUTPUT" ]; then
mkdir $OUTPUT
fi
code="/c/dev/RGBDPlaneDetection/x64/Release/RGBDPlaneDetection.exe"
cecho g "input rgbd folder: $RGBD"
cecho g "output plane folder: $OUTPUT"
cecho g "RGBDPlaneDetection code: $code"
# for file in `ls $RGBD*-depth.png | sort`; do
# echo $file >> list.txt
# python $genply
# done
start=0
end=4479
for i in $(seq -f "%06g" $start $end)
do
cecho g "Reading frame $i"
# $code ${RGBD}frame-$i-color.png ${RGBD}frame-$i-depth.png $OUTPUT
# $code -o ${RGBD}frame-$i.color.jpg ${RGBD}frame-$i.depth.png $OUTPUT
$code -o ${RGBD}frame-$i.rendered-color.png ${RGBD}frame-$i.rendered-depth.png $OUTPUT
# $code -o ${RGBD}frame-$i-color.png ${RGBD}frame-$i-depth.png
cecho g "Copying pose file of frame $i"
# cp ${ORIGINALRGBD}frame-$i.pose.txt ${OUTPUT}frame-$i-pose.txt
done