Package boofcv.factory.filter.derivative
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 Summary
Constructors Constructor Description FactoryDerivative()
-
Method Summary
Modifier and Type Method Description static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>gaussian(double sigma, int radius, Class<I> inputType, @Nullable Class<D> derivType)
static <I extends ImageBase<I>, D extends ImageBase<D>>
ImageGradient<I,D>gradient(DerivativeType type, ImageType<I> inputType, @Nullable ImageType<D> derivType)
Creates aImageGradient
for an arbitrary image type.static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<Planar<I>,Planar<D>>gradientPL(DerivativeType type, int numBands, Class<I> inputType, @Nullable Class<D> derivType)
Returns the gradient filter for planar images of the specified type.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 resultsstatic <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>gradientSB(DerivativeType type, Class<I> inputType, @Nullable Class<D> derivType)
Returns the gradient filter for single band images of the specified type.static <D extends ImageGray<D>>
ImageHessian<D>hessian(Class<?> gradientType, @Nullable Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageHessianDirect<I,D>hessianDirectThree(Class<I> inputType, @Nullable Class<D> derivType)
static <D extends ImageGray<D>>
ImageHessian<D>hessianPrewitt(Class<D> derivType)
static <D extends ImageGray<D>>
ImageHessian<D>hessianSobel(Class<D> derivType)
static <D extends ImageGray<D>>
ImageHessian<D>hessianThree(Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>prewitt(Class<I> inputType, @Nullable Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>scharr(Class<I> inputType, @Nullable Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>sobel(Class<I> inputType, @Nullable Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>three(Class<I> inputType, @Nullable Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>two0(Class<I> inputType, @Nullable Class<D> derivType)
static <I extends ImageGray<I>, D extends ImageGray<D>>
ImageGradient<I,D>two1(Class<I> inputType, @Nullable Class<D> derivType)
-
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 typeM
- Intermediate typeD
- Output type- Parameters:
gradient
- Computes the multi-band image gradienttype
- Specifies which method is to be used to reduce the output into single band imageoutputType
- 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 byBoofDefaults.DERIV_BORDER_TYPE
- Type Parameters:
I
- Input imageD
- Derivative image- Parameters:
type
- Type of gradientinputType
- Type of input imagederivType
- 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 byBoofDefaults.DERIV_BORDER_TYPE
- Type Parameters:
I
- Image typeD
- Derivative type- Parameters:
type
- Which gradient to computenumBands
- Number of bands in the imageinputType
- Type of data on inputderivType
- 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 aImageGradient
for an arbitrary image type. The border will be handled using the approach specified byBoofDefaults.DERIV_BORDER_TYPE
- Type Parameters:
I
- Image typeD
- Derivative type- Parameters:
type
- Which gradient to computeinputType
- Type of data on inputderivType
- 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
-
hessianPrewitt
-
hessianThree
-