step

System object: visionhdl.ROISelector
Package: visionhdl

Return next pixel in reselected frame

Syntax

[pixel1,ctrl1] = step(ROI,pixelIn,ctrlIn)
[pixel1,ctrl1,...,pixelN,ctrlN] = step(ROI,pixelIn,ctrlIn)
[pixel1,ctrl1,...,pixelN,ctrlN] = step(ROI,pixelIn,ctrlIn,region1,...,regionN)

Description

Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

[pixel1,ctrl1] = step(ROI,pixelIn,ctrlIn) returns the next pixel value, pixel1, and control signals, ctrl1, resulting from masking the active image frame into a single new region. Define the region by setting the Regions property to a 1-by-4 vector, [hPos vPos hSize vSize].

[pixel1,ctrl1,...,pixelN,ctrlN] = step(ROI,pixelIn,ctrlIn) returns the next pixel values, pixel1,...,pixelN, and control signals, ctrl1,...,ctrlN, of each stream resulting from masking the active image frame into 1 to N new active regions, as directed by the Regions property. Set the Regions property to a N-by-4 matrix of region coordinates.

[pixel1,ctrl1,...,pixelN,ctrlN] = step(ROI,pixelIn,ctrlIn,region1,...,regionN) returns the next pixel values of each stream, pixel1,...,pixelN, resulting from masking the active image frame into 1 to N new regions, as directed by the region1,...,regionN arguments. Each region input is a 1-by-4 vector of region coordinates. Use this syntax when you set the RegionsSource property to 'Input Port', and the NumberOfRegions property to N.

This object uses a streaming pixel interface with a structure for frame control signals. This interface enables the object to operate independently of image size and format, and to connect with other Vision HDL Toolbox™ objects. The object accepts and returns a scalar pixel value. The object accepts and returns control signals as a structure containing five 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 object. For a full description of the interface, see Streaming Pixel Interface.

Note

The object performs an initialization the first time you call the step method. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, first call the release method to unlock the object.

Input Arguments

expand all

Specify a visionhdl.ROISelector System object that you created and configured.

Input pixel, specified as a scalar integer value.

  • Any numeric data type.

double and single data types are supported for simulation, but not for HDL code generation.

Control signals accompanying pixel stream, specified as a pixelcontrol structure containing five logical data type signals. The signals describe the validity of the pixel and the location of the pixel in the frame. For more details, see Pixel Control Structure.

Data Types: struct

The four elements that define each region are [hPos vPos hSize vSize]. Use this argument when RegionsSource is set to 'Input port'. You can specify N regions, where N is the NumberOfRegions property value.

Output Arguments

expand all

Output pixels, specified as 1 to N scalar integers.

If you set RegionsSource to 'Input port', N is the value in NumberOfRegions. If you set RegionsSource to 'Property', N is the number of columns in the Regions property.

Control signals indicating the validity of each output pixel and the location of each pixel within the frame, returned as 1 to N structures of five logical signals. See Pixel Control Structure.

If you set RegionsSource to 'Input port', N is the value in NumberOfRegions. If you set RegionsSource to 'Property', N is the number of columns in the Regions property.

Introduced in R2016a