Skip to content

Commit 0d01b97

Browse files
committed
cuda: don't use std::numeric_limits
CUDA code uses own implementation in cuda/limits.hpp
1 parent 7fedfa0 commit 0d01b97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/core/include/opencv2/core/cuda/detail/color_detail.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,8 @@ namespace cv { namespace cuda { namespace device
10271027
vmin = fmin(vmin, b);
10281028

10291029
diff = v - vmin;
1030-
s = diff / (float)(::fabs(v) + std::numeric_limits<float>::epsilon());
1031-
diff = (float)(60. / (diff + std::numeric_limits<float>::epsilon()));
1030+
s = diff / (float)(::fabs(v) + numeric_limits<float>::epsilon());
1031+
diff = (float)(60. / (diff + numeric_limits<float>::epsilon()));
10321032

10331033
h = (v == r) * (g - b) * diff;
10341034
h += (v != r && v == g) * ((b - r) * diff + 120.f);
@@ -1261,7 +1261,7 @@ namespace cv { namespace cuda { namespace device
12611261
diff = vmax - vmin;
12621262
l = (vmax + vmin) * 0.5f;
12631263

1264-
if (diff > std::numeric_limits<float>::epsilon())
1264+
if (diff > numeric_limits<float>::epsilon())
12651265
{
12661266
s = (l < 0.5f) * diff / (vmax + vmin);
12671267
s += (l >= 0.5f) * diff / (2.0f - vmax - vmin);
@@ -1802,7 +1802,7 @@ namespace cv { namespace cuda { namespace device
18021802
float L = splineInterpolate(Y * (LAB_CBRT_TAB_SIZE / 1.5f), c_LabCbrtTab, LAB_CBRT_TAB_SIZE);
18031803
L = 116.f * L - 16.f;
18041804

1805-
const float d = (4 * 13) / ::fmaxf(X + 15 * Y + 3 * Z, std::numeric_limits<float>::epsilon());
1805+
const float d = (4 * 13) / ::fmaxf(X + 15 * Y + 3 * Z, numeric_limits<float>::epsilon());
18061806
float u = L * (X * d - _un);
18071807
float v = L * ((9 * 0.25f) * Y * d - _vn);
18081808

0 commit comments

Comments
 (0)