필터 지우기
필터 지우기

Data not appearing in image

조회 수: 1 (최근 30일)
Emma
Emma 2012년 10월 16일
I have a 2400x2400 matrix that I would like to display as an image. When I do image(MyMatrix), the resulting image is just blue (no data visible). Just to test, when I do imagesc(MyMatrix), some of the data becomes visible. How might I be able to make all of my data appear in the image?

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 10월 16일
편집: Sean de Wolski 2012년 10월 16일
imshow(matrix,[]); %Use [] to show whole data range
  댓글 수: 1
Image Analyst
Image Analyst 2012년 10월 16일
If it was blue, it must have either had a non-gray colormap applied, or it was an RGB image, not a gray scale image, or she really used imagesc() instead of image(). If it was really a 2400x2400x3 RGB color image, and is floating point (single or double) then [] won't work (like it does for monochrome images for some reason - I've notified Mathworks) and you'd have to cast it to integer (uint8). If it's gray scale, then Sean's method will work (unless you have some bizarre colormap applied). But it it were grayscale I don't know why it showed up as blue.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by