필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Pavlov
Pavlov 2015년 5월 14일
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개)

Community Treasure Hunt

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

Start Hunting!

Translated by