How to get the width and height of a given yuv file? The dimensions are needed for subsequent movie/matrix processing. Thank you.
views:
43answers:
1
A:
From the help of VIDEOREADER
%# create reader object (does not load file yet)
xyloObj = VideoReader('xylophone.mpg');
%# query dimensions
nFrames = xyloObj.NumberOfFrames;
vidHeight = xyloObj.Height;
vidWidth = xyloObj.Width;
EDIT
For older versions of Matlab, you can use AVIINFO to query the properties of a movie.
Jonas
2010-10-08 11:42:21
But it seems that VideoReader is not a build-in function in Matlab, is it?
appi
2010-10-13 03:37:55
@yoursclark: The link I provide in my answer does point to the official Matlab documentation, so yes, it is a built-in function in more recent versions of Matlab. However, the function has not been around forever. Which version are you working with?
Jonas
2010-10-13 14:22:44
Oh I see. I'm currently using Matlab R2008a. So I guess the function is not accessible under my version?
appi
2010-10-16 05:11:02
@yoursclark: Looks like it. In your version, `aviinfo` should do the job, though. Check the link in my edit.
Jonas
2010-10-16 14:18:27
Thank you Jonas!
appi
2010-10-17 03:52:40