mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
added checking destination matrix size for resize and integral functions
This commit is contained in:
parent
6c0af66fd8
commit
eb599f6832
@ -530,8 +530,8 @@ void cv::gpu::integral(const GpuMat& src, GpuMat& sum, Stream& s)
|
||||
void cv::gpu::integralBuffered(const GpuMat& src, GpuMat& sum, GpuMat& buffer, Stream& s)
|
||||
{
|
||||
CV_Assert(src.type() == CV_8UC1);
|
||||
|
||||
sum.create(src.rows + 1, src.cols + 1, CV_32S);
|
||||
if (sum.cols != src.cols + 1 && sum.rows != src.rows + 1)
|
||||
sum.create(src.rows + 1, src.cols + 1, CV_32S);
|
||||
|
||||
NcvSize32u roiSize;
|
||||
roiSize.width = src.cols;
|
||||
|
@ -83,8 +83,8 @@ void cv::gpu::resize(const GpuMat& src, GpuMat& dst, Size dsize, double fx, doub
|
||||
fx = static_cast<double>(dsize.width) / src.cols;
|
||||
fy = static_cast<double>(dsize.height) / src.rows;
|
||||
}
|
||||
|
||||
dst.create(dsize, src.type());
|
||||
if (dsize != dst.size())
|
||||
dst.create(dsize, src.type());
|
||||
|
||||
if (dsize == src.size())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user