Convert videofile to .mat
Show older comments
Dear Matlab users,
I've written a GUI program to capture images from a connected camcorder (saving as .mat file), analyse the RGB colors of 3 colored markers and use that data to do all kinds of calculations. It will be used for motion analysis.
With MatLab itself it works perfectly, but when compiled to a .exe program, the capturing doesn't work. Its sad, I think it is one of the issues with MatLab compiler, but not really necessary. The analysis part is the most important.
Now I want to use video files (.wmv, .mov, .avi, etc.) that as been saved previously, to be used with my analysis program. I've tried a couple of ways to use those files, but i can't figure out how to get each individual frame from the file.
My question: Is it possible to convert video file formats to an .mat file (as 4D-matrix)?
Answers (1)
Azzi Abdelmalek
on 5 Nov 2013
store frame 1 in A(:,:,:,1)
store frame 2 in A(:,:,:,2)
and so on
then
save filename A
Categories
Find more on Video Formats and Interfaces in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!