提交 f0f87ebf 编写于 作者: V Vladislav Vinogradov

fixed compilation error under linux

上级 2d304809
......@@ -654,11 +654,9 @@ void cv::gpu::multiply(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, doub
namespace
{
bool isIntScalar(Scalar sc)
inline bool isIntScalar(Scalar sc)
{
Scalar_<int> isc(sc);
return sc.val[0] == isc.val[0] && sc.val[1] == isc.val[1] && sc.val[2] == isc.val[2] && sc.val[3] == isc.val[3];
return sc.val[0] == static_cast<int>(sc.val[0]) && sc.val[1] == static_cast<int>(sc.val[1]) && sc.val[2] == static_cast<int>(sc.val[2]) && sc.val[3] == static_cast<int>(sc.val[3]);
}
}
......
......@@ -153,7 +153,7 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
tmp2.push_back(p);
if (maxCorners > 0 && tmp2.size() == maxCorners)
if (maxCorners > 0 && tmp2.size() == static_cast<size_t>(maxCorners))
break;
}
}
......
......@@ -83,8 +83,6 @@ void cv::gpu::PyrLKOpticalFlow::calcSharrDeriv(const GpuMat& src, GpuMat& dIdx,
ensureSizeIsEnough(src.size(), CV_MAKETYPE(CV_16S, cn), dx_calcBuf_);
ensureSizeIsEnough(src.size(), CV_MAKETYPE(CV_16S, cn), dy_calcBuf_);
const int colsn = src.cols * cn;
calcSharrDeriv_gpu(src, dx_calcBuf_, dy_calcBuf_, dIdx, dIdy, cn);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册