16bit TIFF images generated by ImageJ appear black in MATLAB
Show older comments
Hi,
I have a database of 16bit TIFF images generated in ImageJ that I need to process in MATLAB. Apparently ImageJ is doing something to the image which makes it look almost completely black outside the framework of ImageJ (including MATLAB or any conventional viewer).
Moreover, if I open these TIFF images in ImageJ and then save them as JPEG, it suddenly opens normally outside the framework of ImageJ. But this doesn't solve the problem since JPEG loses information and since it is not practical to implement for a large amount of images.
Here you can find a sample TIFF & JPEG pair: TIFF: http://imgur.com/Arj5mzY JPEG: http://imgur.com/cpuXTni
EDIT: please use these links. they do not change the format of the image: TIFF: http://www.filedropper.com/tiff_1 JPEG: http://www.filedropper.com/jpeg
You can see that the TIFF image looks almost completely black, but if you open both the TIFF and the JPEG in ImageJ, they look the same.
What I need is the MATLAB code that converts the TIFF image generated by ImageJ, to a "real" TIFF that can be processed by MATLAB without changing\losing any information.
7 Comments
Walter Roberson
on 18 Jun 2017
The first of those two links leads to a .png not to a .tif
Please attach the images directly here. You can zip them up and attach the zip if need be.
Omer Yuval
on 20 Jun 2017
Omer Yuval
on 20 Jun 2017
Gopichandh Danala
on 20 Jun 2017
The 16-bit tiff file has all the information in it. The only problem is with the display range which makes them look like black but in fact, they have values around (200-350), whereas the brightest white pixels you see are having a very high value of around 16000. so the display range for your image is [133 16165]. so the small intensity pixels cannot be seen on the 16-bit tiff file but they are actually there.
In the case of the jpeg image, it is a uint8 bit and the display range is [22 255], which makes everything look clear.
Gopichandh Danala
on 20 Jun 2017
If you are just worried about looking at them clearly change the display range
figure, imshow(image,[0 1000])
by doing this all pixels which have a value over 1000 will be displayed as a white making everything in the range [0 1000] more clear to see
Walter Roberson
on 20 Jun 2017
Note: files types that are not directly supported can be uploaded here by zip'ing them to create a .zip as .zip is supported.
Walter Roberson
on 20 Jun 2017
If you use
info = imfinfo('TIFF.tif');
and examine info.ImageDescription then that contains
'ImageJ=1.49e
min=0.0
max=1636.0
'
this hints that 1636 is perhaps the expected maximum.
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!