Why this is happening?

조회 수: 4 (최근 30일)
VIJENDRA
VIJENDRA 2014년 9월 24일
댓글: Image Analyst 2014년 9월 24일
[m n] = size(image);
I tried this command earlier and it worked well but now showing this:
"Indexing cannot yield multiple results."

채택된 답변

Star Strider
Star Strider 2014년 9월 24일
Did you name one of your variables ‘size’ later in your code?
  댓글 수: 3
Star Strider
Star Strider 2014년 9월 24일
My pleasure!
Image Analyst
Image Analyst 2014년 9월 24일
It's also not a good idea to take the size of a built in function like image ()! Hopefully your image is not really named that!
And actually, even if it has a different name, that way of calling size() can be risky. Why? Read Steve's blog: http://blogs.mathworks.com/steve/2011/03/22/too-much-information-about-the-size-function/. Better, if you know it's not a multispectral image but is a regular indexed, RGB, or monochrome image is to do
[rows, columns, numberOfColorChannels] = size(yourImage);

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

추가 답변 (0개)

카테고리

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