Fixed IPP based implementation of setTo() for infinity value

This commit is contained in:
Vitaly Tuzov
2018-03-29 20:57:02 +03:00
parent fb6db3dcfc
commit ccd16f107d
2 changed files with 50 additions and 0 deletions
+5
View File
@@ -478,6 +478,11 @@ static bool ipp_Mat_setTo_Mat(Mat &dst, Mat &_val, Mat &mask)
if(dst.channels() > 4)
return false;
if (dst.depth() == CV_32F)
for (int i = 0; i < (int)(_val.total()); i++)
if (_val.at<double>(i) < iwTypeGetMin(ipp32f) || _val.at<double>(i) > iwTypeGetMax(ipp32f))
return false;
if(dst.dims <= 2)
{
IppiSize size = ippiSize(dst.size());