Agree to rename.
Don't like the idea to use countNonZero( compare() ), as it works with
single chanels only.

Why it is better to use  absdiff instead of just substract()? As we count
num of different values in the next line - why we should add more
operations on data?


On Fri, Mar 21, 2014 at 12:59 PM, Andrey Pavlenko
<notifications@github.com>wrote:

> In modules/ts/src/ocl_test.cpp:
>
> > @@ -314,4 +314,12 @@ void TestUtils::showDiff(InputArray _src, InputArray _gold, InputArray _actual,
> >      }
> >  }
> >
> > +int TestUtils::checkNumDiffs(
> InputArray m1, InputArray m2)
> > +{
> > +    Mat diff;
> > +    //diff is result of substract
> > +    subtract(m1, m2, diff);
> > +    return countNonZero(diff);
>
> countNonZero works with single channel Mat-s, so I suggest use
> diff.reshape(1).
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Itseez/opencv/pull/2499/files#r10829661>
> .
>