From: Alexander Shishkov Date: Mon, 12 Mar 2012 07:27:04 +0000 (+0000) Subject: fixed compilation on Windows (NAN) X-Git-Tag: accepted/2.0/20130307.220821~1178 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4e5209d5a41f015211b2f13d17aad7974295684;p=profile%2Fivi%2Fopencv.git fixed compilation on Windows (NAN) --- diff --git a/modules/contrib/src/rgbdodometry.cpp b/modules/contrib/src/rgbdodometry.cpp index e7608ee..4293a1d 100644 --- a/modules/contrib/src/rgbdodometry.cpp +++ b/modules/contrib/src/rgbdodometry.cpp @@ -54,6 +54,11 @@ #include #endif +#if defined _MSC_VER +#include +#endif + + using namespace cv; inline static @@ -220,11 +225,18 @@ void preprocessDepth( Mat depth0, Mat depth1, { float& d0 = depth0.at(y,x); if( !cvIsNaN(d0) && (d0 > maxDepth || d0 < minDepth || d0 <= 0 || (!validMask0.empty() && !validMask0.at(y,x))) ) +#if defined _MSC_VER + d0 = std::numeric_limits::quiet_NaN(); +#else d0 = NAN; - +#endif float& d1 = depth1.at(y,x); if( !cvIsNaN(d1) && (d1 > maxDepth || d1 < minDepth || d1 <= 0 || (!validMask1.empty() && !validMask1.at(y,x))) ) +#if defined _MSC_VER + d1 = std::numeric_limits::quiet_NaN(); +#else d1 = NAN; +#endif } } }