List of utility methods to do BufferedImage Filter
BufferedImage | filterSmooth(BufferedImage img) filter Smooth final int SSIZE = 3; int x, y, i, j, val; int r; final int w = img.getWidth(); final int h = img.getHeight(); final BufferedImage newImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { ... |
BufferedImage | filterThreshold(BufferedImage img, int threshold) filter Threshold final int w = img.getWidth(); final int h = img.getHeight(); final BufferedImage newImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Color min = Color.BLACK; Color max = Color.WHITE; if (threshold < 0) { min = Color.WHITE; max = Color.BLACK; ... |
int | horizontalFilter(BufferedImage bufImg, int startX, int stopX, int start, int stop, int y, double[] pContrib) horizontal Filter double valueRed = 0.0; double valueGreen = 0.0; double valueBlue = 0.0; int valueRGB = 0; int i, j; for (i = startX, j = start; i <= stopX; i++, j++) { valueRGB = bufImg.getRGB(i, y); valueRed += getRedValue(valueRGB) * pContrib[j]; ... |
BufferedImage | thresholdFilter(int threshholdLevel, BufferedImage image) Create the filter to execute a threshold setting on the color component values. short[] threshold = new short[256]; for (int i = threshholdLevel; i < 256; i++) threshold[i] = (short) i; LookupTable threshold_table = new ShortLookupTable(0, threshold); LookupOp threshold_op = new LookupOp(threshold_table, null); return threshold_op.filter(image, image); |
BufferedImage | verticalFiltering(BufferedImage pbImage, int iOutH) vertical Filtering int iW = pbImage.getWidth(); int iH = pbImage.getHeight(); int value = 0; BufferedImage pbOut = new BufferedImage(iW, iOutH, BufferedImage.TYPE_INT_RGB); for (int y = 0; y < iOutH; y++) { int startY; int start; int Y = (int) (((double) y) * ((double) iH) / ((double) iOutH) + 0.5); ... |