All Packages Class Hierarchy This Package Previous Next Index
Class com.jhlabs.image.Kernel
java.lang.Object
|
+----com.jhlabs.image.Kernel
- public class Kernel
- extends java.lang.Object
A convolution kernel.
-
cols
-
-
EDGE_LAPLACE1
-
-
EDGE_LAPLACE2
-
-
FREI_CHEN_H
-
-
FREI_CHEN_V
-
-
matrix
-
-
PREWITT_H
-
-
PREWITT_V
-
-
R2
-
-
ROBERTS_H
-
-
ROBERTS_V
-
-
rows
-
-
SOBEL_H
-
-
SOBEL_V
-
-
xCentre
-
-
yCentre
-
-
Kernel()
- Construct a null kernel.
-
Kernel(double[])
- Construct a kernel with the given 3x3 matrix.
-
Kernel(int, int, double[])
- Construct a kernel with the given matrix.
-
Kernel(int, int, int, int, double[])
- Construct a kernel with the given matrix.
-
getMatrix()
-
-
normalize()
- Normalize a convolution kernel.
-
setMatrix(double[])
- Set the (3x3) convolution kernel.
-
setMatrix(int, int, double[])
- Set the convolution kernel.
-
setMatrix(int, int, int, int, double[])
- Set the convolution kernel.
R2
public static final double R2
ROBERTS_V
public static final double ROBERTS_V[]
ROBERTS_H
public static final double ROBERTS_H[]
PREWITT_V
public static final double PREWITT_V[]
PREWITT_H
public static final double PREWITT_H[]
SOBEL_V
public static final double SOBEL_V[]
SOBEL_H
public static double SOBEL_H[]
FREI_CHEN_V
public static final double FREI_CHEN_V[]
FREI_CHEN_H
public static double FREI_CHEN_H[]
EDGE_LAPLACE1
public static double EDGE_LAPLACE1[]
EDGE_LAPLACE2
public static double EDGE_LAPLACE2[]
matrix
public double matrix[]
rows
public int rows
cols
public int cols
xCentre
public int xCentre
yCentre
public int yCentre
Kernel
public Kernel()
- Construct a null kernel. This is only useful if you're going to change the kernel later on.
Kernel
public Kernel(double matrix[])
- Construct a kernel with the given 3x3 matrix.
- Parameters:
- matrix - an array of 9 doubles containing the kernel
Kernel
public Kernel(int rows,
int cols,
double matrix[])
- Construct a kernel with the given matrix.
- Parameters:
- rows - the number of rows in the kernel
- cols - the number of columns in the kernel
- matrix - an array of rows*cols doubles containing the kernel
Kernel
public Kernel(int rows,
int cols,
int xCentre,
int yCentre,
double matrix[])
- Construct a kernel with the given matrix.
- Parameters:
- rows - the number of rows in the kernel
- cols - the number of columns in the kernel
- xCentre - the centre of the kernel in the x direction
- yCentre - the centre of the kernel in the y direction
- matrix - an array of rows*cols doubles containing the kernel
setMatrix
public void setMatrix(double matrix[])
- Set the (3x3) convolution kernel.
- Parameters:
- matrix - an array of 9 doubles containing the kernel
setMatrix
public void setMatrix(int rows,
int cols,
double matrix[])
- Set the convolution kernel.
- Parameters:
- rows - the number of rows in the kernel
- cols - the number of columns in the kernel
- matrix - an array of rows*cols doubles containing the kernel
setMatrix
public void setMatrix(int rows,
int cols,
int xCentre,
int yCentre,
double matrix[])
- Set the convolution kernel.
- Parameters:
- rows - the number of rows in the kernel
- cols - the number of columns in the kernel
- xCentre - the centre of the kernel in the x direction
- yCentre - the centre of the kernel in the y direction
- matrix - an array of rows*cols doubles containing the kernel
getMatrix
public double[] getMatrix()
normalize
public void normalize()
- Normalize a convolution kernel. You can call this to normalize a kernel you've created by hand.
- Parameters:
- matrix - the kernel
All Packages Class Hierarchy This Package Previous Next Index