Package boofcv.alg.filter.derivative
Class GradientTwo0
java.lang.Object
boofcv.alg.filter.derivative.GradientTwo0
Computes 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Kernel1D
getKernelX
(boolean isInteger) Returns the kernel for computing the derivative along the x-axis.static void
process
(GrayF32 orig, GrayF32 derivX, GrayF32 derivY, @Nullable ImageBorder_F32 border) Computes the derivative of anGrayF32
along the x and y axes.static void
process
(GrayS16 orig, GrayS16 derivX, GrayS16 derivY, @Nullable ImageBorder_S32 border) Computes the derivative of anGrayS16
along the x and y axes.static void
process
(GrayU8 orig, GrayS16 derivX, GrayS16 derivY, @Nullable ImageBorder_S32 border) Computes the derivative of anGrayU8
along the x and y axes.process
(I input, D derivX, D derivY, @Nullable ImageBorder border)
-
Field Details
-
kernelDeriv_I32
-
kernelDeriv_F32
-
-
Constructor Details
-
GradientTwo0
public GradientTwo0()
-
-
Method Details
-
getKernelX
Returns the kernel for computing the derivative along the x-axis. -
process
public static <I extends ImageGray<I>,D extends ImageGray<D>> void process(I input, D derivX, D derivY, @Nullable @Nullable ImageBorder border) -
process
public static void process(GrayU8 orig, GrayS16 derivX, GrayS16 derivY, @Nullable @Nullable ImageBorder_S32 border) Computes the derivative of anGrayU8
along 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(GrayS16 orig, GrayS16 derivX, GrayS16 derivY, @Nullable @Nullable ImageBorder_S32 border) Computes the derivative of anGrayS16
along 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(GrayF32 orig, GrayF32 derivX, GrayF32 derivY, @Nullable @Nullable ImageBorder_F32 border) Computes the derivative of anGrayF32
along 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.
-