Skip to content

deviation_nDeviationNDeviationNdeviation_ndeviation_n🔗

Short description🔗

deviation_nDeviationNDeviationNdeviation_ndeviation_n — Calculate standard deviation over several channels.

Signature🔗

deviation_n( image Image, out image ImageDeviation )void DeviationN( const HObject& Image, HObject* ImageDeviation )static void HOperatorSet.DeviationN( HObject image, out HObject imageDeviation )def deviation_n( image: HObject ) -> HObject

Herror deviation_n( const Hobject Image, Hobject* ImageDeviation )

Herror T_deviation_n( const Hobject Image, Hobject* ImageDeviation )

HImage HImage::DeviationN( ) const

HImage HImage.DeviationN( )

Description🔗

deviation_nDeviationN generates the pixel-by-pixel standard deviation of a multichannel gray value image. For each coordinate point \(p\) the expected value is defined as the arithmetic mean:

\[\begin{eqnarray*}E = \frac{\sum g_{c}(p)}{n}\end{eqnarray*}\]

where \(g_{c}(p)\) denominates the gray value at \(p\) on channel \(c\). \(n\) is the number of channels in the image.

The standard deviation itself is then calculated as:

\[\begin{eqnarray*}s = 2\cdot\sqrt{\frac{1}{n-1}\cdot\sum(g_{c}(p)-E)^2}\end{eqnarray*}\]

Note that this formula produces the sample standard deviation. The factor 2 is used to make better use of the range of values of the output image format. The output image has one channel.

Attention🔗

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on domain level.

  • Automatically parallelized on tuple level.

Parameters🔗

Imageimageimage (input_object) (multichannel-)image(-array) → object (byte / int2 / uint2 / int4 / real)HObject (byte / int2 / uint2 / int4 / real)HImage (byte / int2 / uint2 / int4 / real)HObject (byte / int2 / uint2 / int4 / real)Hobject (byte / int2 / uint2 / int4 / real)

Multichannel gray image.

ImageDeviationimageDeviationimage_deviation (output_object) image(-array) → object (byte / int2 / uint2 / int4 / real)HObject (byte / int2 / uint2 / int4 / real)HImage (byte / int2 / uint2 / int4 / real)HObject (byte / int2 / uint2 / int4 / real)Hobject * (byte / int2 / uint2 / int4 / real)

Result of calculation.

Combinations with other operators🔗

Combinations

Possible predecessors

compose2Compose2, compose3Compose3, compose4Compose4, compose5Compose5, add_channelsAddChannels

See also

mean_nMeanN

Module🔗

Foundation