public static unsafe IImageFloat <TType> VerticalConvolution <TType>(this IReadOnlyImageFloat <TType> @this, float[] kernel, int topOffset) where TType : IImageType, new() { using (var pinKernel = new PinnedFloatBuffer(kernel)) { return(VerticalConvolution(@this, pinKernel.Ptr, topOffset, bottomOffset: kernel.Length - topOffset - 1)); } }
public static unsafe IImageFloat <TType> HorizontalConvolution <TType>(this IReadOnlyImageFloat <TType> @this, float[] kernel, int leftOffset) where TType : IImageType, new() { using (var pinKernel = new PinnedFloatBuffer(kernel)) { return(HorizontalConvolution(@this, pinKernel.Ptr, leftOffset, rightOffset: kernel.Length - leftOffset - 1)); } }