MATLAB: Convert mat file to jpg

image processing

hello guys i have mat files with the size of 512*1024*128 where 128 is the number of images and 512*1024 is the size of the image all i am trying to do is to convert these images to ipg or png files with order so the first image is 1.png and the second image is 2.png till 128.png
thanks for your assist

Best Answer

A slight adaptation of the FAQ to extract your images from your 3-D array
imageArray = array3d(:, :, k);
rather than calling imread()
imageArray = imread(fullFileName);