Class Convolution


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

      Constructors 
      Constructor Description
      Convolution()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      static void gaussianKernel​(int rows, int cols, float sigma, java.nio.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Convolution

        public Convolution()
    • Method Detail

      • gaussianKernel

        public static void gaussianKernel​(int rows,
                                          int cols,
                                          float sigma,
                                          java.nio.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