Regarding length of an image.

조회 수: 3 (최근 30일)
Shaila parvin
Shaila parvin 2013년 6월 21일
length (srcfile);
Here, srcfile is an image. the previous line determines the length of an image but I don't understand what can be the length of an image!!
Can anyone help me please to understand it.
Thanks

채택된 답변

David Sanchez
David Sanchez 2013년 6월 21일
From Matlab point of view, an image is a matrix (sometimes a 3D matrix). if Im is the matrix containing your image,
length(Im)
will return the number of columns of the image matrix.
size(Im)
returns both rows and columns.
  댓글 수: 1
Jan
Jan 2013년 6월 21일
The name "scrFile" seems to imply, that this is the name of the image file. Then length(srcFile) replies the number of characters of this name.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by