I have a text file contains a diffrent directories of video data, but now I don't know how to read those directories line by line from this text file and pass it to a function of reading video, I wish you guys can help me
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
mohammed alalas
el 10 de Oct. de 2017
Respondida: Eric
el 9 de Nov. de 2017
video1 = VideoReader('E:\video\original.avi');
0 comentarios
Respuesta aceptada
Eric
el 9 de Nov. de 2017
It sounds like your question is less about video files and more about how to read a text file containing a list of filepaths to videos that you then want to use to create video reader objects. This should do the trick:
myFile = fopen('MyVideos.txt');
myVidPaths = textscan(myFile,'%s');
fclose(myFile);
for i = 1:numel(myVidPaths{1})
video(i) = VideoReader(myVidPaths{1}{i});
end
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!