Пример #1
0
 /**
  * A factory object which creates a histogram object for an image.
  *
  * @param fileName the file name of the image to compute a histogram.
  * @return A histogram object for the specified image.
  * @throws IOException if the specified image file does not exists or there is some problem
  *     reading it.
  */
 public static Histogram getHisrogram(String fileName) throws IOException {
   File f = new File(fileName);
   BufferedImage img = ImageIO.read(f);
   Histogram h = new Histogram(fileName);
   //        h.parseGrayHistogram(img);
   h.parseHistogramForColors(img);
   return h;
 }