Size of the image
1 view (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Walter Roberson
on 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."
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!