필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
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개)

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 CenterFile Exchange에서 Red에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by