How might I improve (make faster) my video extraction?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
So, I use VideoReader to read in my MP4 (~280MB) video file:
VidObj = VideoReader([pname '\' fname]);
The video format for the particular file I am currently extracting is RGB24.
Here's my code for taking my video object and creating my movie array:
MovArr = nan(ceil(VidObj.Height/space_dsFac),ceil(VidObj.Width/space_dsFac),ceil(nVidFrames/temp_dsFac));
count = 0;
for frame = 1:temp_dsFac:nVidFrames
%imageData = double(read(VidObj,frame));
imageData = uint8(read(VidObj,frame));
%downsample
imageDs = imageData(1:space_dsFac:end,1:space_dsFac:end,1);
count = count+1;
MovArr(:,:,count) = imageDs;
multiWaitbar('Extracting video frames...', frame/nVidFrames);
end
I'm just hoping to learn some tips and tricks for making this faster
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!