/** * Set the radius of the kernel, and hence the amount of blur. The bigger the radius, the longer this filter will take. * * @param radius the radius of the blur in pixels. * @min-value 0 * @max-value 100+ * @see #getRadius */ public void setRadius(float radius) { this.radius = radius; kernel = makeKernel(radius); }
/** * Set the radius of the kernel, and hence the amount of blur. The bigger the radius, the longer this filter will take. * @param radius the radius of the blur in pixels. * @min-value 0 * @max-value 100+ * @see #getRadius */ public void setRadius(float radius) { this.radius = radius; kernel = makeKernel(radius); }
public BufferedImage filter( BufferedImage src, BufferedImage dst ) { int width = src.getWidth(); int height = src.getHeight(); if ( dst == null ) dst = createCompatibleDestImage( src, null ); int[] inPixels = new int[width*height]; int[] outPixels = new int[width*height]; getRGB( src, 0, 0, width, height, inPixels ); Kernel kernel = GaussianFilter.makeKernel(hRadius); thresholdBlur( kernel, inPixels, outPixels, width, height, true ); thresholdBlur( kernel, outPixels, inPixels, height, width, true ); setRGB( dst, 0, 0, width, height, inPixels ); return dst; }
@Override public BufferedImage filter(BufferedImage src, BufferedImage dst) { int width = src.getWidth(); int height = src.getHeight(); pt = createProgressTracker(width + height); if (dst == null) { dst = createCompatibleDestImage(src, null); } int[] inPixels = new int[width * height]; int[] outPixels = new int[width * height]; getRGB(src, 0, 0, width, height, inPixels); Kernel kernel = GaussianFilter.makeKernel(hRadius); thresholdBlur(kernel, inPixels, outPixels, width, height, true, pt); thresholdBlur(kernel, outPixels, inPixels, height, width, true, pt); setRGB(dst, 0, 0, width, height, inPixels); finishProgressTracker(); return dst; }
kernel = makeKernel(radius);
Kernel kernel = GaussianFilter.makeKernel( bumpSoftness ); GaussianFilter.convolveAndTranspose( kernel, bumpPixels, tmpPixels, bumpWidth, bumpHeight, true, false, false, GaussianFilter.WRAP_EDGES ); GaussianFilter.convolveAndTranspose( kernel, tmpPixels, softPixels, bumpHeight, bumpWidth, true, false, false, GaussianFilter.WRAP_EDGES );
bumpPixels = if2d.getPixels(); Kernel kernel = GaussianFilter.makeKernel( bumpSoftness ); int [] tmpPixels = new int[bumpWidth * bumpHeight]; int [] softPixels = new int[bumpWidth * bumpHeight];