How to open .mat files and simply explore the content in it?

19 views (last 30 days)
How to open the following .mat file and explore it in matlab editor.
I tried to load it using 'load' command and used 'imshow' but it is not working.
  4 Comments
Stephen23
Stephen23 on 7 Oct 2020
Edited: Stephen23 on 7 Oct 2020
" I tried the following code: storedStructure = load('SUN_urls.mat'); figure(1);imshow(1);"
The .mat file contains one structure array of size 1x900 with three fields:
  1. category : an alphabetical list of objects
  2. annotation : URLs to some XML files
  3. images : URLs to some JPG files
The .mat file does not contain any image data. To get the images you will need to download them from those URLS.
Harsha Priya G
Harsha Priya G on 11 Oct 2020
How to open these filler_images.mat,target_images.mat,target_features.mat?
Kindly help out.Thanks in advance.

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 7 Oct 2020
Edited: Ameer Hamza on 7 Oct 2020
Your mat file contains a struct array. Which does not contain the images itself, but the url of images. You need to use imread() to load those images and then use imshow(). Here is an example
data = load('SUN_urls.mat');
SUN = data.SUN;
url = SUN(1).images{1};
img = imread(url);
imshow(img);
  3 Comments
Ameer Hamza
Ameer Hamza on 9 Oct 2020
You can write a loop and go through all the URLs to download them. I am not sure how the pre-computed features and annotations are available.
Harsha Priya G
Harsha Priya G on 11 Oct 2020
How to open these filler_images.mat, target_images.mat, target_features.mat?
My Data Link: https://rb.gy/vbxegz
I tried as same format above but couldn't see what is in it..

Sign in to comment.

More Answers (0)

Categories

Find more on Large Files and Big Data in Help Center and File Exchange

Tags

Products


Release

R2012b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!