M-File Help: YUV View code for YUV

YUV

Class to read YUV4MPEG file

A concrete subclass of ImageSource that returns images from a YUV4MPEG format uncompressed video file.

Methods

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

Properties

curFrame The index of the frame just read

See also

ImageSource, Video

SEE ALSO: Video


YUV.YUV

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.

Options

'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

YUV.char

Convert to string

M.char() is a string representing the state of the movie object in human readable form.


YUV.close

Close the image source

M.close() closes the connection to the movie.


YUV.grab

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

Options

'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.

Notes


 

© 1990-2012 Peter Corke.