how to plot a hyperspectral image in matlab?

조회 수: 2 (최근 30일)
Rawan hamdi
Rawan hamdi 2013년 3월 20일
댓글: Walter Roberson 2016년 3월 8일
Hi,
I've used these 2 lines
SIZE = [1208,307 ,191];
X = multibandread('dc.tif', SIZE, 'int16',1, 'bsq', 'ieee-le');
to read a hyperspectral image, now i how to plot/display the image on a graph? I also want to add noise to it
Thank you

답변 (1개)

Wind Cloud
Wind Cloud 2014년 4월 3일
that is easy. use this expression:imshow(X(:,:,n),[]), n is band, from 1to 191.
  댓글 수: 2
yanjie qi
yanjie qi 2016년 3월 8일
편집: Walter Roberson 2016년 3월 8일
sir,
I want to select different bands and imshow them, I use subplot to display these pictures in an image, but there was something wrong with my code.
subplot(2,1),imshow(x(:,:,2),[]);
??? Error using ==> subplot at 188
Unknown command option.
when I use" subplot(2,2,1),imshow(x(:,:,2),[]);"this, it works. why?
Thank you
Walter Roberson
Walter Roberson 2016년 3월 8일
subplot() can take either one number such as 121, or it can take 3 numbers such as 1, 2, 1, but it cannot take two numbers. The form with a single number is not recommended. You should be using subplot in the form
subplot(M, N, k)
to choose plotting area #k out of an M x N array of plots, with the areas numbered across. So for example, subplot(2, 3, 4) would be plot #4 out of a 2 x 3 array of plots that were numbered
1 2 3
4 5 6

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Hyperspectral Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by