I have an image dataset in the .mat format, what I want is to load this dataset and visualize it's images to interact with them such as resize them and save them in folder in the format that enable me to show them such as .jpg, .png, etc. How can I do that? What I did is save the dataset in the scipy.io path in the python site-packages and write the following code:
import scipy.io as sio
dbpath = sio.loadmat('COFW_train_color.mat')
listing = os.listdir(dbpath)
num_samples = size(dbpath)
for file in listing:
im = (dbpath + '\\' + file)
imag = cv2.imread(im)
cv2.imshow(imag)
But this did not give me what i need and also return me the following error:
FileNotFoundError: [Errno 2] No such file or directory: 'COFW_train_color.mat'
I also tried to use the full path to the dataset as folloe:
dbpath = "C:\\Users\\SONY\\AppData\\Local\\Programs\\Python\\Python35\\Lib\\site-packages\\scipy\\io\\COFW_train_color.mat"
but I received another error message:
NotImplementedError: Please use HDF reader for matlab v7.3 files
How can I reach and interact with this type of dataset and visualize it's images? can anyone please help me and I will be thankful.