class_docstr: Blur an image by computing simple means over neighbourhoods.
  
  The padding behaviour around the image borders is cv2's
  ``BORDER_REFLECT_101``.
  
  **Supported dtypes**:
  
      * ``uint8``: yes; fully tested
      * ``uint16``: yes; tested
      * ``uint32``: no (1)
      * ``uint64``: no (2)
      * ``int8``: yes; tested (3)
      * ``int16``: yes; tested
      * ``int32``: no (4)
      * ``int64``: no (5)
      * ``float16``: yes; tested (6)
      * ``float32``: yes; tested
      * ``float64``: yes; tested
      * ``float128``: no
      * ``bool``: yes; tested (7)
  
      - (1) rejected by ``cv2.blur()``
      - (2) loss of resolution in ``cv2.blur()`` (result is ``int32``)
      - (3) ``int8`` is mapped internally to ``int16``, ``int8`` itself
            leads to cv2 error "Unsupported combination of source format
            (=1), and buffer format (=4) in function 'getRowSumFilter'" in
            ``cv2``
      - (4) results too inaccurate
      - (5) loss of resolution in ``cv2.blur()`` (result is ``int32``)
      - (6) ``float16`` is mapped internally to ``float32``
      - (7) ``bool`` is mapped internally to ``float32``
  
  Parameters
  ----------
  k : int or tuple of int or tuple of tuple of int or imgaug.parameters.StochasticParameter or tuple of StochasticParameter, optional
      Kernel size to use.
  
          * If a single ``int``, then that value will be used for the height
            and width of the kernel.
          * If a tuple of two ``int`` s ``(a, b)``, then the kernel size will
            be sampled from the interval ``[a..b]``.
          * If a tuple of two tuples of ``int`` s ``((a, b), (c, d))``,
            then per image a random kernel height will be sampled from the
            interval ``[a..b]`` and a random kernel width will be sampled
            from the interval ``[c..d]``.
          * If a ``StochasticParameter``, then ``N`` samples will be drawn
            from that parameter per ``N`` input images, each representing
            the kernel size for the n-th image.
          * If a tuple ``(a, b)``, where either ``a`` or ``b`` is a tuple,
            then ``a`` and ``b`` will be treated according to the rules
            above. This leads to different values for height and width of
            the kernel.
  
  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.AverageBlur(k=5)
  
  Blur all images using a kernel size of ``5x5``.
  
  >>> aug = iaa.AverageBlur(k=(2, 5))
  
  Blur images using a varying kernel size, which is sampled (per image)
  uniformly from the interval ``[2..5]``.
  
  >>> aug = iaa.AverageBlur(k=((5, 7), (1, 3)))
  
  Blur images using a varying kernel size, which's height is sampled
  (per image) uniformly from the interval ``[5..7]`` and which's width is
  sampled (per image) uniformly from ``[1..3]``.
class_docstr_tok: ["Blur","an","image","by","computing","simple","means","over","neighbourhoods",".","The","padding","behaviour","around","the","image","borders","is","cv2's","``","BORDER_REFLECT_101","``",".","*","*","Supported","dtypes","*","*",":","*","``","uint8","``",":","yes",";","fully","tested","*","``","uint16","``",":","yes",";","tested","*","``","uint32","``",":","no","(","1",")","*","``","uint64","``",":","no","(","2",")","*","``","int8","``",":","yes",";","tested","(","3",")","*","``","int16","``",":","yes",";","tested","*","``","int32","``",":","no","(","4",")","*","``","int64","``",":","no","(","5",")","*","``","float16","``",":","yes",";","tested","(","6",")","*","``","float32","``",":","yes",";","tested","*","``","float64","``",":","yes",";","tested","*","``","float128","``",":","no","*","``","bool","``",":","yes",";","tested","(","7",")","-","(","1",")","rejected","by","``","cv2.blur","(",")","``","-","(","2",")","loss","of","resolution","in","``","cv2.blur","(",")","``","(","result","is","``","int32","``",")","-","(","3",")","``","int8","``","is","mapped","internally","to","``","int16","``",",","``","int8","``","itself","leads","to","cv2","error","``","Unsupported","combination","of","source","format","(","=1",")",",","and","buffer","format","(","=4",")","in","function","'getRowSumFilter","'","''","in","``","cv2","``","-","(","4",")","results","too","inaccurate","-","(","5",")","loss","of","resolution","in","``","cv2.blur","(",")","``","(","result","is","``","int32","``",")","-","(","6",")","``","float16","``","is","mapped","internally","to","``","float32","``","-","(","7",")","``","bool","``","is","mapped","internally","to","``","float32","``","Parameters","--","--","--","--","--","k",":","int","or","tuple","of","int","or","tuple","of","tuple","of","int","or","imgaug.parameters.StochasticParameter","or","tuple","of","StochasticParameter",",","optional","Kernel","size","to","use",".","*","If","a","single","``","int","``",",","then","that","value","will","be","used","for","the","height","and","width","of","the","kernel",".","*","If","a","tuple","of","two","``","int","``","s","``","(","a",",","b",")","``",",","then","the","kernel","size","will","be","sampled","from","the","interval","``","[","a","..","b","]","``",".","*","If","a","tuple","of","two","tuples","of","``","int","``","s","``","(","(","a",",","b",")",",","(","c",",","d",")",")","``",",","then","per","image","a","random","kernel","height","will","be","sampled","from","the","interval","``","[","a","..","b","]","``","and","a","random","kernel","width","will","be","sampled","from","the","interval","``","[","c","..","d","]","``",".","*","If","a","``","StochasticParameter","``",",","then","``","N","``","samples","will","be","drawn","from","that","parameter","per","``","N","``","input","images",",","each","representing","the","kernel","size","for","the","n-th","image",".","*","If","a","tuple","``","(","a",",","b",")","``",",","where","either","``","a","``","or","``","b","``","is","a","tuple",",","then","``","a","``","and","``","b","``","will","be","treated","according","to","the","rules","above",".","This","leads","to","different","values","for","height","and","width","of","the","kernel",".","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.AverageBlur","(","k=5",")","Blur","all","images","using","a","kernel","size","of","``","5x5","``",".",">",">",">","aug","=","iaa.AverageBlur","(","k=","(","2",",","5",")",")","Blur","images","using","a","varying","kernel","size",",","which","is","sampled","(","per","image",")","uniformly","from","the","interval","``","[","2","..","5","]","``",".",">",">",">","aug","=","iaa.AverageBlur","(","k=","(","(","5",",","7",")",",","(","1",",","3",")",")",")","Blur","images","using","a","varying","kernel","size",",","which","'s","height","is","sampled","(","per","image",")","uniformly","from","the","interval","``","[","5","..","7","]","``","and","which","'s","width","is","sampled","(","per","image",")","uniformly","from","``","[","1","..","3","]","``","."]
code: def _augment_batch_(self, batch, random_state, parents, hooks):
      if batch.images is None:
          return batch
  
      images = batch.images
  
      nb_images = len(images)
      if self.mode == "single":
          samples = self.k.draw_samples(
              (nb_images,), random_state=random_state
          )
          samples = (samples, samples)
      else:
          rss = random_state.duplicate(2)
          samples = (
              self.k[0].draw_samples((nb_images,), random_state=rss[0]),
              self.k[1].draw_samples((nb_images,), random_state=rss[1]),
          )
  
      gen = enumerate(zip(images, samples[0], samples[1]))
      for i, (image, ksize_h, ksize_w) in gen:
          batch.images[i] = blur_avg_(image, (ksize_h, ksize_w))
      return batch
  
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 2 for calling the AverageBlur obj's underlying member method code with example usage: obj._augment_batch_(batch, random_state, parents, hooks) and returns: batch, batch