OpenCvSharp.Cv2.SetIdentity C# (CSharp) Method

SetIdentity() public static method

initializes scaled identity matrix
public static SetIdentity ( InputOutputArray mtx, Scalar s = null ) : void
mtx InputOutputArray The matrix to initialize (not necessarily square)
s Scalar The value to assign to the diagonal elements
return void
        public static void SetIdentity(InputOutputArray mtx, Scalar? s = null)
        {
            if (mtx == null)
                throw new ArgumentNullException(nameof(mtx));
            mtx.ThrowIfNotReady();
            Scalar s0 = s.GetValueOrDefault(new Scalar(1));
            NativeMethods.core_setIdentity(mtx.CvPtr, s0);
            mtx.Fix();
        }
        #endregion
Cv2