DataStore for image sequence

조회 수: 7 (최근 30일)
Valentin Steininger
Valentin Steininger 2019년 10월 28일
댓글: Valentin Steininger 2019년 11월 4일
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!
Best,
Valentin

채택된 답변

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Analytics Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by