Class GeometricMeanFilter

java.lang.Object
boofcv.alg.filter.blur.impl.GeometricMeanFilter

@Generated("boofcv.alg.filter.blur.impl.GenerateGeometricMeanFilter") public class GeometricMeanFilter extends Object
Implementation of Geometric Mean filter as describes in [1] with modifications to avoid numerical issues.

Compute a scale factor so that the average pixel intensity will be one. As a result, after scaling, the product of pixel values will also be close to 1, avoiding over and under flow issues.

NOTE: This could be made MUCH faster using a similar technique to how the mean filter is done by separating x and y axis computations. This has not been done yet since it's not yet a bottleneck in any application. Maybe you would want to add it?

  1. Rafael C. Gonzalez and Richard E. Woods, "Digital Image Processing" 4nd Ed. 2018.

DO NOT MODIFY. Automatically generated code created by GenerateGeometricMeanFilter

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    filter(GrayF32 src, int radiusX, int radiusY, float mean, GrayF32 dst)
    Applies the geometric mean blur operator.
    static void
    filter(GrayF64 src, int radiusX, int radiusY, double mean, GrayF64 dst)
    Applies the geometric mean blur operator.
    static void
    filter(GrayU16 src, int radiusX, int radiusY, double mean, GrayU16 dst)
    Applies the geometric mean blur operator.
    static void
    filter(GrayU8 src, int radiusX, int radiusY, double mean, GrayU8 dst)
    Applies the geometric mean blur operator.
    static <T extends ImageGray<T>>
    void
    filter(T src, int radiusX, int radiusY, double mean, T dst)
    Applies filter with type determined at runtime.

    Methods inherited from class java.lang.Object

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

    • GeometricMeanFilter

      public GeometricMeanFilter()
  • Method Details

    • filter

      public static <T extends ImageGray<T>> void filter(T src, int radiusX, int radiusY, double mean, T dst)
      Applies filter with type determined at runtime.
    • filter

      public static void filter(GrayU8 src, int radiusX, int radiusY, double mean, GrayU8 dst)
      Applies the geometric mean blur operator.
      Parameters:
      src - Input image
      radiusX - Region's radius along x-axis
      radiusY - Region's radius along y-axis
      mean - Mean of input image. Used to scale pixel values so that they average 1.0
      dst - Output image with results
    • filter

      public static void filter(GrayU16 src, int radiusX, int radiusY, double mean, GrayU16 dst)
      Applies the geometric mean blur operator.
      Parameters:
      src - Input image
      radiusX - Region's radius along x-axis
      radiusY - Region's radius along y-axis
      mean - Mean of input image. Used to scale pixel values so that they average 1.0
      dst - Output image with results
    • filter

      public static void filter(GrayF32 src, int radiusX, int radiusY, float mean, GrayF32 dst)
      Applies the geometric mean blur operator.
      Parameters:
      src - Input image
      radiusX - Region's radius along x-axis
      radiusY - Region's radius along y-axis
      mean - Mean of input image. Used to scale pixel values so that they average 1.0
      dst - Output image with results
    • filter

      public static void filter(GrayF64 src, int radiusX, int radiusY, double mean, GrayF64 dst)
      Applies the geometric mean blur operator.
      Parameters:
      src - Input image
      radiusX - Region's radius along x-axis
      radiusY - Region's radius along y-axis
      mean - Mean of input image. Used to scale pixel values so that they average 1.0
      dst - Output image with results