public class ConvolveFilter extends AbstractBufferedImageOp
| Modifier and Type | Field and Description |
|---|---|
boolean |
alpha |
static int |
CLAMP_EDGES |
protected Kernel |
kernel |
static int |
WRAP_EDGES |
static int |
ZERO_EDGES |
| Constructor and Description |
|---|
ConvolveFilter()
Construct a filter with a null kernel.
|
ConvolveFilter(float[] matrix)
Construct a filter with the given 3x3 kernel.
|
ConvolveFilter(int rows,
int cols,
float[] matrix)
Construct a filter with the given kernel.
|
ConvolveFilter(Kernel kernel)
Construct a filter with the given 3x3 kernel.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
convolve(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction) |
static void |
convolve(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
int edgeAction) |
static void |
convolveH(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a kernel consisting of one row
|
static void |
convolveHV(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a 2D kernel
|
static void |
convolveV(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a kernel consisting of one column
|
BufferedImage |
createCompatibleDestImage(BufferedImage src,
ColorModel dstCM) |
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
Rectangle2D |
getBounds2D(BufferedImage src) |
int |
getEdgeAction() |
Kernel |
getKernel() |
Point2D |
getPoint2D(Point2D srcPt,
Point2D dstPt) |
RenderingHints |
getRenderingHints() |
void |
setEdgeAction(int edgeAction) |
void |
setKernel(Kernel kernel) |
getRGB, setRGBpublic static int ZERO_EDGES
public static int CLAMP_EDGES
public static int WRAP_EDGES
protected Kernel kernel
public boolean alpha
public ConvolveFilter()
public ConvolveFilter(float[] matrix)
matrix - an array of 9 floats containing the kernelpublic ConvolveFilter(int rows,
int cols,
float[] matrix)
rows - the number of rows in the kernelcols - the number of columns in the kernelmatrix - an array of rows*cols floats containing the kernelpublic ConvolveFilter(Kernel kernel)
public void setKernel(Kernel kernel)
public Kernel getKernel()
public void setEdgeAction(int edgeAction)
public int getEdgeAction()
public BufferedImage filter(BufferedImage src, BufferedImage dst)
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM)
createCompatibleDestImage in interface BufferedImageOpcreateCompatibleDestImage in class AbstractBufferedImageOppublic Rectangle2D getBounds2D(BufferedImage src)
getBounds2D in interface BufferedImageOpgetBounds2D in class AbstractBufferedImageOppublic Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
getPoint2D in interface BufferedImageOpgetPoint2D in class AbstractBufferedImageOppublic RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpgetRenderingHints in class AbstractBufferedImageOppublic static void convolve(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, int edgeAction)
public static void convolve(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
public static void convolveHV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
public static void convolveH(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
public static void convolveV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
Copyright © 2020. All rights reserved.