# step

System object: vision.MarkerInserter
Package: vision

Draw specified marker on input image

## Syntax

`J = step(markerInserter,I,PTS)J = step(markerInserter,I,PTS,ROI)J = step(markerInserter,I,PTS,...,CLR)`

## Description

`J = step(markerInserter,I,PTS)` draws the marker specified by the `Shape` property on input image `I`. The input `PTS` specify the coordinates for the location of the marker. You can specify the `PTS` input as an M-by-2 [x y] matrix of M number of markers. Each [x y] pair defines the center location of the marker. The markers are embedded on the output image `J`.

`J = step(markerInserter,I,PTS,ROI)` draws the specified marker in a rectangular area defined by the `ROI` input. This applies when you set the `ROIInputPort` property to `true`. The `ROI` input defines a rectangular area as [x y width height], where [x y] determine the upper-left corner location of the rectangle, and width and height specify the size.

`J = step(markerInserter,I,PTS,...,CLR)` draws the marker with the border or fill color specified by the `CLR` input. This applies when you set the `BorderColorSource` property or the `FillColorSource` property to '`Input port`'.

 Note:   `H` specifies the System object™ on which to run this `step` method.The object performs an initialization the first time the `step` method is executed. 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, you must first call the `release` method to unlock the object.

### Input Arguments

`H`

Shape inserter object with shape and properties specified.

`I`

Input image.

`PTS`

Input M-by-2 matrix of M number of [x y] coordinates describing the location for markers. This property must be an integer value. If you enter non-integer value, the object rounds it to the nearest integer.

`$\left[\begin{array}{cc}{x}_{1}& {y}_{1}\\ {x}_{2}& {y}_{2}\\ ⋮& ⋮\\ {x}_{M}& {y}_{M}\end{array}\right]$`

Each [x y] pair defines the center of a marker.

The table below shows the data types required for the inputs, `I` and `PTS`.

Input image `I`Input matrix `PTS`
built-in integerbuilt-in or fixed-point integer
fixed-point integerbuilt-in or fixed-point integer
doubledouble, single, or build-in integer
singledouble, single, or build-in integer

`RGB`

Scalar, vector, or matrix describing one plane of the RGB input video stream.

`ROI`

Input 4-element vector of integers [x y width height], that define a rectangular area in which to draw the shapes. The first two elements represent the one-based coordinates of the upper-left corner of the area. The second two elements represent the width and height of the area.

• Double-precision floating point

• Single-precision floating point

• 8-, 16-, and 32-bit signed integer

• 8-, 16-, and 32-bit unsigned integer

`CLR`

This port can be used to dynamically specify shape color.

P-element vector or an M-by-P matrix, where M is the number of shapes, and P, the number of color planes. You can specify a color (RGB), for each shape, or specify one color for all shapes. The data type for the `CLR` input must be the same as the input image.

### Output Arguments

 `J` Output image. The markers are embedded on the output image.