What's the difference between imagesc and imshow?
이전 댓글 표시
Hi,
When I want to display an image in figure screen, both works the same way. I was wondering what's the difference between both imagesc and imshow commands?
Thank you.
채택된 답변
추가 답변 (2개)
pouria farhadian
2018년 4월 30일
1 개 추천
imagesc reduce the time of our process.actually I dont know why????
댓글 수: 3
Syomantak Chaudhuri
2020년 8월 29일
Then better not answer?
Ying Yu
2020년 12월 24일
Practically, I actually think pouria's answer is quite valuable. Thanks!
Walter Roberson
2020년 12월 24일
imagesc() does less work than imshow(), and changes fewer graphics settings, so it is not as "hard" on the graphics system.
Mehri Mehrnia
2022년 5월 22일
1 개 추천
I work with cardiac MRI images(grayscale). it happens repeatedly that "imagesc" shows the image while "imshow" shows a nonsence combination of black-white point!!
I don't know the reason. Any thought?
댓글 수: 1
Image Analyst
2022년 5월 22일
You probably have a floating point image with values outside the range of 0 to 1. Therefore you need to use [] in imshow(
imshow(mriImage, []);
That will take whatever the actual values are and scale them to 0-255 for display. Otherwise values below 0 show as black and above 1 show as white.
imagesc automatically scales the image -- that's what the "sc" stands for. However it applies a colormap that produces a pseudocolored RGB image that is almost always not what you want. imshow() leaves it as gray scale.
With either function you can apply the colormap you want, either with the 'Colormap' option of imshow(). Or you can call the colormap() function for either imshow() or imagesc() as a function call after you call them.
cmap = turbo(255);
colormap(cmap);
colorbar
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!