Class GBlurImageOps

java.lang.Object
boofcv.alg.filter.blur.GBlurImageOps

public class GBlurImageOps extends Object
Generalized functions for applying different image blur operators. Invokes functions from BlurImageOps, which provides type specific functions.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends ImageBase<T>>
    T
    gaussian(T input, T output, double sigmaX, int radiusX, double sigmaY, int radiusY, @Nullable ImageBase storage)
    Applies Gaussian blur to a ImageGray
    static <T extends ImageBase<T>>
    T
    gaussian(T input, T output, double sigma, int radius, @Nullable ImageBase storage)
    Applies Gaussian blur to a ImageGray
    static <T extends ImageBase<T>>
    T
    mean(T input, T output, int radiusX, int radiusY, @Nullable ImageBase storage, @Nullable GrowArray workVert)
    Applies a mean box filter with re-weighted borders.
    static <T extends ImageBase<T>>
    T
    mean(T input, T output, int radius, @Nullable ImageBase storage, @Nullable GrowArray workVert)
    Applies a mean box filter.
    static <T extends ImageBase<T>>
    T
    meanAdaptive(T input, T output, int radiusX, int radiusY, double noiseVariance)
    Adaptive applies mean blur filter while maintaining edge sharpness with re-weighted image borders.
    static <T extends ImageBase<T>>
    T
    meanB(T input, T output, int radiusX, int radiusY, @Nullable ImageBorder<T> border, @Nullable ImageBase storage, @Nullable GrowArray workVert)
    Applies a mean box filter with borders.
    static <T extends ImageBase<T>>
    T
    meanGeometric(T input, T output, int radiusX, int radiusY)
    Applies a geometric mean box filter with re-weighted image borders.
    static <T extends ImageBase<T>>
    T
    median(T input, T output, int radiusX, int radiusY, @Nullable GrowArray<?> work)
    Applies a median filter.
    static <T extends ImageBase<T>>
    T
    median(T input, T output, int radius, @Nullable GrowArray<?> work)
    Applies a median filter.

    Methods inherited from class java.lang.Object

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

    • GBlurImageOps

      public GBlurImageOps()
  • Method Details

    • mean

      public static <T extends ImageBase<T>> T mean(T input, @Nullable T output, int radius, @Nullable @Nullable ImageBase storage, @Nullable @Nullable GrowArray workVert)
      Applies a mean box filter.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radius - Radius of the box blur function.
      storage - (Optional) Storage for intermediate results. Same size as input image. Can be null.
      Returns:
      Output blurred image.
    • mean

      public static <T extends ImageBase<T>> T mean(T input, @Nullable T output, int radiusX, int radiusY, @Nullable @Nullable ImageBase storage, @Nullable @Nullable GrowArray workVert)
      Applies a mean box filter with re-weighted borders.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radiusX - Radius of the box blur function along the x-axis
      radiusY - Radius of the box blur function along the y-axis.
      storage - (Optional) Storage for intermediate results. Same size as input image. Can be null.
      Returns:
      Output blurred image.
    • meanB

      public static <T extends ImageBase<T>> T meanB(T input, @Nullable T output, int radiusX, int radiusY, @Nullable @Nullable ImageBorder<T> border, @Nullable @Nullable ImageBase storage, @Nullable @Nullable GrowArray workVert)
      Applies a mean box filter with borders.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radiusX - Radius of the box blur function along the x-axis
      radiusY - Radius of the box blur function along the y-axis
      border - (Optional) Specified how the image borders are handled. If null then only the inner portion is processed.
      storage - (Optional) Storage for intermediate results. Same size as input image. Can be null.
      Returns:
      Output blurred image.
    • meanGeometric

      public static <T extends ImageBase<T>> T meanGeometric(T input, @Nullable T output, int radiusX, int radiusY)
      Applies a geometric mean box filter with re-weighted image borders.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radiusX - Radius of the box blur function along the x-axis
      radiusY - Radius of the box blur function along the y-axis.
      Returns:
      Output blurred image.
    • meanAdaptive

      public static <T extends ImageBase<T>> T meanAdaptive(T input, @Nullable T output, int radiusX, int radiusY, double noiseVariance)
      Adaptive applies mean blur filter while maintaining edge sharpness with re-weighted image borders.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radiusX - Radius of the box blur function along the x-axis
      radiusY - Radius of the box blur function along the y-axis.
      noiseVariance - Amount of additive pixel noise
      Returns:
      Output blurred image.
    • median

      public static <T extends ImageBase<T>> T median(T input, @Nullable T output, int radius, @Nullable @Nullable GrowArray<?> work)
      Applies a median filter.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radius - Size of the filter region.
      work - (Optional) Creates local workspace arrays. Nullable.
      Returns:
      Output blurred image.
    • median

      public static <T extends ImageBase<T>> T median(T input, @Nullable T output, int radiusX, int radiusY, @Nullable @Nullable GrowArray<?> work)
      Applies a median filter.
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      radiusX - Size of the filter region. x-axis
      radiusY - Size of the filter region. Y-axis
      work - (Optional) Creates local workspace arrays. Nullable.
      Returns:
      Output blurred image.
    • gaussian

      public static <T extends ImageBase<T>> T gaussian(T input, @Nullable T output, double sigma, int radius, @Nullable @Nullable ImageBase storage)
      Applies Gaussian blur to a ImageGray
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      sigma - Gaussian distribution's sigma. If ≤ 0 then will be selected based on radius.
      radius - Radius of the Gaussian blur function. If ≤ 0 then radius will be determined by sigma.
      storage - (Optional) Storage for intermediate results. Same size as input image. Can be null.
      Returns:
      Output blurred image.
    • gaussian

      public static <T extends ImageBase<T>> T gaussian(T input, @Nullable T output, double sigmaX, int radiusX, double sigmaY, int radiusY, @Nullable @Nullable ImageBase storage)
      Applies Gaussian blur to a ImageGray
      Type Parameters:
      T - Input image type.
      Parameters:
      input - Input image. Not modified.
      output - (Optional) Storage for output image, Can be null. Modified.
      sigmaX - Gaussian distribution's sigma along x-axis. If ≤ 0 then will be selected based on radius.
      radiusX - Radius of the Gaussian blur function along x-axis. If ≤ 0 then radius will be determined by sigma.
      sigmaY - Gaussian distribution's sigma along y-axis. If ≤ 0 then will be selected based on radius.
      radiusY - Radius of the Gaussian blur function along y-axis. If ≤ 0 then radius will be determined by sigma.
      storage - (Optional) Storage for intermediate results. Same size as input image. Can be null.
      Returns:
      Output blurred image.