fixed compilation error under linux

This commit is contained in:
Vladislav Vinogradov 2012-02-22 11:22:31 +00:00
parent 2d30480982
commit f0f87ebf36
3 changed files with 3 additions and 7 deletions

View File

@ -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]);
}
}

View File

@ -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;
}
}

View File

@ -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);
}