Size of the image

1 次查看(过去 30 天)
Deep P
Deep P 2016-11-18
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?

回答(1 个)

Walter Roberson
Walter Roberson 2016-11-18
"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."

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by