Package boofcv.alg.filter.derivative
Class GImageDerivativeOps
- java.lang.Object
-
- boofcv.alg.filter.derivative.GImageDerivativeOps
-
public class GImageDerivativeOps extends java.lang.ObjectGeneralized operations related to compute different image derivatives.
-
-
Constructor Summary
Constructors Constructor Description GImageDerivativeOps()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boofcv.struct.border.ImageBorder_F32borderDerivative_F32()Creates a new instance of the default border for derivatives of GrayF32static boofcv.struct.border.ImageBorder_S32borderDerivative_I32()Creates a new instance of the default border for derivatives of integer imagesstatic <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
AnyImageDerivative<I,D>createAnyDerivatives(DerivativeType type, java.lang.Class<I> inputType, java.lang.Class<D> derivType)Convenience function for creating an instance ofAnyImageDerivative.static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
AnyImageDerivative<I,D>derivativeForScaleSpace(java.lang.Class<I> inputType, java.lang.Class<D> derivType)Creates an instance ofAnyImageDerivativewhich is intended for use of calculating scale-spaces.static <I extends boofcv.struct.image.ImageBase<I>,D extends boofcv.struct.image.ImageBase<D>>
boofcv.struct.image.ImageType<D>getDerivativeType(boofcv.struct.image.ImageType<I> imageType)static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
java.lang.Class<D>getDerivativeType(java.lang.Class<I> imageType)Returns the type of image the derivative should be for the specified input type.static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
voidgradient(DerivativeType type, I input, D derivX, D derivY, boofcv.struct.border.BorderType borderType)Computes the gradient using the specified image type.static <D extends boofcv.struct.image.ImageGray<D>>
voidhessian(DerivativeType type, D derivX, D derivY, D derivXX, D derivYY, D derivXY, boofcv.struct.border.BorderType borderType)Computes the hessian from the gradient.static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
voidhessian(DerivativeType type, I input, D derivXX, D derivYY, D derivXY, boofcv.struct.border.BorderType borderType)Computes the hessian from the original input image.static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
voidlaplace(I input, D output, boofcv.struct.border.BorderType borderType)static boofcv.struct.convolve.KernelBaselookupKernelX(DerivativeType type, boolean isInteger)Returns the kernel for finding the X derivative.
-
-
-
Method Detail
-
laplace
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> void laplace(I input, D output, boofcv.struct.border.BorderType borderType)
-
getDerivativeType
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> java.lang.Class<D> getDerivativeType(java.lang.Class<I> imageType)
Returns the type of image the derivative should be for the specified input type.- Parameters:
imageType- Input image type.- Returns:
- Appropriate output image type.
-
getDerivativeType
public static <I extends boofcv.struct.image.ImageBase<I>,D extends boofcv.struct.image.ImageBase<D>> boofcv.struct.image.ImageType<D> getDerivativeType(boofcv.struct.image.ImageType<I> imageType)
-
gradient
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> void gradient(DerivativeType type, I input, D derivX, D derivY, boofcv.struct.border.BorderType borderType)
Computes the gradient using the specified image type.- Type Parameters:
I- Input image typeD- Output image type- Parameters:
type- Type of gradient to computeinput- Input imagederivX- Output. Derivative XderivY- Output. Derivative YborderType- How it should handle borders. null == skip border
-
hessian
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> void hessian(DerivativeType type, I input, D derivXX, D derivYY, D derivXY, boofcv.struct.border.BorderType borderType)
Computes the hessian from the original input image. Only Sobel and Three supported.- Type Parameters:
I- Input image typeD- Output image type- Parameters:
type- Type of gradient to computeinput- Input imagederivXX- Output. Derivative XXderivYY- Output. Derivative YYderivXY- Output. Derivative XYborderType- How it should handle borders. null == skip border
-
hessian
public static <D extends boofcv.struct.image.ImageGray<D>> void hessian(DerivativeType type, D derivX, D derivY, D derivXX, D derivYY, D derivXY, boofcv.struct.border.BorderType borderType)
Computes the hessian from the gradient. Only Prewitt, Sobel and Three supported.- Parameters:
type- Type of gradient to computederivX- Input derivative XderivY- Input derivative YderivXX- Output. Derivative XXderivYY- Output. Derivative YYderivXY- Output. Derivative XYborderType- How it should handle borders. null == skip border
-
lookupKernelX
public static boofcv.struct.convolve.KernelBase lookupKernelX(DerivativeType type, boolean isInteger)
Returns the kernel for finding the X derivative.- Parameters:
type- Type of gradientisInteger- integer or floating point kernels- Returns:
- The kernel. Can be 1D or 2D
-
createAnyDerivatives
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> AnyImageDerivative<I,D> createAnyDerivatives(DerivativeType type, java.lang.Class<I> inputType, java.lang.Class<D> derivType)
Convenience function for creating an instance of
AnyImageDerivative. This class is an any way to compute any derivative of any order using the specified kernel. It might use more memory or be more expensive the specialized code but is easy to use.- Type Parameters:
I- Image type.D- Image derivative type.- Parameters:
type- Type of gradient to useinputType- Type of input image.derivType- Type of derivative image- Returns:
- AnyImageDerivative
-
derivativeForScaleSpace
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> AnyImageDerivative<I,D> derivativeForScaleSpace(java.lang.Class<I> inputType, java.lang.Class<D> derivType)
Creates an instance ofAnyImageDerivativewhich is intended for use of calculating scale-spaces. It usesDerivativeType.THREEsince it does not blur the image. More typical operators, such as Sobel and Prewitt, blur the image.- Type Parameters:
I- Image type.D- Image derivative type.- Parameters:
inputType- Type of input image.derivType- Type of derivative image- Returns:
- AnyImageDerivative
-
borderDerivative_I32
public static boofcv.struct.border.ImageBorder_S32 borderDerivative_I32()
Creates a new instance of the default border for derivatives of integer images
-
borderDerivative_F32
public static boofcv.struct.border.ImageBorder_F32 borderDerivative_F32()
Creates a new instance of the default border for derivatives of GrayF32
-
-