public static Matrix <byte> DrawHog(Array2DMatrixBase hogImage, int cellDrawSize = 15, float minResponseThreshold = 0.0f) { if (hogImage == null) { throw new ArgumentNullException(nameof(hogImage)); } if (!(cellDrawSize > 0)) { throw new ArgumentOutOfRangeException(nameof(cellDrawSize)); } hogImage.ThrowIfDisposed(nameof(hogImage)); var inType = hogImage.MatrixElementType.ToNativeMatrixElementType(); var ret = Native.draw_fhog(inType, hogImage.NativePtr, cellDrawSize, minResponseThreshold, out var outMatrix); switch (ret) { case Native.ErrorType.InputElementTypeNotSupport: throw new ArgumentException($"Input {inType} is not supported."); } return(new Matrix <byte>(outMatrix, MatrixElementTypes.UInt8)); }