フィルターのクリア

To display an image

2 ビュー (過去 30 日間)
Marium Malik
Marium Malik 2012 年 9 月 2 日
I want to display images from a for loop. Whenever i write imagesc() drawnow; I do get the images but they are scaled. I donot want the scaled images. When I am using imshow instead of imagesc then it gives just blank figure? How could i view those images without being scaled?
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 9 月 2 日
When you say "scaled" are you referring to size or to color range?
What is size() of your image (please show all values returned by size()) ? What is class() of your image?
What is max(YourImage(:)) and min(YourImage(:)), where here YourImage is your variable name ?

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

採用された回答

Image Analyst
Image Analyst 2012 年 9 月 2 日
編集済み: Image Analyst 2012 年 9 月 2 日
Try this:
imshow(yourImage, []); % Make sure you use the [].
It should work with everything (all 2D images): uint8,uint16, single, double, and RGB. The [] will take the min of the image and map it to 0 and the max and map it to 255 so that you will see the entire range of your image. If you don't do that, and the image is uint8 then it defaults to 0-255 and if your image is, say, all less than 5 gray levels, or a floating point image with really small values, then you won't see anything - it will be too dark.

その他の回答 (1 件)

Star Strider
Star Strider 2012 年 9 月 2 日
I suggest image rather than imagesc if you do not want them scaled.

Community Treasure Hunt

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

Start Hunting!

Translated by