Effacer les filtres
Effacer les filtres

Size of the image

8 vues (au cours des 30 derniers jours)
Deep P
Deep P le 18 Nov 2016
Hello All,
I am trying to read an image using imread function and note the size of the image. [m n] = size(a); a is the variable in which I am reading my image.
Now my query is , why the size of n thrice that of it (I assumed since it has 3 planes, n is multiplied by 3). But why m is not multiplied.
Does these values depend on the format of the input image?
I am trying to perform some operations after splitting this image into three planes for which size is important.
Please help.
Also can you please explain the difference between R plane and R channel?

Réponses (1)

Walter Roberson
Walter Roberson le 18 Nov 2016
"Dimension lengths, returned as nonnegative integer scalars. When the specified number of output arguments is equal to ndims(A), then each argument is the length of the corresponding dimension of A. If more than ndims(A) output arguments are specified, then the extra output arguments are set to 1. For example, for a matrix A with size [4 5], [sz1,sz2,sz3] = size(A) returns sz1 = 4, sz2 = 5, and sz3 = 1.
If fewer than ndims(A) output arguments are specified, then all remaining dimension lengths are collapsed into the last argument in the list. For example, if A is a 3-D array with size [3 4 5], then [sz1,sz2] = size(A) returns sz1 = 3 and sz2 = 20."

Catégories

En savoir plus sur Matrices and Arrays 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