필터 지우기
필터 지우기

Size of the image

조회 수: 8 (최근 30일)
Deep P
Deep P 2016년 11월 18일
답변: Walter Roberson 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에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by