M-File Help: YUV | View code for YUV |
Class to read YUV4MPEG file
A concrete subclass of ImageSource that returns images from a YUV4MPEG format uncompressed video file.
grab | Aquire and return the next image |
size | Size of image |
close | Close the image source |
char | Convert the object parameters to human readable string |
curFrame | The index of the frame just read |
SEE ALSO: Video
YUV4MPEG sequence constructor
y = YUV(file, options) is a YUV4MPEG object that returns frames from the yuv4mpeg format file file. This file contains uncompressed color images in 4:2:0 format, with a full resolution luminance plane followed by U and V planes at half resolution both directions.
'uint8' | Return image with uint8 pixels (default) |
'float' | Return image with float pixels |
'double' | Return image with double precision pixels |
'grey' | Return greyscale image |
'gamma', G | Apply gamma correction with gamma=G |
'scale', S | Subsample the image by S in both directions |
'skip', S | Read every S'th frame from the movie |
Convert to string
M.char() is a string representing the state of the movie object in human readable form.
Close the image source
M.close() closes the connection to the movie.
Acquire next frame from movie
im = Y.grab(options) is the next frame from the file.
[y,u,v] = y.grab(options) is the next frame from the file
'skip', S | Skip frames, and return current+S frame (default 1) |
'rgb' | Return as an RGB image, Y image is downsized by two (default). |
'rgb2' | Return as an RGB image, U and V images are upsized by two. |
'yuv' | Return Y, U and V images. |
© 1990-2012 Peter Corke.