I had load buffered image and need to plot histogram? please suggest me next steps to to plot
RGB histogram. if it can done using jai please suggest me the way to do it. I hadtried alot and also googled alot but dint found any right solution.
here is how i had load my image please provide me next steps
BufferedImage image= ImageIO.read(new File("C:\\Images\\Sunset.jpg"));
ParameterBlock pb = new ParameterBlock();
int[] bins = { 256 };
double[] low = { 0.0D };
double[] high = { 256.0D };
pb.addSource(image);
pb.add(null);
pb.add(1);
pb.add(1);
pb.add(bins);
pb.add(low);
pb.add(high);
RenderedOp op = JAI.create("histogram", pb, null);
Histogram histogram = (Histogram) op.getProperty("histogram");
1 Answer