Class AnyImageDerivative<I extends ImageGray<I>,D extends ImageGray<D>>

java.lang.Object
boofcv.abst.filter.derivative.AnyImageDerivative<I,D>

public class AnyImageDerivative<I extends ImageGray<I>,D extends ImageGray<D>> extends Object

A helpful class which allows a derivative of any order to be computed from an input image using a simple to use interface. Higher order derivatives are computed from lower order derivatives. Derivatives are computed using convolution kernels and thus might not be as efficient as when using functions from FactoryDerivative.

  • Constructor Details

    • AnyImageDerivative

      public AnyImageDerivative(Kernel1D deriv, Class<I> inputType, Class<D> derivType)
      Constructor for 1D kernels.
      Parameters:
      deriv - 1D convolution kernel for computing derivative along x and y axises.
      inputType - The type of input image.
      derivType - Derivative image type
    • AnyImageDerivative

      public AnyImageDerivative(Kernel2D derivX, Class<I> inputType, Class<D> derivType)
      Constructor for 2D kernels.
      Parameters:
      derivX - 2D convolution kernel for computing derivative along x axis
      inputType - The type of input image.
      derivType - Derivative image type
    • AnyImageDerivative

      public AnyImageDerivative(ConvolveInterface<I,D> derivX, ConvolveInterface<I,D> derivY, ConvolveInterface<D,D> derivXX, ConvolveInterface<D,D> derivYY, Class<I> inputType, Class<D> derivType)
      Constructor for when all derivative filters are specified
      Parameters:
      derivX - Filter for computing derivative along x axis from input image.
      derivY - Filter for computing derivative along y axis from input image.
      derivXX - Filter for computing derivative along x axis from input image.
      derivYY - Filter for computing derivative along y axis from input image.
      inputType - The type of input image.
  • Method Details

    • setInput

      public void setInput(I input)
      Sets the new input image from which the image derivatives are computed from.
      Parameters:
      input - Input image.
    • getDerivative

      public D getDerivative(boolean... isX)
      Computes derivative images using previously computed lower level derivatives. Only computes/declares images as needed.