]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Added option to generate boxplots showing FPS.
authorShanigen <vkaraf@gmail.com>
Tue, 18 Sep 2018 10:04:14 +0000 (12:04 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 20 Sep 2018 07:36:44 +0000 (09:36 +0200)
graphGen.sh

index 06f5d84ae2da07f76762ff20a6c12d2cc827fdb6..55c4fd4fb9d6f06ab536cdfe9b0f2ed09bff9d2a 100755 (executable)
@@ -1,8 +1,26 @@
 #!/usr/bin/bash
 
+USE_FPS=0
+
 mkdir -p plot-data
 cd plot-data
 
+while getopts ":f" opt
+do
+    case $opt in
+        f)
+            USE_FPS=1
+            break
+            ;;
+        \?)
+            echo "Invalid option -$OPTARG" >&2
+            exit 1
+            ;;
+    esac
+done
+
+shift $((OPTIND-1))
+
 for log in "$@"
 do
     tracker_version=${log#*-}
@@ -36,6 +54,9 @@ do
         fi
         time=${line%,*,*}
         time=${time//[!.0-9]/}
+        if [ "$USE_FPS" -eq "1" ]; then
+            time=$(bc <<< "scale=3;(1/$time)*1000;")
+        fi
         echo "$time" >> "$data_file"
     done < "../../../${log}"
 
@@ -55,7 +76,12 @@ do
         N = words(header)
 
         set title "${directory^}-${subdirectory}"
-        set ylabel "Time [ms]"
+
+        if ($USE_FPS == 1) {
+           set ylabel "FPS"
+        } else {
+          set ylabel "Time [ms]"
+        }
         set xtics rotate
         set xtics ('' 1)
         set for [i=1:N] xtics add (word(header, i) i)