OpenCvSharp.Cv2.Add C# (CSharp) Method

Add() public static method

Computes the per-element sum of two arrays or an array and a scalar.
public static Add ( InputArray src1, InputArray src2, OutputArray dst, InputArray mask = null, int dtype = -1 ) : void
src1 InputArray The first source array
src2 InputArray The second source array. It must have the same size and same type as src1
dst OutputArray The destination array; it will have the same size and same type as src1
mask InputArray The optional operation mask, 8-bit single channel array; specifies elements of the destination array to be changed. [By default this is null]
dtype int
return void
        public static void Add(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = null, int dtype = -1)
        {
            if (src1 == null)
                throw new ArgumentNullException(nameof(src1));
            if (src2 == null)
                throw new ArgumentNullException(nameof(src2));
            if (dst == null)
                throw new ArgumentNullException(nameof(dst));
            src1.ThrowIfDisposed();
            src2.ThrowIfDisposed();
            dst.ThrowIfNotReady();
            NativeMethods.core_add(src1.CvPtr, src2.CvPtr, dst.CvPtr, ToPtr(mask), dtype);
            GC.KeepAlive(src1);
            GC.KeepAlive(src2);
            dst.Fix();
        }
        #endregion
Cv2