mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
fix GpuMat::setTo method in case if mask is empty:
it might be called from _OutputArray::setTo
This commit is contained in:
parent
df57d038b8
commit
f676bfb3d7
@ -390,6 +390,11 @@ GpuMat& cv::cuda::GpuMat::setTo(Scalar value, InputArray _mask, Stream& stream)
|
|||||||
|
|
||||||
GpuMat mask = _mask.getGpuMat();
|
GpuMat mask = _mask.getGpuMat();
|
||||||
|
|
||||||
|
if (mask.empty())
|
||||||
|
{
|
||||||
|
return setTo(value, stream);
|
||||||
|
}
|
||||||
|
|
||||||
CV_DbgAssert( size() == mask.size() && mask.type() == CV_8UC1 );
|
CV_DbgAssert( size() == mask.size() && mask.type() == CV_8UC1 );
|
||||||
|
|
||||||
typedef void (*func_t)(const GpuMat& mat, const GpuMat& mask, Scalar scalar, Stream& stream);
|
typedef void (*func_t)(const GpuMat& mat, const GpuMat& mask, Scalar scalar, Stream& stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user