Main Content

getparamfromfrm2pix

Get frame format parameters

Description

[activePixelsPerLine,activeLines,numPixelsPerFrame] = getparamfromfrm2pix(frm2pix) returns video format parameters from a visionhdl.FrameToPixels System object™.

example

Examples

collapse all

When you choose a standard video format for visionhdl.FrameToPixels, the object computes the frame dimensions. To access these values, call the getparamfromfrm2pix function.

frm2pix = visionhdl.FrameToPixels(...
      'NumComponents',1,...
      'VideoFormat','240p');
[activePixels,activeLines,numPixelsPerFrame] = getparamfromfrm2pix(frm2pix)
activePixels = 
320
activeLines = 
240
numPixelsPerFrame = 
130248

Note that numPixelsPerFrame includes both active and inactive regions of the frame.

Input Arguments

collapse all

The visionhdl.FrameToPixels object converts framed video to a stream of pixel values and control signals. It contains useful parameters regarding the video format.

Output Arguments

collapse all

Number of pixels in a horizontal line of the active video frame, returned as a positive integer.

For custom video formats, this value corresponds to the ActivePixelsPerLine property of the frm2pix object.

Number of horizontal lines in the active video frame, returned as a positive integer.

For custom video formats, this value corresponds to the ActiveVideoLines property of the frm2pix object.

Number of active and inactive pixels in the video frame, returned as a positive integer.

For custom video formats, this value corresponds to the product of the TotalVideoLines and TotalPixelsPerLine properties of the frm2pix object.

Version History

Introduced in R2015a