How to queue a list of videos for analysis?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mark Lepage
el 30 de Oct. de 2017
Respondida: Mabin Mariam Joseph
el 8 de Nov. de 2017
Hello,
I have a program written that does certain analysis on a video. However, I need to perform this analysis on many videos, thus is manually time consuming to load the next video into the program. Is there a way to queue a list of videos to be inputted in my program?
My pseudo code currently looks something like this:
obj = VideoReader('myVideo-1.MOV')
results = SOMEANALYSIS(obj)
My videos are in some form of myVideo-1, 'myVideo-2,..., myVideo-n, where n denotes the number of the video I am analysing.
Any input is appreciated.
0 comentarios
Respuesta aceptada
Mabin Mariam Joseph
el 8 de Nov. de 2017
Hello Mark,
You can use create a 'FileDatastore' object that can hold all the video files. The 'ReadFcn' property of the datastore object is a function that reads the file data specified as a function handle. Please see the sample code below:
loc='location of the files';
fds = fileDatastore(loc,'ReadFcn',@myread,'FileExtensions','.mp4');
data = readall(fds);
function v = myread(file)
v=VideoReader(file);
end
You can also refer to the following MATLAB Documentation links for further information:
https://www.mathworks.com/help/matlab/ref/filedatastore.html
https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.readall.html
https://www.mathworks.com/help/matlab/datastore.html
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!