MATLAB Answers

how can i know the size of the file

609 views (last 30 days)
shazwani seth
shazwani seth on 4 Dec 2016
Answered: Image Analyst on 4 Dec 2016
I have this file in .exr extension. I need to know the size of the file and convert the value to kB in order for me to calculate the Mean Squared Error. My supervisor advised me to used dir function but I'mm not sure how to do this. Thanks

  0 Comments

Sign in to comment.

Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 4 Dec 2016
Edited: Azzi Abdelmalek on 4 Dec 2016
s=dir('yourfile')
the_size=s.bytes

  0 Comments

Sign in to comment.


Image Analyst
Image Analyst on 4 Dec 2016
What is your reference image? You need one to compute MSE. You can use the immse() function in the Image Processing Toolbox.
You can use imfinfo() to determine both the file size and the size in your MATLAB program. The sizes may be different if the file had been compressed, like it was stored in JPG format.

  0 Comments

Sign in to comment.

Sign in to answer this question.