size of image
古いコメントを表示
readImage1=imread(image_file1);
[x1,y1,z1] = size(readImage1);
what does mean by the second line of the code ?
2 件のコメント
nabeel raza
2017 年 10 月 10 日
the readImage1 size will be assigned to x1,y1,z1; that would be 512*512*3
Image Analyst
2017 年 10 月 11 日
Those numbers are not necessarily the size of her image. The numbers could be anything - depends on the image.
Make sure you read my answer below as to why that code is wrong, and why the accepted answer from Jorge is also wrong even though she accepted it. It's a common beginner mistake.
採用された回答
その他の回答 (1 件)
Image Analyst
2015 年 1 月 5 日
It gives the rows in x1 and columns in y1, and either the number of slices in a 3D volumetric image, or color channels in a color image.
Calling rows x1 and columns y1 is kind of backwards to the usual convention of having the vertical direction be y and the horizontal direction be x. So it should be
[y1,x1,z1] = size(readImage1);
to go along with the standard convention.
For a thorough discussion, see Steve's blog: http://blogs.mathworks.com/steve/2011/03/22/too-much-information-about-the-size-function/
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!