Why does my image does not conert to grayscale?

조회 수: 18 (최근 30일)
Andrew Killian
Andrew Killian . 2021년 8월 31일
댓글: Image Analyst . 2021년 9월 5일
I need to convert an image that we were given to grayscale.
I wrote the code below. When I highlight the whole 'imagesc' line and 'evaluate selction' the image pops up but in color.
logo = imread('..._logo.jpg');
colormap gray;

채택된 답변

Image Analyst
Image Analyst 2021년 8월 31일
Use imshow() because imagesc() applies some funky colormap by default, and that is usually not what you want.
  댓글 수: 3
Image Analyst
Image Analyst 2021년 9월 5일
Andrew, if this solved it, can you click the "Accept this answer" link? Thanks in advance.

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

추가 답변 (0개)


Help CenterFile Exchange에서 Blue에 대해 자세히 알아보기


Community Treasure Hunt

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

Start Hunting!

Translated by