java code that uses the ImageJ library, in order to open an image and convert it to gray, thus obtaining a grayscale image.
IDE used: Netbeans
image processing software integrated into netbeans: ImageJ
- The Opener class allows you to find and select a file;
- The ImagePlus class represents the image; -The new ImageConverter (imp) .convertToGray8 () instruction converts the image contained in the ImagePlus object as an 8-bit grayscale image;
- The ImageProcessor class allows you to perform pixel operations.