This project is a simple Java application that scales the contrast of grayscaled images. It calculates a percentile of the gray values in the image and then scales them to the full range of 0 to 255. The percentile can be adjusted by the user.
Original | Output |
---|---|
The images above show a top view of the Jezero crater on Mars, taken from the interactive map of the Global CTX Mosaic of Mars. Special thanks to the scientists and engineers at Malin Space Science Systems and the Jet Propulsion Laboratory, who have built and operated CTX.
The application can be run from the command line with the following command:
java -jar GrayscaleSwitch.jar input.png output.png
or with adjusted values for the percentiles:
java -jar GrayscaleSwitch.jar input.png output.png 0.25 0.9
This project is licensed under the terms of the MIT license. For more information, see the LICENSE file.