为什么当我在Matlab中对图像使用大小函数时,结果是ans = 600800,但是我的实际图像大小=(800,600)?
This is because of difference in conventions. When we say an image is 800x600 we generally mean it 800 columns by 600 rows. However when Matlab reports the size of a matrix it does it using standard matrix indexing which is row then column. So size(A) = (800, 600) means that the image is 800 rows by 600 columns.
For example, for the following "2x4" image:
>> A = [1 2; 3 4; 5 6; 7 8]
A =
1 2
3 4
5 6
7 8
>> size(A)
ans =
4 2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.