title: How to convert .mat to image file
body: <p>I'm trying to convert the SVHN format 2 (32x32 cropped images) dataset into a directory of images. Currently, when you download the format 2 of the SVHN images it is in a .mat format. How can I change this .mat format to give me all of the images in png or jpg format? I have loaded the images using SciPy but after that, I'm stuck. I know that SciPy creates a dictionary out of the .mat file containing two keys (X and Y). I know that X is image data and Y is their respective labels. How can I convert this dictionary to all of the cropped images? </p>
  
  <pre><code>import scipy.io
  
  train_data = scipy.io.loadmat('train_32x32.mat')
  </code></pre>
  
  <p>Any help is appreciated, thank you!</p>