Class ConvolveImageNoBorderSparse

java.lang.Object
boofcv.alg.filter.convolve.ConvolveImageNoBorderSparse

public class ConvolveImageNoBorderSparse
extends Object
Performs a convolution around a single pixel only. The whole kernel must be contained inside the image, border cases are not handled. Sparse convolutions are useful when sub-sampling an image.
  • Constructor Summary

    Constructors
    Constructor Description
    ConvolveImageNoBorderSparse()  
  • Method Summary

    Modifier and Type Method Description
    static float convolve​(Kernel1D_F32 horizontal, Kernel1D_F32 vertical, GrayF32 input, int c_x, int c_y, float[] storage)
    Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
    static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage)
    Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
    static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical)
    Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
    static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage)
    Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
    static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical)
    Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.

    Methods inherited from class java.lang.Object

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

    • ConvolveImageNoBorderSparse

      public ConvolveImageNoBorderSparse()
  • Method Details

    • convolve

      public static float convolve​(Kernel1D_F32 horizontal, Kernel1D_F32 vertical, GrayF32 input, int c_x, int c_y, float[] storage)
      Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
      Parameters:
      horizontal - Horizontal convolution kernel. Not modified.
      vertical - Vertical convolution kernel. Not modified.
      input - Image that is being convolved. Not modified.
      c_x - Pixel the convolution is centered around. x-coordinate.
      c_y - Pixel the convolution is centered around. y-coordinate.
      storage - Must be as long as the kernel's width.
      Returns:
      The pixel's value after the convolution
    • convolve

      public static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage)
      Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
      Parameters:
      horizontal - Horizontal convolution kernel. Not modified.
      vertical - Vertical convolution kernel. Not modified.
      input - Image that is being convolved. Not modified.
      c_x - Pixel the convolution is centered around. x-coordinate.
      c_y - Pixel the convolution is centered around. y-coordinate.
      storage - Must be as long as the kernel's width.
      Returns:
      The pixel's value after the convolution
    • convolve

      public static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage)
      Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
      Parameters:
      horizontal - Horizontal convolution kernel. Not modified.
      vertical - Vertical convolution kernel. Not modified.
      input - Image that is being convolved. Not modified.
      c_x - Pixel the convolution is centered around. x-coordinate.
      c_y - Pixel the convolution is centered around. y-coordinate.
      storage - Must be as long as the kernel's width.
      Returns:
      The pixel's value after the convolution
    • convolve

      public static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical)
      Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction. The convolution sum is divided by the specified divisors in the horizontal and vertical direction.
      Parameters:
      horizontal - Horizontal convolution kernel. Not modified.
      vertical - Vertical convolution kernel. Not modified.
      input - Image that is being convolved. Not modified.
      c_x - Pixel the convolution is centered around. x-coordinate.
      c_y - Pixel the convolution is centered around. y-coordinate.
      storage - Must be as long as the kernel's width.
      divisorHorizontal - Divisor for horizontal convolution.
      divisorVertical - Divisor for vertical convolution.
      Returns:
      The pixel's value after the convolution
    • convolve

      public static float convolve​(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical)
      Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction. The convolution sum is divided by the specified divisors in the horizontal and vertical direction.
      Parameters:
      horizontal - Horizontal convolution kernel. Not modified.
      vertical - Vertical convolution kernel. Not modified.
      input - Image that is being convolved. Not modified.
      c_x - Pixel the convolution is centered around. x-coordinate.
      c_y - Pixel the convolution is centered around. y-coordinate.
      storage - Must be as long as the kernel's width.
      divisorHorizontal - Divisor for horizontal convolution.
      divisorVertical - Divisor for vertical convolution.
      Returns:
      The pixel's value after the convolution