OpenCvSharp.Cv2.Mean C# (CSharp) Method

Mean() public static method

computes mean value of selected array elements
public static Mean ( InputArray src, InputArray mask = null ) : Scalar
src InputArray The source array; it should have 1 to 4 channels /// (so that the result can be stored in Scalar)
mask InputArray The optional operation mask
return Scalar
        public static Scalar Mean(InputArray src, InputArray mask = null)
        {
            if (src == null)
                throw new ArgumentNullException(nameof(src));
            src.ThrowIfDisposed();
            var ret = NativeMethods.core_mean(src.CvPtr, ToPtr(mask));
            GC.KeepAlive(src);
            GC.KeepAlive(mask);
            return ret;
        }
        #endregion
Cv2