How to make an almost black image very high contrast

Viewed 73
3 Answers

The contents of this dataset is saved as 16 png data. But ordinary display has only 8bit dynamic range. So we cannot display them without windowing. Please try to use ImageJ, it can map 16bit data into visible 8bit data.

https://imagej.nih.gov/ij/index.html

It can show as following.

enter image description here

The images in this dataset have high dynamic range of 16-bits per pixel. Image viewer you are using is mapping 16-bit pixels to 8-bit ones, in order to display them (most displays can only effectively handle 8 or 10 bits of brightness). Most image viewers will just truncate the least significant 8 bits, which in your case produces nearly black image. To get better results, use ImageJ (Fiji distribution is the easiest way to get started), which displays this:

enter image description here

As the other answers rightly say, the images are in 16-bit PNG format. You can convert one to a conventionally scaled, viewable JPEG with ImageMagick which is installed on most Linux distros and is available for macOS and Windows.

So, in Terminal:

magick 183.png -auto-level 183.jpg

enter image description here

If you would like to convert all 800 images to JPEGs in one go, you can use ImageMagick's mogrify like this:

magick mogrify -format JPEG -auto-level *png

Note that if your ImageMagick is the older v6 (as opposed to the v7 commands I used) the two commands become:

convert 183.png -auto-level 183.jpg
mogrify -format JPEG -auto-level *png
Related