Calculates an average (mean) of array elements. The function mean calculates the mean value M of array elements, independently for each channel, and return it: N = sum(by: I: mask(I) != 0) 1 M_c = (sum(by: I: mask(I) != 0)(mtx(I)_c))/N W
(Mat src, Mat mask)