Commit ef0931be authored by atinfinity's avatar atinfinity

fixed compilation warning

parent 69303258
......@@ -170,7 +170,7 @@ static void test_threshold( const Mat& _src, Mat& _dst,
const float* src = _src.ptr<float>(i);
float* dst = _dst.ptr<float>(i);
for( j = 0; j < width_n; j++ )
dst[j] = src[j] > thresh ? maxval : 0.f;
dst[j] = (float)(src[j] > thresh ? maxval : 0.f);
}
else
{
......@@ -203,7 +203,7 @@ static void test_threshold( const Mat& _src, Mat& _dst,
const float* src = _src.ptr<float>(i);
float* dst = _dst.ptr<float>(i);
for( j = 0; j < width_n; j++ )
dst[j] = src[j] > thresh ? 0.f : maxval;
dst[j] = (float)(src[j] > thresh ? 0.f : maxval);
}
else
{
......@@ -244,7 +244,7 @@ static void test_threshold( const Mat& _src, Mat& _dst,
for( j = 0; j < width_n; j++ )
{
float s = src[j];
dst[j] = s > thresh ? thresh : s;
dst[j] = (float)(s > thresh ? thresh : s);
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment