Name

ReadImageFromVideo — reads an image from a video file, is called by ReadImage

Calling Sequence

[PixelList Dimensions] = ReadImageFile(ImagePath);

Parameters

ImagePath

the file name or the complete path of an image file

PixelList

column vector that contains the color channel intensities or gray values

Dimensions

column vector that contains the number of rows, columns and color channels

Description

This function reads an image from a video file and returns a pixel list and width, height and number of channels. ReadImage calls this function so you do not need to call it yourself.

Examples

VideoFilePointer = OpenVideoFile('contrib\IPD-3.3\demos\red-car-video.avi');

[PixelList Dimensions] = ReadImageFromVideo(VideoFilePointer);

CloseVideoFile(VideoFile);

RGB = matrix(PixelList, Dimensions);

ShowColorImage(RGB, 'Result');

See also

GetVideoStruct, OpenVideoFile, ReadImage, CloseVideoFile, GetVideoInfo