boofcv.alg.transform.ii
Class GIntegralImageOps
- java.lang.Object
-
- boofcv.alg.transform.ii.GIntegralImageOps
-
public class GIntegralImageOps extends java.lang.ObjectProvides a mechanism to callIntegralImageOpswith unknown types at compile time.
-
-
Constructor Summary
Constructors Constructor and Description GIntegralImageOps()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static <T extends ImageGray>
doubleblock_unsafe(T integral, int x0, int y0, int x1, int y1)Computes the value of a block inside an integral image without bounds checking.static <T extends ImageGray>
doubleblock_zero(T integral, int x0, int y0, int x1, int y1)Computes the value of a block inside an integral image and treats pixels outside of the image as zero.static <T extends ImageGray>
Tconvolve(T integral, IntegralKernel kernel, T output)General code for convolving a box filter across an image using the integral image.static <T extends ImageGray>
TconvolveBorder(T integral, IntegralKernel kernel, T output, int borderX, int borderY)Convolves the kernel only across the image's border.static <T extends ImageGray>
doubleconvolveSparse(T integral, IntegralKernel kernel, int x, int y)Convolves a kernel around a single point in the integral image.static <I extends ImageGray,II extends ImageGray>
java.lang.Class<II>getIntegralType(java.lang.Class<I> inputType)Given the input image, return the type of image the integral image should be.static <I extends ImageGray,T extends ImageGray>
Ttransform(I input, T transformed)Converts a regular image into an integral image.
-
-
-
Method Detail
-
getIntegralType
public static <I extends ImageGray,II extends ImageGray> java.lang.Class<II> getIntegralType(java.lang.Class<I> inputType)
Given the input image, return the type of image the integral image should be.
-
transform
public static <I extends ImageGray,T extends ImageGray> T transform(I input, T transformed)
Converts a regular image into an integral image.- Parameters:
input- Regular image. Not modified.transformed- Integral image. If null a new image will be created. Modified.- Returns:
- Integral image.
-
convolve
public static <T extends ImageGray> T convolve(T integral, IntegralKernel kernel, T output)
General code for convolving a box filter across an image using the integral image.- Parameters:
integral- Integral image.kernel- Convolution kernel.output- The convolved image. If null a new image will be declared and returned. Modified.- Returns:
- Convolved image.
-
convolveBorder
public static <T extends ImageGray> T convolveBorder(T integral, IntegralKernel kernel, T output, int borderX, int borderY)
Convolves the kernel only across the image's border.- Parameters:
integral- Integral image. Not modified.kernel- Convolution kernel.output- The convolved image. If null a new image will be created. Modified.borderX- Size of the image border along the horizontal axis.borderY- size of the image border along the vertical axis.
-
convolveSparse
public static <T extends ImageGray> double convolveSparse(T integral, IntegralKernel kernel, int x, int y)
Convolves a kernel around a single point in the integral image.- Parameters:
integral- Input integral image. Not modified.kernel- Convolution kernel.x- Pixel the convolution is performed at.y- Pixel the convolution is performed at.- Returns:
- Value of the convolution
-
block_zero
public static <T extends ImageGray> double block_zero(T integral, int x0, int y0, int x1, int y1)
Computes the value of a block inside an integral image and treats pixels outside of the image as zero. The block is defined as follows: x0 < x ≤ x1 and y0 < y ≤ y1.
- Parameters:
integral- Integral image.x0- Lower bound of the block. Exclusive.y0- Lower bound of the block. Exclusive.x1- Upper bound of the block. Inclusive.y1- Upper bound of the block. Inclusive.- Returns:
- Value inside the block.
-
block_unsafe
public static <T extends ImageGray> double block_unsafe(T integral, int x0, int y0, int x1, int y1)
Computes the value of a block inside an integral image without bounds checking. The block is defined as follows: x0 < x ≤ x1 and y0 < y ≤ y1.
- Parameters:
integral- Integral image.x0- Lower bound of the block. Exclusive.y0- Lower bound of the block. Exclusive.x1- Upper bound of the block. Inclusive.y1- Upper bound of the block. Inclusive.- Returns:
- Value inside the block.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG