MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]matlab如何求图片大小 (https://www.labfans.com/bbs/showthread.php?t=3504)

ajn25953 2008-06-07 21:24

[求助]matlab如何求图片大小
 
现在将一幅图片进行了压缩,想知道用什么函数可以求出图片的大小,以确定压缩前后图片大小的变化,得出压缩比。

Lean 2009-01-14 00:47

回复: [求助]matlab如何求图片大小
 
[QUOTE=ajn25953;12169]现在将一幅图片进行了压缩,想知道用什么函数可以求出图片的大小,以确定压缩前后图片大小的变化,得出压缩比。[/QUOTE]

这个是得到图像尺寸的程序: [m,n]=size(图像名称); m,n即为长和宽

johnny8088 2009-01-31 02:32

回复: [求助]matlab如何求图片大小
 
[QUOTE=ajn25953;12169]现在将一幅图片进行了压缩,想知道用什么函数可以求出图片的大小,以确定压缩前后图片大小的变化,得出压缩比。[/QUOTE]

Rafael C. Gonzalez's [I]Digital Image Processing Using Matlab [/I] 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

kevin_6603 2009-02-03 23:05

回复: [求助]matlab如何求图片大小
 
[QUOTE=ajn25953;12169]现在将一幅图片进行了压缩,想知道用什么函数可以求出图片的大小,以确定压缩前后图片大小的变化,得出压缩比。[/QUOTE]

#2 is the common way we use for the size of the image

#3 is the direct right way to get the ratio of the change


所有时间均为北京时间。现在的时间是 12:27

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.