MATLAB: Determing file size

compression ratiosize;

I have images in two folders,in e drive,one folder consists of normal images ,and other compressed images
image(foldername)consists of original images
image1(foldername)consists of compressed folder
i want to calculate the size of each folder and compression ratio,please help

Best Answer

im1_stats = dir(filename_image1);
im2_stats = dir(filename_image2);
ratio = im1_stats.bytes./im2_stats.bytes
Related Question