フィルターのクリア

Plotting grey scale images.

1 回表示 (過去 30 日間)
suchitra rani
suchitra rani 2019 年 8 月 22 日
コメント済み: Rik 2019 年 8 月 22 日
Hello ,
I am trying to plot grey scale images of size 631 x 661 having negative values ranging from -21.35 to -13.26.After reading the image ,it shows black pixels unless [] are given.I want to plot geoshow command.How can i do it. I tried geoshow command but it gives images of black pixels ..
I=imread('GBGEO.tif') ;
VV=I(:,:,2);
imshow(VV,[]).
geoshow(lat,long,VV)
  1 件のコメント
Rik
Rik 2019 年 8 月 22 日
Most function will assume images of type double have a data range of [0 1], unless you tell them otherwise. The documentation for geoshow is a bit unclear about this, but it seems to follow the same convention.
You should rescale your data to whatever you're expecting to be the data range. Using [] with imshow implicitly rescales your data to [0 1], so like this:
data=(data-min(data(:)))/(max(data(:))-min(data(:)));
(actually it sets the caxis instead of changing your data)

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by