DeployableVideoPlayer object displays video
frames. This player is capable of displaying high definition video
at high frame rates. This video player object supports C code generation.
Starting in R2016b, instead of using the
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example,
= step(obj,x) and
y = obj(x) perform
depVideoPlayer = vision.DeployableVideoPlayer returns
a video player System object,
for displaying video frames. Each call to the
displays the next video frame. This object, unlike the
can generate C code.
depVideoPlayer = vision.DeployableVideoPlayer(___, configures
the video player properties, specified as one or more
arguments. Unspecified properties have default values.
Define and set up your deployable video player object using the constructor.
step method with the deployable
video player object,
depVideoPlayer, and any optional
properties. See the syntax below for using the
step(depVideoPlayer,I) displays one grayscale
or truecolor RGB video frame,
I, in the video player.
step(depVideoPlayer,Y,Cb,Cr) displays one frame of YCbCr 4:2:2 video in the
color components Y, Cb, and Cr when you set the
InputColorFormat property to
YCbCr 4:2:2. The
number of columns in the Cb and Cr components must be half the number of columns in
the Y component.
Location— Location of bottom left corner of video window
Location of bottom left corner of video window, specified as the
comma-separated pair consisting of '
Location' and a
two-element vector. The first and second elements are specified in pixels
and represent the horizontal and vertical coordinates respectively. The
[0 0] represent the bottom left corner of the
screen. The default location depends on the screen resolution, and will
result in a window positioned in the center of the screen.
Name— Video window title bar caption
'Deployable Video Player'
Video window title bar caption, specified as the comma-separated pair
consisting of '
Name' and a character vector.
Size— Size of video display window
True size (1:1)(default) |
Size of video display window, specified as the comma-separated pair
consisting of '
True size (1:1) or
this property is set to
Full-screen, use the
Esc key to exit out of full-screen mode.
CustomSize— Custom size for video player window
[300 410](default) | two-element vector
Custom size for video player window, specified as the comma-separated pair consisting of
CustomSize' and a two-element vector. The first and
second elements are specified in pixels and represent the horizontal and
vertical components respectively. The video data will be resized to fit the
window. This property applies when you set the
Size property to
InputColorFormat— Color format of input signal
Color format of input signal, specified as the comma-separated pair
consisting of '
'YCbCr 4:2:2'. The number
of columns in the Cb and Cr components must be half the number of columns in
|isOpen||Visible or hidden status for video player figure|
|step||Send multidimensional video to computer screen|
Set up System objects to read and view a video file.
videoFReader = vision.VideoFileReader('atrium.mp4'); depVideoPlayer = vision.DeployableVideoPlayer;
Continue to read frames of video until the last frame is read. Exit the loop if user closes the video player window.
cont = ~isDone(videoFReader); while cont frame = step(videoFReader); step(depVideoPlayer, frame); cont = ~isDone(videoFReader) && isOpen(depVideoPlayer); end
Release System objects.