Documentation Center

  • Trial Software
  • Product Updates

vision.StandardDeviation System object

Package: vision

Find standard deviation of input or sequence of inputs

Description

The StandardDeviation object finds standard deviation of input or sequence of inputs.

Construction

H = vision.StandardDeviation returns a System object, H, that computes the standard deviation of the entire input.

H = vision.StandardDeviation(Name,Value) returns a standard deviation System object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1, Value1,...,NameN,ValueN).

Code Generation Support
Supports MATLAB® Function block: Yes
System Objects in MATLAB Code Generation.
Code Generation Support, Usage Notes, and Limitations.

Properties

RunningStandardDeviation

Enable calculation over successive calls to step method

Set this property to true to enable the calculation of standard deviation over successive calls to the step method. The default is false.

ResetInputPort

Reset in running standard deviation mode

Set this property to true to enable resetting the running standard deviation. When the property is set to true, a reset input must be specified to the step method to reset the running standard deviation. This property applies when you set the RunningStandardDeviation property to true. The default is false.

ResetCondition

Reset condition for running standard deviation mode

Specify the event to reset the running standard deviation to Rising edge, Falling edge, Either edge, or Non-zero. This property applies when you set the ResetInputPort property to true. The default is Non-zero.

Dimension

Numerical dimension to operate along

Specify how the standard deviation calculation is performed over the data as All, Row, Column, or Custom. The default is All.

CustomDimension

Numerical dimension to operate along

Specify the dimension (one-based value) of the input signal, over which the standard deviation is computed. The value of this property cannot exceed the number of dimensions in the input signal. This property applies when you set the Dimension property to Custom. The default is 1.

ROIProcessing

Enable region of interest processing

Set this property to true to enable calculating the standard deviation within a particular region of each image. This property applies when you set the Dimension property to All and the RunningStandardDeviation property to false. The default is false.

ROIForm

Type of region of interest

Specify the type of region of interest to Rectangles, Lines, Label matrix, or Binary mask. This property applies when you set the ROIProcessing property to true. The default is Rectangles.

ROIPortion

Calculate over entire ROI or just perimeter

Specify the region over which to calculate the standard deviation to Entire ROI, or ROI perimeter. This property applies when you set the ROIForm property to Rectangles. The default is Entire ROI.

ROIStatistics

Statistics for each ROI, or one for all ROIs

Specify what statistics to calculate as Individual statistics for each ROI, or Single statistic for all ROIs. This property does not apply when you set the ROIForm property to Binary mask. The default is Individual statistics for each ROI

ValidityOutputPort

Output flag indicating if any part of ROI is outside input image

Set this property to true to return the validity of the specified ROI as completely or partially inside of the image. This applies when you set the ROIForm property to Lines or Rectangles.

Set this property to true to return the validity of the specified label numbers. This applies when you set the ROIForm property to Label matrix.

The default is false.

Methods

cloneCreate standard deviation object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and non-tunable properties
release Allow property value and input characteristics changes
resetReset running standard deviation state
stepCompute standard deviation of input

Examples

Determine the standard deviation in a grayscale image.

 img = im2single(rgb2gray(imread('peppers.png')));
 hstd2d = vision.StandardDeviation;
 std = step(hstd2d,img);

Algorithms

This object implements the algorithm, inputs, and outputs described on the Standard Deviation block reference page. The object properties correspond to the block parameters.

Was this topic helpful?