Package boofcv.alg.filter.convolve
Class ConvolveImageNoBorderSparse
java.lang.Object
boofcv.alg.filter.convolve.ConvolveImageNoBorderSparse
Performs a convolution around a single pixel only. The whole kernel must be contained inside the image, border
cases are not handled. Sparse convolutions are useful when sub-sampling an image.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
convolve
(Kernel1D_F32 horizontal, Kernel1D_F32 vertical, GrayF32 input, int c_x, int c_y, float[] storage) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.static float
convolve
(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.static float
convolve
(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.static float
convolve
(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.static float
convolve
(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.
-
Constructor Details
-
ConvolveImageNoBorderSparse
public ConvolveImageNoBorderSparse()
-
-
Method Details
-
convolve
public static float convolve(Kernel1D_F32 horizontal, Kernel1D_F32 vertical, GrayF32 input, int c_x, int c_y, float[] storage) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.- Parameters:
horizontal
- Horizontal convolution kernel. Not modified.vertical
- Vertical convolution kernel. Not modified.input
- Image that is being convolved. Not modified.c_x
- Pixel the convolution is centered around. x-coordinate.c_y
- Pixel the convolution is centered around. y-coordinate.storage
- Must be as long as the kernel's width.- Returns:
- The pixel's value after the convolution
-
convolve
public static float convolve(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.- Parameters:
horizontal
- Horizontal convolution kernel. Not modified.vertical
- Vertical convolution kernel. Not modified.input
- Image that is being convolved. Not modified.c_x
- Pixel the convolution is centered around. x-coordinate.c_y
- Pixel the convolution is centered around. y-coordinate.storage
- Must be as long as the kernel's width.- Returns:
- The pixel's value after the convolution
-
convolve
public static float convolve(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction.- Parameters:
horizontal
- Horizontal convolution kernel. Not modified.vertical
- Vertical convolution kernel. Not modified.input
- Image that is being convolved. Not modified.c_x
- Pixel the convolution is centered around. x-coordinate.c_y
- Pixel the convolution is centered around. y-coordinate.storage
- Must be as long as the kernel's width.- Returns:
- The pixel's value after the convolution
-
convolve
public static float convolve(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayU8 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction. The convolution sum is divided by the specified divisors in the horizontal and vertical direction.- Parameters:
horizontal
- Horizontal convolution kernel. Not modified.vertical
- Vertical convolution kernel. Not modified.input
- Image that is being convolved. Not modified.c_x
- Pixel the convolution is centered around. x-coordinate.c_y
- Pixel the convolution is centered around. y-coordinate.storage
- Must be as long as the kernel's width.divisorHorizontal
- Divisor for horizontal convolution.divisorVertical
- Divisor for vertical convolution.- Returns:
- The pixel's value after the convolution
-
convolve
public static float convolve(Kernel1D_S32 horizontal, Kernel1D_S32 vertical, GrayS16 input, int c_x, int c_y, int[] storage, int divisorHorizontal, int divisorVertical) Convolves a 1D kernels around the specified pixel in the horizontal and vertical direction. The convolution sum is divided by the specified divisors in the horizontal and vertical direction.- Parameters:
horizontal
- Horizontal convolution kernel. Not modified.vertical
- Vertical convolution kernel. Not modified.input
- Image that is being convolved. Not modified.c_x
- Pixel the convolution is centered around. x-coordinate.c_y
- Pixel the convolution is centered around. y-coordinate.storage
- Must be as long as the kernel's width.divisorHorizontal
- Divisor for horizontal convolution.divisorVertical
- Divisor for vertical convolution.- Returns:
- The pixel's value after the convolution
-