Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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

Field Summary
static float[]  SHARPEN3x3_1
3x3 Sharpening kernel:
   -1 -1 -1
   -1  9 -1
   -1 -1 -1
static float[]  SHARPEN3x3_2
3x3 Sharpening kernel:
   1 -2  1
  -2  5 -2
   1 -2  1
static float[]  SHARPEN3x3_3
3x3 Sharpening kernel:
   0 -1  0
  -1  5 -1
   0 -1  0
 

Constructor Summary
 Kernel(int width, int height, float[] data)
Create a Kernel object from an array of floats.
 

Method Summary
int  getHeight()
Returns the height
float[]  getKernelData(float[] data)
Returns the kernel data in row major order.
int  getWidth()
Returns the width
int  getXOrigin()
Returns the X origin.
int  getYOrigin()
Returns the Y origin.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.
Method Detail

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.

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.