Class Convolution



  • public class Convolution
    extends Object
    Generates various convolution kernels.
    Author:
    Kai Burjack
    • Constructor Detail

      • Convolution

        public Convolution​()
    • Method Detail

      • gaussianKernel

        public static void gaussianKernel​(int rows,
                                          int cols,
                                          float sigma,
                                          FloatBuffer dest)
        Generate a Gaussian convolution kernel with the given number of rows and columns, and store the factors in row-major order in dest.
        Parameters:
        rows - the number of rows (must be an odd number)
        cols - the number of columns (must be an odd number)
        sigma - the standard deviation of the filter kernel values
        dest - will hold the kernel factors in row-major order
      • gaussianKernel

        public static void gaussianKernel​(int rows,
                                          int cols,
                                          float sigma,
                                          float[] dest)
        Generate a Gaussian convolution kernel with the given number of rows and columns, and store the factors in row-major order in dest.
        Parameters:
        rows - the number of rows (must be an odd number)
        cols - the number of columns (must be an odd number)
        sigma - the standard deviation of the filter kernel values
        dest - will hold the kernel factors in row-major order