public void ContructFrom1dInput_Vertical() { var kernelLength = Kernels.Short.Sobel.yHorizontal.Length; var sY = new Kernel2D <short>(Kernels.Short.Sobel.yVertical, false, Allocator.Temp); sY.Print(); Assert.AreEqual(1, sY.Width); Assert.AreEqual(kernelLength, sY.Height); Assert.AreEqual(kernelLength, sY.Weights.Length); sY.Dispose(); }
public void ContructFrom2dInput() { var sY = new Kernel2D <short>(Kernels.Short.Sobel.X, Allocator.Temp); sY.Print(); AssertFlatRepresentationValid(Kernels.Short.Sobel.X, sY.Weights); sY.Dispose(); var sX = new Kernel2D <short>(Kernels.Short.Sobel.Y, Allocator.Temp); sX.Print(); AssertFlatRepresentationValid(Kernels.Short.Sobel.Y, sX.Weights); sX.Dispose(); }