-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenerateReport.py
30 lines (21 loc) · 1.13 KB
/
generateReport.py
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
#########################################################################################
# NOTE: Make sure to set all bVis flags to false in ./src/FinalProject_Camera.cpp ... #
# and then build the project again for this script to run properly. #
#########################################################################################
import os
import subprocess
if not os.path.exists("report"):
os.makedirs("report")
os.chdir("./build")
detectors = ["SHITOMASI", "HARRIS", "FAST", "BRISK", "ORB", "AKAZE", "SIFT"]
descriptors = ["BRISK", "BRIEF", "ORB", "FREAK", "AKAZE", "SIFT"]
cnt = 1
for detector in detectors:
for descriptor in descriptors:
matchingDescriptorType = "DES_BINARY" if descriptor != "SIFT" else "DES_HOG"
state, output_string = subprocess.getstatusoutput('./3D_object_tracking %s %s %s' % (detector, descriptor, matchingDescriptorType))
final_string = (str(cnt) + " (" + detector + "/" + descriptor + "):\n" + 20*"=" + "\n\n" + output_string + "\n")
with open("../report/log_"+ str(cnt) + "_" + detector + "_" + descriptor + ".txt", "w") as f:
f.write(final_string)
final_string_list = []
cnt += 1