diff --git a/modules/xfeatures2d/src/daisy.cpp b/modules/xfeatures2d/src/daisy.cpp index 413322f0b..7503f9851 100644 --- a/modules/xfeatures2d/src/daisy.cpp +++ b/modules/xfeatures2d/src/daisy.cpp @@ -53,6 +53,19 @@ #include #include +#ifdef _MSC_VER + #if (_MSC_VER <= 1700) + /* This function rounds x to the nearest integer, but rounds halfway cases away from zero. */ + static inline double round(double x) + { + if (x < 0.0) + return ceil(x - 0.5); + else + return floor(x + 0.5); + } + #endif +#endif + namespace cv { namespace xfeatures2d