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