Commit e9805e44 authored by Roman Donchenko's avatar Roman Donchenko

Fixed an overly-narrow assertion in cv::norm.

size() requires that the matrix is two-dimensional, and norm()
works on higher dimensions.
parent 07e08f7a
......@@ -2295,7 +2295,7 @@ static bool ocl_norm( InputArray _src1, InputArray _src2, int normType, double &
double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask )
{
CV_Assert( _src1.size() == _src2.size() && _src1.type() == _src2.type() );
CV_Assert( _src1.sameSize(_src2) && _src1.type() == _src2.type() );
double _result = 0;
if (ocl::useOpenCL() && _mask.empty() && _src1.isUMat() && _src2.isUMat() &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment