Function to read a 16bit color composite image to matlab

20 ビュー (過去 30 日間)
Yonatan Degefu
Yonatan Degefu 2017 年 7 月 4 日
コメント済み: Walter Roberson 2019 年 4 月 30 日
Hi, I was trying to open a 16 bit color composite image in matlab but everytime it gives me a dark surface when using imread. What is another function I can use to read it into matlab and perform further image analysis.
  3 件のコメント
Yonatan Degefu
Yonatan Degefu 2017 年 7 月 4 日
The Image is about 14 MB, too large to attach here. And its a tiff file. But I can send you a dropbox link if you send me an email.
Nirav Sharda
Nirav Sharda 2017 年 7 月 13 日
The following documentation link has a section that talks about how to read tiff file image data and metadata.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2017 年 7 月 13 日
imread() is probably valid to read the image. Using the Tiff class would be another way.
But the problem is likely not in reading the image, but rather in displaying the image. It is pretty uncommon that the full 16 bit range is used for images stored as 16 bit TIFF: it is more likely that instrument readings are being stored, such as CT images.
It is not uncommon that the used data range for 16 bit TIFF images is roughly -600 to +4000 (technically -4096 to +4095) such as for CT, or roughly 1000 to 6000 (MRI).
You can use imagesc(data), or use imshow(data, []) to have the minimum and maximum stored data mapped across the available colormap.
You will likely find, however, that the data range of interest is only a subset of what is stored. You can pass specific min and max values to imagesc() or imshow() to map the given range across the color map, with lower values mapped to the first color and higher values mapped to the second color.
Once you have identified the range of interest, then you can either zero out everything outside the range, or you can use mat2gray() and pass in the range to map the chosen range to the interval [0, 1].

その他の回答 (2 件)

Kelly Kearney
Kelly Kearney 2017 年 7 月 13 日
Many years ago, I had to work with some 16-bit color avi files. Those files stored the RGB color data using 16 bits per pixel: 5 bits each for red, blue, and green, and one bit unused. Assuming your images use a similar encoding, you can probably adapt that code to your tiff images; it's available here: avidread16bitcol.m.

Eslam Wafdy
Eslam Wafdy 2019 年 4 月 29 日
Try using imagesc(data matrix)
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 4 月 30 日
I talked about that in my answer. The data range of interest is often not the data range so you have to be careful about how you use imagesc()

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by