How can I segment a video to frames?
3 views (last 30 days)
Show older comments
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
0 Comments
Answers (2)
Image Analyst
on 3 Jul 2012
See this thread for solutions: http://www.mathworks.com/matlabcentral/answers/25557-mmread-and-aviread-don-t-work
0 Comments
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.)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!