resize area are fixed for scales that aren't divide 128

This commit is contained in:
Marina Kolpakova
2012-06-18 10:31:36 +00:00
parent 0f01d8df1c
commit db08656a38
3 changed files with 30 additions and 22 deletions

View File

@@ -95,6 +95,7 @@ void cv::gpu::resize(const GpuMat& src, GpuMat& dst, GpuMat& buffer, Size dsize,
CV_Assert( (fx < 1.0) && (fy < 1.0));
CV_Assert(!(dsize == Size()) || (fx > 0 && fy > 0));
CV_Assert(src.cols >= 128 && src.rows >= 128);
CV_Assert((fx - 128.0) <= 0 && (fy - 128.0) <= 0);
if (dsize == Size())
dsize = Size(saturate_cast<int>(src.cols * fx), saturate_cast<int>(src.rows * fy));