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 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.
    • 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.