mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #16948 from alalek:warning_16739
This commit is contained in:
commit
9109cb1ec6
@ -10,6 +10,7 @@
|
|||||||
// */
|
// */
|
||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
#include <opencv2/core/utils/logger.hpp>
|
||||||
|
|
||||||
namespace cv
|
namespace cv
|
||||||
{
|
{
|
||||||
@ -1319,10 +1320,18 @@ void MatOp_AddEx::assign(const MatExpr& e, Mat& m, int _type) const
|
|||||||
cv::add(dst, e.s, dst);
|
cv::add(dst, e.s, dst);
|
||||||
}
|
}
|
||||||
else
|
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);
|
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))
|
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]);
|
e.a.convertTo(m, _type, e.alpha, e.s[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user