when i am using imshow(A,G) , i got Undefined function or variable 'G'. why so ?

조회 수: 2 (최근 30일)
chitresh
chitresh 2013년 10월 4일
댓글: Image Analyst 2013년 10월 4일
i am using imshow(A,G), where A represent my image file matrix and G is the no. of intensity level used to display it as i read this in some book... but on running this function i am getting this answer Undefined function or variable 'G'. why so ?

답변 (1개)

Image Analyst
Image Analyst 2013년 10월 4일
G would be a colormap - a pseudocolor look up table for yout indexed image. You did not set it to anything before you called imshow(), so why did you put it in there.? Replace it with [] and see if that works for you.
  댓글 수: 2
chitresh
chitresh 2013년 10월 4일
thank you about the answer, but i know that thing[] i.e. imshow(a,[]); this is working and this is also imshow(a); but this commant is not running its mention in the book that imshow(a,G); where a is the image array and G is no. of intensity level used to display it. but it show undefined funtion of variable 'g'... similarly when i am using another command b = imshow(a,[low high]) i am getting >> b = imshow(a,[low high]); Undefined function or variable 'low'.
Did you mean: >> b = imshow(a,[llow hhigh]); Error using llow (line 39) Invalid number of arguments.
Image Analyst
Image Analyst 2013년 10월 4일
You can use imshow(grayImage, [0 255]) if you want, or imshow(indexedImage, gray(256)) also. Or just define G yourself as a 256 by 3 array of numbers in the range 0-1, like
G = gray(256);

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by