Skip to content

Commit 70448a7

Browse files
committed
Compile fixes for Mac OS X10.9 clang 5.0.0
fixed compile errors on clang 5.0.0 fixed test_akaze_programs.py
1 parent 9f1524d commit 70448a7

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/lib/fed.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#define _USE_MATH_DEFINES
3333
#include "fed.h"
34+
#include <cmath>
3435

3536
using namespace std;
3637

@@ -73,7 +74,7 @@ int fed_tau_by_cycle_time(const float& t, const float& tau_max,
7374
float scale = 0.0; // Ratio of t we search to maximal t
7475

7576
// Compute necessary number of time steps
76-
n = (int)(ceilf(sqrtf(3.0*t/tau_max+0.25f)-0.5f-1.0e-8f)+ 0.5f);
77+
n = (int)(ceilf(sqrt(3.0*t/tau_max+0.25f)-0.5f-1.0e-8f)+ 0.5f);
7778
scale = 3.0*t/(tau_max*(float)(n*(n+1)));
7879

7980
// Call internal FED time step creation routine

test_akaze_programs.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@
1515
# Helper functions
1616
def extract_AKAZE_features(imagePath):
1717
command = " ".join([programs[0], ' -i ', imagePath])
18-
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
19-
output, errors = p.communicate()
20-
print(output)
18+
os.system(command)
2119

2220
def match_AKAZE_features(imagePath1, imagePath2, gdTruthHomography):
2321
command = " ".join(
2422
[programs[1], ' -L ', imagePath1, ' -R ', imagePath2, ' -H ', gdTruthHomography] )
25-
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
26-
output, errors = p.communicate()
27-
print(output)
23+
os.system(command)
2824

2925
def compare_AKAZE_BRISK_ORB(imagePath1, imagePath2, gdTruthHomography):
3026
command = " ".join(
3127
[programs[2], ' -L ', imagePath1, ' -R ', imagePath2, ' -H ', gdTruthHomography] )
32-
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
33-
output, errors = p.communicate()
34-
print(output)
28+
os.system(command)
3529

3630
# ===============================================================================
3731
# Example datasets

0 commit comments

Comments
 (0)