Class FactoryDerivative

java.lang.Object
boofcv.factory.filter.derivative.FactoryDerivative

public class FactoryDerivative
extends Object

Factory for creating different types of ImageGradient, which are used to compute the image's derivative.

  • Constructor Details

    • FactoryDerivative

      public FactoryDerivative()
  • Method Details

    • gradientReduce

      public static <I extends ImageMultiBand<I>,​ M extends ImageMultiBand<M>,​ D extends ImageGray<D>> ImageGradient<I,​D> gradientReduce​(ImageGradient<I,​M> gradient, DerivativeReduceType type, Class<D> outputType)
      Computes the image gradient inside a multi-band image then reduces the output to a single band before returning the results
      Type Parameters:
      I - Input type
      M - Intermediate type
      D - Output type
      Parameters:
      gradient - Computes the multi-band image gradient
      type - Specifies which method is to be used to reduce the output into single band image
      outputType - Type of output image
      Returns:
      Gradient
    • gradientSB

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> gradientSB​(DerivativeType type, Class<I> inputType, @Nullable @Nullable Class<D> derivType)
      Returns the gradient filter for single band images of the specified type. The border will be handled using the approach specified by BoofDefaults.DERIV_BORDER_TYPE
      Type Parameters:
      I - Input image
      D - Derivative image
      Parameters:
      type - Type of gradient
      inputType - Type of input image
      derivType - Type of gradient image. null for default
      Returns:
      gradient filter
    • gradientPL

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<Planar<I>,​Planar<D>> gradientPL​(DerivativeType type, int numBands, Class<I> inputType, @Nullable @Nullable Class<D> derivType)
      Returns the gradient filter for planar images of the specified type. The border will be handled using the approach specified by BoofDefaults.DERIV_BORDER_TYPE
      Type Parameters:
      I - Image type
      D - Derivative type
      Parameters:
      type - Which gradient to compute
      numBands - Number of bands in the image
      inputType - Type of data on input
      derivType - Type of data on output (null for default)
      Returns:
      the filter
    • gradient

      public static <I extends ImageBase<I>,​ D extends ImageBase<D>> ImageGradient<I,​D> gradient​(DerivativeType type, ImageType<I> inputType, @Nullable @Nullable ImageType<D> derivType)
      Creates a ImageGradient for an arbitrary image type. The border will be handled using the approach specified by BoofDefaults.DERIV_BORDER_TYPE
      Type Parameters:
      I - Image type
      D - Derivative type
      Parameters:
      type - Which gradient to compute
      inputType - Type of data on input
      derivType - Type of data on output (null for default)
    • prewitt

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> prewitt​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • sobel

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> sobel​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • scharr

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> scharr​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • three

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> three​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • two0

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> two0​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • two1

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> two1​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • hessianDirectThree

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageHessianDirect<I,​D> hessianDirectThree​(Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • hessian

      public static <D extends ImageGray<D>> ImageHessian<D> hessian​(Class<?> gradientType, @Nullable @Nullable Class<D> derivType)
    • gaussian

      public static <I extends ImageGray<I>,​ D extends ImageGray<D>> ImageGradient<I,​D> gaussian​(double sigma, int radius, Class<I> inputType, @Nullable @Nullable Class<D> derivType)
    • hessianSobel

      public static <D extends ImageGray<D>> ImageHessian<D> hessianSobel​(Class<D> derivType)
    • hessianPrewitt

      public static <D extends ImageGray<D>> ImageHessian<D> hessianPrewitt​(Class<D> derivType)
    • hessianThree

      public static <D extends ImageGray<D>> ImageHessian<D> hessianThree​(Class<D> derivType)