DataStore for image sequence

9 views (last 30 days)
Hi everyone,
I am trying to set up a custom file datastore for image sequences. I am wondering now what data format the read() method has to output in that case so that the dynamic character of the data doesn't get lost. The docu only says m x n x 3(1) for (greyscale)-images but that cannot be used for sequential images. Is it then a cell array with 4D elements as it would be without using the datastore?
Thanks for your help!

Accepted Answer

Kritika Bansal
Kritika Bansal on 4 Nov 2019
Considering you are referring to a video dataset when you say ‘image sequence’, you can write your ReadFcn in the following manner:
fds = fileDatastore(datapath,'ReadFcn',@readVideo,'FileExtensions','.mp4');
data = readall(fds);
function vid = readVideo(file)
You can refer to the below links for more information on the functions used above:

More Answers (0)

Community Treasure Hunt

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

Start Hunting!