visionhdl.HVCounter
Counts active pixel dimensions of streaming video
Description
The visionhdl.HVCounter
System object™ analyzes a video stream and returns the current count of lines per frame and
pixels per line. The object also delays control signals of the pixel stream to correspond with
the count result. Use this object for algorithms that use the location of a pixel in a frame
or region of interest.
This waveform shows the pixel-stream control signals and the resulting counter outputs for
the first two lines of a video frame that has 10 pixels per line. The
visionhdl.HVCounter
System object has a latency of two cycles to return the current counter values.
To count active lines-per-frame and active pixels-per-line of a pixel stream:
Create the
visionhdl.HVCounter
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
HVcntr = visionhdl.HVCounter
returns a System object that counts the line and pixel location within a frame or
region-of-interest. An object that uses the default values for the properties can count
frames up to (511 pixels)-by-(355 lines).
HVcntr = visionhdl.HVCounter(
returns a System object sets properties using one or more name-value pairs. Enclose each property
name in single quotes. For example, Name
,Value
)HVcnt =
visionhdl.HVCounter('ActivePixelsPerLine',1920,'ActiveVideoLines',1080)
creates an object that can count frames up to (2047 pixels)-by-(2047 lines).
Properties
Usage
Description
This System object uses a structure for frame control signals associated with each pixel of a
pixel stream. This interface enables the object to operate independently of image size and
format. All Vision HDL Toolbox™ System objects use the same streaming interface. The object accepts and
returns a structure containing five control signals. The control signals indicate the
validity of each pixel and its location in the frame. To convert a pixel matrix into a pixel
stream and control signals, use the visionhdl.FrameToPixels
System object. For a full description of the interface, see Streaming Pixel Interface.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2019a