Filter löschen
Filter löschen

How might I improve (make faster) my video extraction?

1 Ansicht (letzte 30 Tage)
Pavlov
Pavlov am 14 Mai 2015
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

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by