Package boofcv.alg.filter.derivative
Class GradientTwo0
- java.lang.Object
-
- boofcv.alg.filter.derivative.GradientTwo0
-
public class GradientTwo0 extends java.lang.ObjectComputes the image's first derivative along the x and y axises using [-1 1] kernel, where the "center" of the kernel is on the -1.
The 1-D kernel allows the image's gradient to be computed efficiently but is more sensitive to local noise.
For example in an integer image:
derivX(x,y) = img(x+1,y) - img(x,y)
derivY(x,y) = img(x,y+1) - img(x,y)
-
-
Field Summary
Fields Modifier and Type Field Description static boofcv.struct.convolve.Kernel1D_F32kernelDeriv_F32static boofcv.struct.convolve.Kernel1D_S32kernelDeriv_I32
-
Constructor Summary
Constructors Constructor Description GradientTwo0()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boofcv.struct.convolve.Kernel1DgetKernelX(boolean isInteger)Returns the kernel for computing the derivative along the x-axis.static voidprocess(boofcv.struct.image.GrayF32 orig, boofcv.struct.image.GrayF32 derivX, boofcv.struct.image.GrayF32 derivY, boofcv.struct.border.ImageBorder_F32 border)Computes the derivative of anGrayF32along the x and y axes.static voidprocess(boofcv.struct.image.GrayS16 orig, boofcv.struct.image.GrayS16 derivX, boofcv.struct.image.GrayS16 derivY, boofcv.struct.border.ImageBorder_S32 border)Computes the derivative of anGrayS16along the x and y axes.static voidprocess(boofcv.struct.image.GrayU8 orig, boofcv.struct.image.GrayS16 derivX, boofcv.struct.image.GrayS16 derivY, boofcv.struct.border.ImageBorder_S32 border)Computes the derivative of anGrayU8along the x and y axes.static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>>
voidprocess(I input, D derivX, D derivY, boofcv.struct.border.ImageBorder border)
-
-
-
Method Detail
-
getKernelX
public static boofcv.struct.convolve.Kernel1D getKernelX(boolean isInteger)
Returns the kernel for computing the derivative along the x-axis.
-
process
public static <I extends boofcv.struct.image.ImageGray<I>,D extends boofcv.struct.image.ImageGray<D>> void process(I input, D derivX, D derivY, @Nullable boofcv.struct.border.ImageBorder border)
-
process
public static void process(boofcv.struct.image.GrayU8 orig, boofcv.struct.image.GrayS16 derivX, boofcv.struct.image.GrayS16 derivY, @Nullable boofcv.struct.border.ImageBorder_S32 border)Computes the derivative of anGrayU8along the x and y axes.- Parameters:
orig- Which which is to be differentiated. Not Modified.derivX- Derivative along the x-axis. Modified.derivY- Derivative along the y-axis. Modified.border- Specifies how the image border is handled. If null the border is not processed.
-
process
public static void process(boofcv.struct.image.GrayS16 orig, boofcv.struct.image.GrayS16 derivX, boofcv.struct.image.GrayS16 derivY, @Nullable boofcv.struct.border.ImageBorder_S32 border)Computes the derivative of anGrayS16along the x and y axes.- Parameters:
orig- Which which is to be differentiated. Not Modified.derivX- Derivative along the x-axis. Modified.derivY- Derivative along the y-axis. Modified.border- Specifies how the image border is handled. If null the border is not processed.
-
process
public static void process(boofcv.struct.image.GrayF32 orig, boofcv.struct.image.GrayF32 derivX, boofcv.struct.image.GrayF32 derivY, @Nullable boofcv.struct.border.ImageBorder_F32 border)Computes the derivative of anGrayF32along the x and y axes.- Parameters:
orig- Which which is to be differentiated. Not Modified.derivX- Derivative along the x-axis. Modified.derivY- Derivative along the y-axis. Modified.border- Specifies how the image border is handled. If null the border is not processed.
-
-