Image.std#

Image.std(**kwargs: Any) generic | ndarray[source]#

Standard deviation of all pixels

Parameters:

kwargs (dict) – additional keyword arguments passed to numpy.nanstd

Returns:

standard deviation value

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Read('flowers1.png')
>>> img.std()  # std over all planes
np.float64(64.30520799436279)
>>> img.std(axis=(0,1))  # per-plane std
array([74.3457, 50.0397, 65.6138])

Note

  • The return value type is the same as the image type.

  • NaN values are ignored

  • For axis remember the axes are in NumPy order: 0=rows, 1=columns, 2=planes.

Seealso:

stats hist mean var numpy.nanstd numnan