Examples of ConvolveOp


Examples of java.awt.image.ConvolveOp

        return new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP, null);
    }
   
    public static ConvolveOp[] getGaussianBlurFilter1DPair(int radius)
    {
        ConvolveOp op = getGaussianBlurFilter1D(radius, true);
       
        // Copy of data, but faster than recalculating
        float[] data = op.getKernel().getKernelData(null);
       
        ConvolveOp op1 = new ConvolveOp(new Kernel(1, op.getKernel().getWidth(), data),
                ConvolveOp.EDGE_NO_OP, null);
       
        return new ConvolveOp[] { op, op1 };
    }
View Full Code Here

Examples of java.awt.image.ConvolveOp

                  weight, weight, weight, weight,
                  weight, weight, weight, weight,
                  weight, weight, weight, weight,
                  weight, weight, weight, weight,
              };
              op = new ConvolveOp(new Kernel(4, 4, blurKernel), ConvolveOp.EDGE_NO_OP, null);             
          }
          else {
            final float weight = 1.0f/18.0f;
            final float[] blurKernel = {
                1*weight, 2*weight, 1*weight,
                2*weight, 6*weight, 2*weight,
                1*weight, 2*weight, 1*weight
            };

            op = new ConvolveOp(new Kernel(3, 3, blurKernel), ConvolveOp.EDGE_NO_OP, null);
          }
         
          BufferedImage blured = op.createCompatibleDestImage(bi, bi.getColorModel());
         
             op.filter(bi, blured);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.