Why this is happening?

1 vue (au cours des 30 derniers jours)
VIJENDRA
VIJENDRA le 24 Sep 2014
Commenté : Image Analyst le 24 Sep 2014
[m n] = size(image);
I tried this command earlier and it worked well but now showing this:
"Indexing cannot yield multiple results."

Réponse acceptée

Star Strider
Star Strider le 24 Sep 2014
Did you name one of your variables ‘size’ later in your code?
  3 commentaires
Star Strider
Star Strider le 24 Sep 2014
My pleasure!
Image Analyst
Image Analyst le 24 Sep 2014
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);

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by