diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 5a70d38a71..46f294962d 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -201,8 +201,10 @@ #if !defined _MSC_VER && !defined __BORLANDC__ # if defined __cplusplus && __cplusplus >= 201103L # include + typedef std::uint32_t uint; # else # include + typedef uint32_t uint; # endif #else typedef unsigned uint; diff --git a/modules/stitching/src/motion_estimators.cpp b/modules/stitching/src/motion_estimators.cpp index abd43b11fb..7ceb49584f 100644 --- a/modules/stitching/src/motion_estimators.cpp +++ b/modules/stitching/src/motion_estimators.cpp @@ -42,13 +42,7 @@ #include "precomp.hpp" #include "opencv2/calib3d/calib3d_c.h" - -#ifdef _MSC_VER - #include - #define isnan(x) _isnan(x) -#else - #include -#endif +#include "opencv2/core/cvdef.h" using namespace cv; using namespace cv::detail; @@ -259,7 +253,7 @@ bool BundleAdjusterBase::estimate(const std::vector &features, bool ok = true; for (int i = 0; i < cam_params_.rows; ++i) { - if (isnan(cam_params_.at(i,0))) + if (cvIsNaN(cam_params_.at(i,0))) { ok = false; break;