How can I segment a video to frames?

3 views (last 30 days)
LukaW
LukaW on 3 Jul 2012
Hello,
i have a problem with segmentation of the video...below is a part of the code for segment a video to each segment and each segment to frames:
startIRFrame = floor(usage_history(i,1) * fps);
if i<numberOfPhotos+1
endIRFrame = floor(usage_history(i+1,1) * fps);
else
endIRFrame = FileInformation.NumberOfFrames;
end
indexvideo = [startIRFrame:endIRFrame]; %from 1. to last frame
mov = aviread(filename,indexvideo);
but there is an error about an "aviread" function:
"??? Error using ==> aviread at 84
Unable to locate decompressor to decompress video stream."
Can anyone explain what is the issue here and how to solve this?
Thanks,
Luka

Answers (2)

Image Analyst
Image Analyst on 3 Jul 2012

Walter Roberson
Walter Roberson on 3 Jul 2012
Are you using a 64 bit version of MATLAB on MS Windows? And was the AVI created with Indeo5 ? If so, then there is no way to obtain the decompressor for it (the company that owns the rights has indicated that they will not be creating a 64 bit version of Indeo5.)
In the situation, either create the file with a different codec, or use the 32 bit version of MATLAB to read it (after installing the codec.)
  1 Comment
LukaW
LukaW on 3 Jul 2012
Edited: LukaW on 3 Jul 2012
Thanks for the answer!
I'm using 32-bit version (R2010a). The codec used in compression is DVSD. I managed to solve the problem by import the video in VideoDub and then extract it not using any kind of compression, but i'm afraid this is only a part time solution, because it is taking a lot of time and space (enormous files - >5Gb)...

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!