From 0d01b97b75f8ffd36f07df3a0a6f958682848211 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sat, 3 Feb 2018 18:51:22 +0000 Subject: [PATCH] cuda: don't use std::numeric_limits CUDA code uses own implementation in cuda/limits.hpp --- modules/core/include/opencv2/core/cuda/detail/color_detail.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp b/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp index dc1bccc..bfb4055 100644 --- a/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp @@ -1027,8 +1027,8 @@ namespace cv { namespace cuda { namespace device vmin = fmin(vmin, b); diff = v - vmin; - s = diff / (float)(::fabs(v) + std::numeric_limits::epsilon()); - diff = (float)(60. / (diff + std::numeric_limits::epsilon())); + s = diff / (float)(::fabs(v) + numeric_limits::epsilon()); + diff = (float)(60. / (diff + numeric_limits::epsilon())); h = (v == r) * (g - b) * diff; h += (v != r && v == g) * ((b - r) * diff + 120.f); @@ -1261,7 +1261,7 @@ namespace cv { namespace cuda { namespace device diff = vmax - vmin; l = (vmax + vmin) * 0.5f; - if (diff > std::numeric_limits::epsilon()) + if (diff > numeric_limits::epsilon()) { s = (l < 0.5f) * diff / (vmax + vmin); s += (l >= 0.5f) * diff / (2.0f - vmax - vmin); @@ -1802,7 +1802,7 @@ namespace cv { namespace cuda { namespace device float L = splineInterpolate(Y * (LAB_CBRT_TAB_SIZE / 1.5f), c_LabCbrtTab, LAB_CBRT_TAB_SIZE); L = 116.f * L - 16.f; - const float d = (4 * 13) / ::fmaxf(X + 15 * Y + 3 * Z, std::numeric_limits::epsilon()); + const float d = (4 * 13) / ::fmaxf(X + 15 * Y + 3 * Z, numeric_limits::epsilon()); float u = L * (X * d - _un); float v = L * ((9 * 0.25f) * Y * d - _vn); -- 2.7.4