Why the image color bar doesn't contain certain color (Red, in particular)

4 ビュー (過去 30 日間)
Sachin Motwani
Sachin Motwani 2020 年 8 月 21 日
編集済み: Sachin Motwani 2020 年 8 月 22 日
I used the following code in order to explore RGB images
X = imread ('parrot.jpg');
image(X);
colorbar
The output
Why doesn't the color bar contain red color even when the image does?

採用された回答

Image Analyst
Image Analyst 2020 年 8 月 22 日
If you want to see the 3-D color gamut, you can use colorcloud
colorcloud(rgbImage);
  1 件のコメント
Sachin Motwani
Sachin Motwani 2020 年 8 月 22 日
編集済み: Sachin Motwani 2020 年 8 月 22 日
Thanks. This is what I wanted to see.

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 8 月 21 日
編集済み: Walter Roberson 2020 年 8 月 22 日
image() never changes the active colormap. (imshow() on the other hand changes the colormap for 2d arrays but not for rgb arrays.) You were displaying an rgb image so it had no need for a colormap.
colorbar never analyzes the contents of the display. colorbar only ever puts up a copy of the current colormap and associated numeric scale. In this case the default parula map was displayed.
Image Analyst has a better analysis tool but I cannot find it at the moment.
  2 件のコメント
KSSV
KSSV 2020 年 8 月 21 日
編集済み: KSSV 2020 年 8 月 21 日
@Walter Yes you are right..deleted my (wrong) answer.
Sachin Motwani
Sachin Motwani 2020 年 8 月 22 日
Thanks for the explaination of my mistake.

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

カテゴリ

Help Center および File ExchangeRed についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by