提交 09134ac8 编写于 作者: A Alexander Alekhin

core: emit warning ONCE on ambiguous MatExpr processing

上级 396f43d6
......@@ -10,6 +10,7 @@
// */
#include "precomp.hpp"
#include <opencv2/core/utils/logger.hpp>
namespace cv
{
......@@ -1319,10 +1320,18 @@ void MatOp_AddEx::assign(const MatExpr& e, Mat& m, int _type) const
cv::add(dst, e.s, dst);
}
else
{
if (e.a.channels() > 1)
CV_LOG_ONCE_WARNING(NULL, "OpenCV/MatExpr: processing of multi-channel arrays might be changed in the future: "
"https://github.com/opencv/opencv/issues/16739");
cv::addWeighted(e.a, e.alpha, e.b, e.beta, e.s[0], dst);
}
}
else if( e.s.isReal() && (dst.data != m.data || fabs(e.alpha) != 1))
{
if (e.a.channels() > 1)
CV_LOG_ONCE_WARNING(NULL, "OpenCV/MatExpr: processing of multi-channel arrays might be changed in the future: "
"https://github.com/opencv/opencv/issues/16739");
e.a.convertTo(m, _type, e.alpha, e.s[0]);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册