How might I improve (make faster) my video extraction?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio and Video Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!