Digital Image Processing (using Java)
Digital Image Processing (using Java)
Digital Image Processing (using Java)
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Buffered<strong>Image</strong> image = input.decodeAsBuffered<strong>Image</strong>();histogram.computeHistogram(image);setTitle(file.getName());}catch (FileNotFoundException e) {error("File not found.");return;}catch (<strong>Image</strong>DecoderException e) {error("Cannot read this image format.");return;}catch (IOException e) {error("Failed to read image data.");return;}catch (HistogramException e) {error("Cannot compute histogram for this image type.");return;}// Rebuild GUI}}mainPane.removeAll();if (histogram.getNumBands() == 3)createMultipleViews();elsecreateSingleView();mainPane.add(infoPane, BorderLayout.SOUTH);mainPane.invalidate();validate();pack();// Saves current histogram to a file selected by userpublic void saveHistogram() {if (histogram.getNumBands() == 0) {- 31 -