public class IntegralImageOps extends Object
Common operations for dealing with integral images.
| Constructor and Description |
|---|
IntegralImageOps() |
| Modifier and Type | Method and Description |
|---|---|
static float |
block_unsafe(ImageFloat32 integral,
int x0,
int y0,
int x1,
int y1)
Computes the value of a block inside an integral image without bounds checking.
|
static double |
block_unsafe(ImageFloat64 integral,
int x0,
int y0,
int x1,
int y1)
Computes the value of a block inside an integral image without bounds checking.
|
static int |
block_unsafe(ImageSInt32 integral,
int x0,
int y0,
int x1,
int y1)
Computes the value of a block inside an integral image without bounds checking.
|
static long |
block_unsafe(ImageSInt64 integral,
int x0,
int y0,
int x1,
int y1)
Computes the value of a block inside an integral image without bounds checking.
|
static float |
block_zero(ImageFloat32 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 double |
block_zero(ImageFloat64 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 int |
block_zero(ImageSInt32 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 long |
block_zero(ImageSInt64 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 ImageFloat32 |
convolve(ImageFloat32 integral,
IntegralKernel kernel,
ImageFloat32 output)
General code for convolving a box filter across an image using the integral image.
|
static ImageFloat64 |
convolve(ImageFloat64 integral,
IntegralKernel kernel,
ImageFloat64 output)
General code for convolving a box filter across an image using the integral image.
|
static ImageSInt32 |
convolve(ImageSInt32 integral,
IntegralKernel kernel,
ImageSInt32 output)
General code for convolving a box filter across an image using the integral image.
|
static ImageSInt64 |
convolve(ImageSInt64 integral,
IntegralKernel kernel,
ImageSInt64 output)
General code for convolving a box filter across an image using the integral image.
|
static ImageFloat32 |
convolveBorder(ImageFloat32 integral,
IntegralKernel kernel,
ImageFloat32 output,
int borderX,
int borderY)
Convolves the kernel only across the image's border.
|
static ImageFloat64 |
convolveBorder(ImageFloat64 integral,
IntegralKernel kernel,
ImageFloat64 output,
int borderX,
int borderY)
Convolves the kernel only across the image's border.
|
static ImageSInt32 |
convolveBorder(ImageSInt32 integral,
IntegralKernel kernel,
ImageSInt32 output,
int borderX,
int borderY)
Convolves the kernel only across the image's border.
|
static ImageSInt64 |
convolveBorder(ImageSInt64 integral,
IntegralKernel kernel,
ImageSInt64 output,
int borderX,
int borderY)
Convolves the kernel only across the image's border.
|
static float |
convolveSparse(ImageFloat32 integral,
IntegralKernel kernel,
int x,
int y)
Convolves a kernel around a single point in the integral image.
|
static double |
convolveSparse(ImageFloat64 integral,
IntegralKernel kernel,
int x,
int y)
Convolves a kernel around a single point in the integral image.
|
static int |
convolveSparse(ImageSInt32 integral,
IntegralKernel kernel,
int x,
int y)
Convolves a kernel around a single point in the integral image.
|
static long |
convolveSparse(ImageSInt64 integral,
IntegralKernel kernel,
int x,
int y)
Convolves a kernel around a single point in the integral image.
|
static boolean |
isInBounds(int x,
int y,
IntegralKernel kernel,
int width,
int height)
Checks to see if the kernel is applied at this specific spot if all the pixels
would be inside the image bounds or not
|
static void |
print(IntegralKernel kernel)
Prints out the kernel.
|
static ImageFloat32 |
transform(ImageFloat32 input,
ImageFloat32 transformed)
Converts a regular image into an integral image.
|
static ImageFloat64 |
transform(ImageFloat64 input,
ImageFloat64 transformed)
Converts a regular image into an integral image.
|
static ImageSInt32 |
transform(ImageSInt32 input,
ImageSInt32 transformed)
Converts a regular image into an integral image.
|
static ImageSInt64 |
transform(ImageSInt64 input,
ImageSInt64 transformed)
Converts a regular image into an integral image.
|
static ImageSInt32 |
transform(ImageUInt8 input,
ImageSInt32 transformed)
Converts a regular image into an integral image.
|
public static ImageFloat32 transform(ImageFloat32 input, ImageFloat32 transformed)
input - Regular image. Not modified.transformed - Integral image. If null a new image will be created. Modified.public static ImageFloat64 transform(ImageFloat64 input, ImageFloat64 transformed)
input - Regular image. Not modified.transformed - Integral image. If null a new image will be created. Modified.public static ImageSInt32 transform(ImageUInt8 input, ImageSInt32 transformed)
input - Regular image. Not modified.transformed - Integral image. If null a new image will be created. Modified.public static ImageSInt32 transform(ImageSInt32 input, ImageSInt32 transformed)
input - Regular image. Not modified.transformed - Integral image. If null a new image will be created. Modified.public static ImageSInt64 transform(ImageSInt64 input, ImageSInt64 transformed)
input - Regular image. Not modified.transformed - Integral image. If null a new image will be created. Modified.public static ImageFloat32 convolve(ImageFloat32 integral, IntegralKernel kernel, ImageFloat32 output)
integral - Integral image.kernel - Convolution kernel.output - The convolved image. If null a new image will be declared and returned. Modified.public static ImageFloat64 convolve(ImageFloat64 integral, IntegralKernel kernel, ImageFloat64 output)
integral - Integral image.kernel - Convolution kernel.output - The convolved image. If null a new image will be declared and returned. Modified.public static ImageSInt32 convolve(ImageSInt32 integral, IntegralKernel kernel, ImageSInt32 output)
integral - Integral image.kernel - Convolution kernel.output - The convolved image. If null a new image will be declared and returned. Modified.public static ImageSInt64 convolve(ImageSInt64 integral, IntegralKernel kernel, ImageSInt64 output)
integral - Integral image.kernel - Convolution kernel.output - The convolved image. If null a new image will be declared and returned. Modified.public static ImageFloat32 convolveBorder(ImageFloat32 integral, IntegralKernel kernel, ImageFloat32 output, int borderX, int borderY)
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.public static ImageFloat64 convolveBorder(ImageFloat64 integral, IntegralKernel kernel, ImageFloat64 output, int borderX, int borderY)
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.public static ImageSInt32 convolveBorder(ImageSInt32 integral, IntegralKernel kernel, ImageSInt32 output, int borderX, int borderY)
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.public static ImageSInt64 convolveBorder(ImageSInt64 integral, IntegralKernel kernel, ImageSInt64 output, int borderX, int borderY)
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.public static float convolveSparse(ImageFloat32 integral, IntegralKernel kernel, int x, int y)
integral - Input integral image. Not modified.kernel - Convolution kernel.x - Pixel the convolution is performed at.y - Pixel the convolution is performed at.public static double convolveSparse(ImageFloat64 integral, IntegralKernel kernel, int x, int y)
integral - Input integral image. Not modified.kernel - Convolution kernel.x - Pixel the convolution is performed at.y - Pixel the convolution is performed at.public static int convolveSparse(ImageSInt32 integral, IntegralKernel kernel, int x, int y)
integral - Input integral image. Not modified.kernel - Convolution kernel.x - Pixel the convolution is performed at.y - Pixel the convolution is performed at.public static long convolveSparse(ImageSInt64 integral, IntegralKernel kernel, int x, int y)
integral - Input integral image. Not modified.kernel - Convolution kernel.x - Pixel the convolution is performed at.y - Pixel the convolution is performed at.public static double block_unsafe(ImageFloat64 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.
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.public static float block_unsafe(ImageFloat32 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.
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.public static int block_unsafe(ImageSInt32 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.
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.public static long block_unsafe(ImageSInt64 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.
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.public static float block_zero(ImageFloat32 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.
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.public static double block_zero(ImageFloat64 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.
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.public static int block_zero(ImageSInt32 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.
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.public static long block_zero(ImageSInt64 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.
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.public static void print(IntegralKernel kernel)
kernel - THe kernel which is to be printed.public static boolean isInBounds(int x,
int y,
IntegralKernel kernel,
int width,
int height)
x - location where the kernel is applied. x-axisy - location where the kernel is applied. y-axiskernel - The kernelwidth - Image's widthheight - Image's heightCopyright © 2013. All Rights Reserved.