BufferedImage equalizeimage= new BufferedImage(source.getWidth(), source.getHeight(), source.getType()); int red; int blue; int green; int newRGB = 0; //to compute the number red, green,blue at each value for(int i=0; i<source.getWidth(); i++) { for(int j=0; j<source.getHeight(); j++) { // Get pixels by R, G, B red = new Color(source.getRGB (i, j)).getRed(); green = new Color(source.getRGB (i, j)).getGreen(); blue = new Color(source.getRGB (i, j)).getBlue(); //the number of red at value red increase 1 red = histEQ(0)[red]++; //the number of green at value green increase 1 green = histEQ(1)[green]++; //the number of blue at value blue increase 1 blue = histEQ(2)[blue]++; newRGB = get.RGB(red, green, blue); equalizeimage.setRGB(i, j, newRGB); } } return equalizeimage; }
--- Update ---
So my problem is that the "histEQ" is underlined with red and I'm not sure how to declare it or something. Does any one have any suggestions? Thanks


LinkBack URL
About LinkBacks
Reply With Quote
