class_docstr: Blur an image by computing median values over neighbourhoods.
  
  Median blurring can be used to remove small dirt from images.
  At larger kernel sizes, its effects have some similarity with Superpixels.
  
  **Supported dtypes**:
  
      * ``uint8``: yes; fully tested
      * ``uint16``: ?
      * ``uint32``: ?
      * ``uint64``: ?
      * ``int8``: ?
      * ``int16``: ?
      * ``int32``: ?
      * ``int64``: ?
      * ``float16``: ?
      * ``float32``: ?
      * ``float64``: ?
      * ``float128``: ?
      * ``bool``: ?
  
  Parameters
  ----------
  k : int or tuple of int or list of int or imgaug.parameters.StochasticParameter, optional
      Kernel size.
  
          * If a single ``int``, then that value will be used for the
            height and width of the kernel. Must be an odd value.
          * If a tuple of two ints ``(a, b)``, then the kernel size will be
            an odd value sampled from the interval ``[a..b]``. ``a`` and
            ``b`` must both be odd values.
          * If a list, then a random value will be sampled from that list
            per image.
          * If a ``StochasticParameter``, then ``N`` samples will be drawn
            from that parameter per ``N`` input images, each representing
            the kernel size for the nth image. Expected to be discrete. If
            a sampled value is not odd, then that value will be increased
            by ``1``.
  
  seed : None or int or imgaug.random.RNG or numpy.random.Generator or numpy.random.BitGenerator or numpy.random.SeedSequence or numpy.random.RandomState, optional
      See :func:`~imgaug.augmenters.meta.Augmenter.__init__`.
  
  name : None or str, optional
      See :func:`~imgaug.augmenters.meta.Augmenter.__init__`.
  
  random_state : None or int or imgaug.random.RNG or numpy.random.Generator or numpy.random.BitGenerator or numpy.random.SeedSequence or numpy.random.RandomState, optional
      Old name for parameter `seed`.
      Its usage will not yet cause a deprecation warning,
      but it is still recommended to use `seed` now.
      Outdated since 0.4.0.
  
  deterministic : bool, optional
      Deprecated since 0.4.0.
      See method ``to_deterministic()`` for an alternative and for
      details about what the "deterministic mode" actually does.
  
  Examples
  --------
  >>> import imgaug.augmenters as iaa
  >>> aug = iaa.MedianBlur(k=5)
  
  Blur all images using a kernel size of ``5x5``.
  
  >>> aug = iaa.MedianBlur(k=(3, 7))
  
  Blur images using varying kernel sizes, which are sampled uniformly from
  the interval ``[3..7]``. Only odd values will be sampled, i.e. ``3``
  or ``5`` or ``7``.
class_docstr_tok: ["Blur","an","image","by","computing","median","values","over","neighbourhoods",".","Median","blurring","can","be","used","to","remove","small","dirt","from","images",".","At","larger","kernel","sizes",",","its","effects","have","some","similarity","with","Superpixels",".","*","*","Supported","dtypes","*","*",":","*","``","uint8","``",":","yes",";","fully","tested","*","``","uint16","``",":","?","*","``","uint32","``",":","?","*","``","uint64","``",":","?","*","``","int8","``",":","?","*","``","int16","``",":","?","*","``","int32","``",":","?","*","``","int64","``",":","?","*","``","float16","``",":","?","*","``","float32","``",":","?","*","``","float64","``",":","?","*","``","float128","``",":","?","*","``","bool","``",":","?","Parameters","--","--","--","--","--","k",":","int","or","tuple","of","int","or","list","of","int","or","imgaug.parameters.StochasticParameter",",","optional","Kernel","size",".","*","If","a","single","``","int","``",",","then","that","value","will","be","used","for","the","height","and","width","of","the","kernel",".","Must","be","an","odd","value",".","*","If","a","tuple","of","two","ints","``","(","a",",","b",")","``",",","then","the","kernel","size","will","be","an","odd","value","sampled","from","the","interval","``","[","a","..","b","]","``",".","``","a","``","and","``","b","``","must","both","be","odd","values",".","*","If","a","list",",","then","a","random","value","will","be","sampled","from","that","list","per","image",".","*","If","a","``","StochasticParameter","``",",","then","``","N","``","samples","will","be","drawn","from","that","parameter","per","``","N","``","input","images",",","each","representing","the","kernel","size","for","the","nth","image",".","Expected","to","be","discrete",".","If","a","sampled","value","is","not","odd",",","then","that","value","will","be","increased","by","``","1","``",".","seed",":","None","or","int","or","imgaug.random.RNG","or","numpy.random.Generator","or","numpy.random.BitGenerator","or","numpy.random.SeedSequence","or","numpy.random.RandomState",",","optional","See",":","func",":","`","~imgaug.augmenters.meta.Augmenter.__init__","`",".","name",":","None","or","str",",","optional","See",":","func",":","`","~imgaug.augmenters.meta.Augmenter.__init__","`",".","random_state",":","None","or","int","or","imgaug.random.RNG","or","numpy.random.Generator","or","numpy.random.BitGenerator","or","numpy.random.SeedSequence","or","numpy.random.RandomState",",","optional","Old","name","for","parameter","`","seed","`",".","Its","usage","will","not","yet","cause","a","deprecation","warning",",","but","it","is","still","recommended","to","use","`","seed","`","now",".","Outdated","since","0.4.0.","deterministic",":","bool",",","optional","Deprecated","since","0.4.0",".","See","method","``","to_deterministic","(",")","``","for","an","alternative","and","for","details","about","what","the","``","deterministic","mode","''","actually","does",".","Examples","--","--","--","--",">",">",">","import","imgaug.augmenters","as","iaa",">",">",">","aug","=","iaa.MedianBlur","(","k=5",")","Blur","all","images","using","a","kernel","size","of","``","5x5","``",".",">",">",">","aug","=","iaa.MedianBlur","(","k=","(","3",",","7",")",")","Blur","images","using","varying","kernel","sizes",",","which","are","sampled","uniformly","from","the","interval","``","[","3","..","7","]","``",".","Only","odd","values","will","be","sampled",",","i.e",".","``","3","``","or","``","5","``","or","``","7","``","."]
code: def __init__(
      self,
      k=(1, 7),
      seed=None,
      name=None,
      random_state="deprecated",
      deterministic="deprecated",
  ):
      super(MedianBlur, self).__init__(
          seed=seed,
          name=name,
          random_state=random_state,
          deterministic=deterministic,
      )
  
      # TODO replace this by iap.handle_discrete_kernel_size()
      self.k = iap.handle_discrete_param(
          k,
          "k",
          value_range=(1, None),
          tuple_to_uniform=True,
          list_to_choice=True,
          allow_floats=False,
      )
      if ia.is_single_integer(k):
          assert (
              k % 2 != 0
          ), "Expected k to be odd, got %d. Add or subtract 1." % (
              int(k),
          )
      elif ia.is_iterable(k):
          assert all([ki % 2 != 0 for ki in k]), (
              "Expected all values in iterable k to be odd, but at least "
              "one was not. Add or subtract 1 to/from that value."
          )
      self.k = iap._wrap_leafs_of_param_in_prefetchers(
          self.k, iap._NB_PREFETCH
      )
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  from scipy import ndimage
  import cv2
  import six.moves
  import imgaug
  from imgaug.imgaug import _normalize_cv2_input_arr_
  from .None import meta
  from .None import convolutional
  from ..None import parameters
  from ..None import dtypes
label_desc: Use image node_id 1 to create a new MedianBlur object from inherited base classes: meta with example: obj = MedianBlur(k, seed, name, random_state, deterministic)