All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.image.Kernel
java.lang.Object
|
+----java.awt.image.Kernel
- public class Kernel
- extends Object
This class defines a Kernel object. A kernel is a matrix describing
how a given pixel and its surrounding pixels affect the value of the
given pixel in a filtering operation.
- See Also:
- ConvolveOp
SHARPEN3x3_1- 3x3 Sharpening kernel:
-1 -1 -1
-1 9 -1
-1 -1 -1
SHARPEN3x3_2- 3x3 Sharpening kernel:
1 -2 1
-2 5 -2
1 -2 1
SHARPEN3x3_3- 3x3 Sharpening kernel:
0 -1 0
-1 5 -1
0 -1 0
Kernel(int, int, float[])
- Create a Kernel object from an array of floats.
getHeight()
- Returns the height
getKernelData(float[])
- Returns the kernel data in row major order.
getWidth()
- Returns the width
getXOrigin()
- Returns the X origin.
getYOrigin()
- Returns the Y origin.
SHARPEN3x3_1
public static final float[] SHARPEN3x3_1
- 3x3 Sharpening kernel:
-1 -1 -1
-1 9 -1
-1 -1 -1
SHARPEN3x3_2
public static final float[] SHARPEN3x3_2
- 3x3 Sharpening kernel:
1 -2 1
-2 5 -2
1 -2 1
SHARPEN3x3_3
public static final float[] SHARPEN3x3_3
- 3x3 Sharpening kernel:
0 -1 0
-1 5 -1
0 -1 0
Kernel
public Kernel(int width,
int height,
float[] data)
- Create a Kernel object from an array of floats. The data array
is copied.
- Parameters:
- width - Width of the kernel.
- height - Height of the kernel.
- data - Kernel data in row major order.
getXOrigin
public final int getXOrigin()
- Returns the X origin.
getYOrigin
public final int getYOrigin()
- Returns the Y origin.
getWidth
public final int getWidth()
- Returns the width
getHeight
public final int getHeight()
- Returns the height
getKernelData
public final float[] getKernelData(float[] data)
- Returns the kernel data in row major order.
- Parameters:
- data - If non-null, will contain the returned kernel data.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature