查看单个帖子
旧 2009-01-31, 02:32   #3
johnny8088
初级会员
 
注册日期: 2009-01-31
年龄: 45
帖子: 12
声望力: 17
johnny8088 正向着好的方向发展
默认 回复: [求助]matlab如何求图片大小

引用:
作者: ajn25953 查看帖子
现在将一幅图片进行了压缩,想知道用什么函数可以求出图片的大小,以确定压缩前后图片大小的变化,得出压缩比。
Rafael C. Gonzalez's Digital Image Processing Using Matlab page 21

K=imfinfo('xxx.jpg');
image_bytes=K.Width*K.Height*K.BitDepth/8;
compressed_bytes=K.FileSize;
compression_ratio=image_bytes/compressed_bytes %no ; here to get the result.

Read the book
johnny8088 当前离线   回复时引用此帖