Pan and rgb image appear in black

1 次查看(过去 30 天)
volk a
volk a 2020-5-25
评论: volk a 2020-5-25
I have two images that appear in black. One of them is pancromatic and the other one is RGB image. How can I see them correctly in MATLAB? I add images below in .zip format.
Thank you.

回答(1 个)

Image Analyst
Image Analyst 2020-5-25
Try this:
grayImage = imread('pan.tif');
[rows, columns, numberOfColorChannels] = size(grayImage)
subplot(1, 2, 1);
imshow(grayImage, []) % Use [] to scale intensity.
impixelinfo
multiImage = imread('multi.tif');
[rows, columns, numberOfColorChannels] = size(multiImage)
[r, g, b] = imsplit(multiImage);
maxValue = max(multiImage(:))
multiImage2 = uint8(rescale(multiImage, 0, intmax('uint8')));
subplot(1, 2, 2);
imshow(multiImage2, []) % Use [] to scale intensity.
impixelinfo
  1 个评论
volk a
volk a 2020-5-25
Thank you!
It works for pancromatic image. But, in the second part I get an error says Undefined function or variable 'imsplit'. I am using Matlab 2017b, is there any way to solve this error message?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by