# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# step

System object: vision.Maximum
Package: vision

Compute maximum value

## Syntax

```[VAL,IND] = step(H,X) VAL = step(H,X) IND = step(H,X) VAL = step(H,X,R) [...] = step(H,I,ROI) [...] = step(H,I,LABEL,LABELNUMBERS) [...,FLAG] = step(H,I,ROI) [...,FLAG] = step(H,I,LABEL,LABELNUMBERS) ```

## 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.

`[VAL,IND] = step(H,X)` returns the maximum value, `VAL`, and the index or position of the maximum value, `IND`, along a dimension of `X` specified by the value of the `Dimension` property.

`VAL = step(H,X)` returns the maximum value, `VAL`, of the input `X`. When the `RunningMaximum` property is `true`, `VAL` corresponds to the maximum value over a sequence of inputs.

`IND = step(H,X)` returns the zero- or one-based index `IND` of the maximum value. To enable this type of processing, set the `IndexOutputPort` property to `true` and the `ValueOutputPort` and `RunningMaximum` properties to `false`.

`VAL = step(H,X,R)` computes the maximum value, `VAL`, over a sequence of inputs, and resets the state of `H` based on the value of reset signal, `R`, and the `ResetCondition` property. To enable this type of processing, set the `RunningMaximum` property to `true` and the `ResetInputPort` property to `true`.

`[...] = step(H,I,ROI)` computes the maximum of an input image, `I`, within the given region of interest, `ROI`. To enable this type of processing, set the `ROIProcessing` property to `true` and the `ROIForm` property to `Lines`, `Rectangles` or ```Binary mask```.

`[...] = step(H,I,LABEL,LABELNUMBERS)` computes the maximum of an input image, `I`, for a region whose labels are specified in the vector `LABELNUMBERS`. To enable this type of processing, set the `ROIProcessing` property to `true` and the `ROIForm` property to `Label matrix`.

`[...,FLAG] = step(H,I,ROI)` also returns `FLAG`, indicating whether the given region of interest is within the image bounds. To enable this type of processing, set the `ROIProcessing` and `ValidityOutputPort` properties to `true` and the `ROIForm` property to `Lines`, `Rectangles` or ```Binary mask```.

`[...,FLAG] = step(H,I,LABEL,LABELNUMBERS)` also returns `FLAG`, indicating whether the input label numbers are valid. To enable this type of processing, set the `ROIProcessing` and `ValidityOutputPort` properties to `true` and the `ROIForm` property to `Label matrix`.

### 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.

Download now