o
    &j                    @   s  d Z ddlmZmZmZ ddlZddlZddlZ	ddl
mZ ddl
mZ ddl
mZ dd	l
mZ d
Zdd Zdd ZdbddZdcddZdcddZdcddZdcddZdcddZdcddZddddZdcd d!Zdcd"d#Zdcd$d%Zdcd&d'Z dcd(d)Z!dcd*d+Z"dcd,d-Z#dcd.d/Z$dcd0d1Z%dcd2d3Z&dcd4d5Z'dcd6d7Z(dcd8d9Z)G d:d; d;ej*Z+G d<d= d=e+Z,G d>d? d?e+Z-G d@dA dAe+Z.G dBdC dCe+Z/G dDdE dEe+Z0G dFdG dGe+Z1G dHdI dIe+Z2G dJdK dKe+Z3G dLdM dMe+Z4G dNdO dOe+Z5G dPdQ dQe+Z6G dRdS dSe+Z7G dTdU dUe+Z8G dVdW dWe+Z9G dXdY dYe+Z:G dZd[ d[e+Z;G d\d] d]e+Z<G d^d_ d_e+Z=G d`da dae+Z>dS )eap  
Augmenters that wrap methods from ``imagecorruptions`` package.

See `https://github.com/bethgelab/imagecorruptions`_ for the package.

The package is derived from `https://github.com/hendrycks/robustness`_.
The corresponding `paper <https://arxiv.org/abs/1807.01697>`_ is::

    Hendrycks, Dan and Dietterich, Thomas G.
    Benchmarking Neural Network Robustness to Common Corruptions and
    Surface Variations

with the `newer version <https://arxiv.org/abs/1903.12261>`_ being::

    Hendrycks, Dan and Dietterich, Thomas G.
    Benchmarking Neural Network Robustness to Common Corruptions and
    Perturbations

List of augmenters:

    * :class:`GaussianNoise`
    * :class:`ShotNoise`
    * :class:`ImpulseNoise`
    * :class:`SpeckleNoise`
    * :class:`GaussianBlur`
    * :class:`GlassBlur`
    * :class:`DefocusBlur`
    * :class:`MotionBlur`
    * :class:`ZoomBlur`
    * :class:`Fog`
    * :class:`Frost`
    * :class:`Snow`
    * :class:`Spatter`
    * :class:`Contrast`
    * :class:`Brightness`
    * :class:`Saturate`
    * :class:`JpegCompression`
    * :class:`Pixelate`
    * :class:`ElasticTransform`

.. note::

    The functions provided here have identical outputs to the ones in
    ``imagecorruptions`` when called using the ``corrupt()`` function of
    that package. E.g. the outputs are always ``uint8`` and not
    ``float32`` or ``float64``.

Example usage::

    >>> # Skip the doctests in this file as the imagecorruptions package is
    >>> # not available in all python versions that are otherwise supported
    >>> # by imgaug.
    >>> # doctest: +SKIP
    >>> import imgaug as ia
    >>> import imgaug.augmenters as iaa
    >>> import numpy as np
    >>> image = np.zeros((64, 64, 3), dtype=np.uint8)
    >>> names, funcs = iaa.imgcorruptlike.get_corruption_names("validation")
    >>> for name, func in zip(names, funcs):
    >>>     image_aug = func(image, severity=5, seed=1)
    >>>     image_aug = ia.draw_text(image_aug, x=20, y=20, text=name)
    >>>     ia.imshow(image_aug)

    Use e.g. ``iaa.imgcorruptlike.GaussianNoise(severity=2)(images=...)`` to
    create and apply a specific augmenter.

Added in 0.4.0.

    )print_functiondivisionabsolute_importN   )dtypes)random)
parameters   )metaaE  Could not import package `imagecorruptions`. This is an optional dependency of imgaug and must be installed manually in order to use augmenters from `imgaug.augmenters.imgcorrupt`. Use e.g. `pip install imagecorruptions` to install it. See also https://github.com/bethgelab/imagecorruptions for the repository of the package.c                 C   s   ddl m} t T tdd tt| jd t	| }| jd | d }tt| jd t	| }| jd | d }|| ||| ||| f ||dfdd} | W  d    S 1 saw   Y  d S )Nr   )zoomignorez.*output shape of zoom.*r   r	   )order)
Zscipy.ndimager   warningscatch_warningsfilterwarningsintnpceilshapefloat)ZimgZzoom_factorZscizoomZch0Ztop0Zch1Ztop1 r   a/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/imgaug/augmenters/imgcorruptlike.py_clipped_zoom_no_scipy_warning_   s   

$r   c                 O   s  zt   ddlm} W d   n1 sw   Y  W n ty'   ttw t|_|d }tj	|dgg ddd |j
}|dd \}}	|dkrN|	dksVJ d|j
f |j}
|
dksp|
d	krh|j
d d
v spJ d|j
f |
dkr{|dtjf }|j
d dkrt|d}|rddl}|j|}t|/ t| r| |g|dd R i |}nt|| |g|dd R i |}W d   n1 sw   Y  |rt|}|
dkr|dddddf }n|d dkr|ddddddf }t|}|S )a  Apply an ``imagecorruptions`` function.

    The dtype support below is basically a placeholder to which the
    augmentation functions can point to decrease the amount of documentation.

    Added in 0.4.0.

    **Supported dtypes**:

        * ``uint8``: yes; indirectly tested (1)
        * ``uint16``: no
        * ``uint32``: no
        * ``uint64``: no
        * ``int8``: no
        * ``int16``: no
        * ``int32``: no
        * ``int64``: no
        * ``float16``: no
        * ``float32``: no
        * ``float64``: no
        * ``float128``: no
        * ``bool``: no

        - (1) Tested by comparison with function in ``imagecorruptions``
              package.

    r   Nuint8)boolZuint16Zuint32Zuint64Zuint128Zuint256Zint8int16Zint32Zint64Zint128Zint256Zfloat16Zfloat32Zfloat64Zfloat96Zfloat128Zfloat256)allowedZ
disallowedZ	augmenterr       zExpected the provided image to have a width and height of at least 32 pixels, as that is the lower limit that the wrapped imagecorruptions functions use. Got shape %s.   )r	   r   zmExpected input image to have shape (height, width) or (height, width, 1) or (height, width, 3). Got shape %s..r	   )r	   r	   r   )r   r   Zimagecorruptions.corruptionscorruptionsImportError_MISSING_PACKAGE_ERROR_MSGr   Zclipped_zoomiadtZgate_dtypesr   ndimr   ZnewaxisZtileZ	PIL.ImageZImageZ	fromarrayiarandomZtemporary_numpy_seediaZis_callablegetattrZasarrayr   )fnameseedZconvert_to_pilargskwargsr    imageZinput_shapeheightwidthr$   ZPILZ	image_augr   r   r   _call_imgcorrupt_funcs   sf   

 
 $

r/   commonc                 C   sl   zt   ddl}W d   n1 sw   Y  W n ty%   ttw || }dd |D }||fS )a  Get a named subset of image corruption functions.

    .. note::

        This function returns the augmentation names (as strings) *and* the
        corresponding augmentation functions, while ``get_corruption_names()``
        in ``imagecorruptions`` only returns the augmentation names.

    Added in 0.4.0.

    Parameters
    ----------
    subset : {'common', 'validation', 'all'}, optional.
        Name of the subset of image corruption functions.

    Returns
    -------
    list of str
        Names of the corruption methods, e.g. "gaussian_noise".

    list of callable
        Function corresponding to the name. Is one of the
        ``apply_*()`` functions in this module. Apply e.g.
        via ``func(image, severity=2, seed=123)``.

    r   Nc                 S   s   g | ]
}t  d |f  qS )zapply_%s)globals).0cnamer   r   r   
<listcomp>   s    z(get_corruption_names.<locals>.<listcomp>)r   r   imagecorruptionsr!   r"   get_corruption_names)Zsubsetr5   Zcnamesfuncsr   r   r   r6      s   


r6   c                 C      t d|d| |S )a  Apply ``gaussian_noise`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zgaussian_noiseFr/   xseverityr)   r   r   r   apply_gaussian_noise     r=   c                 C   r8   )a  Apply ``shot_noise`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Z
shot_noiseFr9   r:   r   r   r   apply_shot_noise,  r>   r?   c                 C   r8   )a  Apply ``impulse_noise`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zimpulse_noiseFr9   r:   r   r   r   apply_impulse_noiseL  r>   r@   c                 C   r8   )a  Apply ``speckle_noise`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zspeckle_noiseFr9   r:   r   r   r   apply_speckle_noisel  r>   rA   c                 C   r8   )a  Apply ``gaussian_blur`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zgaussian_blurFr9   r:   r   r   r   apply_gaussian_blur  r>   rB   c                 C   s   t t|d| |S )a  Apply ``glass_blur`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    F)r/   _apply_glass_blur_imgaugr:   r   r   r   apply_glass_blur     
rD   c                 C   s  ddl m} g d|d  }|\}}}t|t| d |ddd } t| j}|d d	|  }|d d	|  }	t|D ]w}
tjj| |||	d	fd
}|	tj
}tj|d	dd}tj||d |d f|d |d fdfdd}t|d | |dD ]8}t|d | |dD ]+}|||d d f \}}|| || }}| ||f | ||f | ||f< | ||f< qq|q>t|| d |ddddd S )Nr   )gaussian))gffffff?r	   r   )g?r   r	   )r	   r   r   )g?r   r   )g      ?   r   r	   g     o@T)sigmaZmultichannel   r   )size)r	   r   )Zaxes)r   r   Zconstant)moder   )Zskimage.filtersrF   r   r   arrayr   ranger   randintZastyper   Zrot90padZclip)r;   r<   rF   crH   Z	max_deltaZ
iterationsZx_shapeZ	nb_heightZnb_width_ZdxxdyyhwZdxZdyZh_primeZw_primer   r   r   rC     sF   
 ,rC   c                 C   r8   )a  Apply ``defocus_blur`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zdefocus_blurFr9   r:   r   r   r   apply_defocus_blur	  r>   rT   c                 C   r8   )a  Apply ``motion_blur`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zmotion_blurFr9   r:   r   r   r   apply_motion_blur)  r>   rU   c                 C   r8   )a  Apply ``zoom_blur`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Z	zoom_blurFr9   r:   r   r   r   apply_zoom_blurI  r>   rV   c                 C   r8   )a  Apply ``fog`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    fogFr9   r:   r   r   r   	apply_fogi  r>   rX   c                 C   r8   )a  Apply ``frost`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    ZfrostFr9   r:   r   r   r   apply_frost  r>   rY   c                 C   r8   )a  Apply ``snow`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    ZsnowFr9   r:   r   r   r   
apply_snow  r>   rZ   c                 C   r8   )a  Apply ``spatter`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    ZspatterTr9   r:   r   r   r   apply_spatter  r>   r[   c                 C   r8   )a  Apply ``contrast`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    ZcontrastFr9   r:   r   r   r   apply_contrast  r>   r\   c                 C   r8   )a  Apply ``brightness`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Z
brightnessFr9   r:   r   r   r   apply_brightness	  r>   r]   c                 C   r8   )a  Apply ``saturate`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    ZsaturateFr9   r:   r   r   r   apply_saturate)  r>   r^   c                 C   r8   )a  Apply ``jpeg_compression`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zjpeg_compressionTr9   r:   r   r   r   apply_jpeg_compressionI  r>   r_   c                 C   r8   )a  Apply ``pixelate`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    x : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    ZpixelateTr9   r:   r   r   r   apply_pixelatei  r>   r`   c                 C   r8   )a  Apply ``elastic_transform`` from ``imagecorruptions``.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike._call_imgcorrupt_func`.

    Parameters
    ----------
    image : ndarray
        Image array.
        Expected to have shape ``(H,W)``, ``(H,W,1)`` or ``(H,W,3)`` with
        dtype ``uint8`` and a minimum height/width of ``32``.

    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    seed : None or int, optional
        Seed for the random number generation to use.

    Returns
    -------
    ndarray
        Corrupted image.

    Zelastic_transformFr9   )r,   r<   r)   r   r   r   apply_elastic_transform  rE   ra   c                       s<   e Zd Z			d fdd	Zdd Zdd	 Zd
d Z  ZS )_ImgcorruptAugmenterBaser	   N
deprecatedc                    s:   t t| j||||d || _tj|dddddd| _d S )Nr)   namerandom_statedeterministicr<   r	      TF)Zvalue_rangeZtuple_to_uniformZlist_to_choiceZallow_floats)superrb   __init__funciapZhandle_discrete_paramr<   )selfrl   r<   r)   re   rf   rg   	__class__r   r   rk     s   
z!_ImgcorruptAugmenterBase.__init__c           
      C   sX   |j d u r|S | jt|j |d\}}t|j ||D ]\}}}	| j|||	d|d< q|S )Nrf   )r<   r)   .)images_draw_sampleslenziprl   )
rn   batchrf   parentshooks
severitiesseedsr,   r<   r)   r   r   r   _augment_batch_  s   

z(_ImgcorruptAugmenterBase._augment_batch_c                 C   s$   | j j|f|d}||}||fS )Nrq   )r<   Zdraw_samplesZgenerate_seeds_)rn   Znb_rowsrf   ry   rz   r   r   r   rs     s
   

z&_ImgcorruptAugmenterBase._draw_samplesc                 C   s   | j gS )z=See :func:`~imgaug.augmenters.meta.Augmenter.get_parameters`.)r<   )rn   r   r   r   get_parameters  s   z'_ImgcorruptAugmenterBase.get_parameters)r	   NNrc   rc   )__name__
__module____qualname__rk   r{   rs   r|   __classcell__r   r   ro   r   rb     s    rb   c                       (   e Zd ZdZ			d fdd	Z  ZS )GaussianNoiseac  
    Wrapper around ``imagecorruptions.corruptions.gaussian_noise``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_gaussian_noise`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.GaussianNoise(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.gaussian_noise``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                        t t| jt|||||d d S Nrd   )rj   r   rk   r=   rn   r<   r)   re   rf   rg   ro   r   r   rk   G  
   

zGaussianNoise.__init__rh   NNrc   rc   r}   r~   r   __doc__rk   r   r   r   ro   r   r         1r   c                       r   )	ShotNoiseaG  
    Wrapper around ``imagecorruptions.shot_noise``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_shot_noise`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.ShotNoise(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.shot_noise``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r?   r   ro   r   r   rk     r   zShotNoise.__init__r   r   r   r   ro   r   r   P  r   r   c                       r   )ImpulseNoisea_  
    Wrapper around ``imagecorruptions.corruptions.impulse_noise``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_impulse_noise`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.ImpulseNoise(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.impulse_noise``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r@   r   ro   r   r   rk     r   zImpulseNoise.__init__r   r   r   r   ro   r   r     r   r   c                       r   )SpeckleNoisea_  
    Wrapper around ``imagecorruptions.corruptions.speckle_noise``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_speckle_noise`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.SpeckleNoise(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.speckle_noise``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rA   r   ro   r   r   rk     r   zSpeckleNoise.__init__r   r   r   r   ro   r   r     r   r   c                       r   )GaussianBlura_  
    Wrapper around ``imagecorruptions.corruptions.gaussian_blur``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_gaussian_blur`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.GaussianBlur(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.gaussian_blur``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rB   r   ro   r   r   rk   3  r   zGaussianBlur.__init__r   r   r   r   ro   r   r     r   r   c                       r   )	GlassBluraS  
    Wrapper around ``imagecorruptions.corruptions.glass_blur``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_glass_blur`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.GlassBlur(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.glass_blur``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rD   r   ro   r   r   rk   n  r   zGlassBlur.__init__r   r   r   r   ro   r   r   <  r   r   c                       r   )DefocusBlura[  
    Wrapper around ``imagecorruptions.corruptions.defocus_blur``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_defocus_blur`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.DefocusBlur(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.defocus_blur``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rT   r   ro   r   r   rk     r   zDefocusBlur.__init__r   r   r   r   ro   r   r   w  r   r   c                       r   )
MotionBluraW  
    Wrapper around ``imagecorruptions.corruptions.motion_blur``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_motion_blur`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.MotionBlur(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.motion_blur``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rU   r   ro   r   r   rk     r   zMotionBlur.__init__r   r   r   r   ro   r   r     r   r   c                       r   )ZoomBluraO  
    Wrapper around ``imagecorruptions.corruptions.zoom_blur``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_zoom_blur`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.ZoomBlur(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.zoom_blur``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rV   r   ro   r   r   rk     r   zZoomBlur.__init__r   r   r   r   ro   r   r     r   r   c                       r   )Foga8  
    Wrapper around ``imagecorruptions.corruptions.fog``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_fog`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Fog(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.fog``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rX   r   ro   r   r   rk   Z  r   zFog.__init__r   r   r   r   ro   r   r   (  r   r   c                       r   )Frosta@  
    Wrapper around ``imagecorruptions.corruptions.frost``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_frost`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Frost(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.frost``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rY   r   ro   r   r   rk     r   zFrost.__init__r   r   r   r   ro   r   r   c  r   r   c                       r   )Snowa<  
    Wrapper around ``imagecorruptions.corruptions.snow``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_snow`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Snow(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.snow``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   rZ   r   ro   r   r   rk     r   zSnow.__init__r   r   r   r   ro   r   r     r   r   c                       r   )SpatteraH  
    Wrapper around ``imagecorruptions.corruptions.spatter``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_spatter`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Spatter(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.spatter``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r[   r   ro   r   r   rk     r   zSpatter.__init__r   r   r   r   ro   r   r     r   r   c                       r   )ContrastaL  
    Wrapper around ``imagecorruptions.corruptions.contrast``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_contrast`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Contrast(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.contrast``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r\   r   ro   r   r   rk   F  r   zContrast.__init__r   r   r   r   ro   r   r     r   r   c                       r   )
BrightnessaT  
    Wrapper around ``imagecorruptions.corruptions.brightness``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_brightness`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Brightness(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.brightness``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r]   r   ro   r   r   rk     r   zBrightness.__init__r   r   r   r   ro   r   r   O  r   r   c                       r   )SaturateaL  
    Wrapper around ``imagecorruptions.corruptions.saturate``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_saturate`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Saturate(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.saturate``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r^   r   ro   r   r   rk     r   zSaturate.__init__r   r   r   r   ro   r   r     r   r   c                       r   )JpegCompressionak  
    Wrapper around ``imagecorruptions.corruptions.jpeg_compression``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_jpeg_compression`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.JpegCompression(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.jpeg_compression``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r_   r   ro   r   r   rk     r   zJpegCompression.__init__r   r   r   r   ro   r   r     r   r   c                       r   )PixelateaL  
    Wrapper around ``imagecorruptions.corruptions.pixelate``.

    .. note::

        This augmenter only affects images. Other data is not changed.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_pixelate`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.Pixelate(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.pixelate``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   r`   r   ro   r   r   rk   2  r   zPixelate.__init__r   r   r   r   ro   r   r      r   r   c                       s4   e Zd ZdZ			d	 fdd	Z fddZ  ZS )
ElasticTransformab  
    Wrapper around ``imagecorruptions.corruptions.elastic_transform``.

    .. warning::

        This augmenter can currently only transform image-data.
        Batches containing heatmaps, segmentation maps and
        coordinate-based augmentables will be rejected with an error.
        Use :class:`~imgaug.augmenters.geometric.ElasticTransformation` if
        you have to transform such inputs.

    Added in 0.4.0.

    **Supported dtypes**:

    See :func:`~imgaug.augmenters.imgcorruptlike.apply_elastic_transform`.

    Parameters
    ----------
    severity : int, optional
        Strength of the corruption, with valid values being
        ``1 <= severity <= 5``.

    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
    --------
    >>> # doctest: +SKIP
    >>> import imgaug.augmenters as iaa
    >>> aug = iaa.imgcorruptlike.ElasticTransform(severity=2)

    Create an augmenter around
    ``imagecorruptions.corruptions.elastic_transform``.
    Apply it to images using e.g. ``aug(images=[image1, image2, ...])``.

    rh   Nrc   c                    r   r   )rj   r   rk   ra   r   ro   r   r   rk   q  r   zElasticTransform.__init__c                    sR   |  }t|dkst|dkrd|v sJ dd|f tt| ||||S )Nr   r	   rr   zimgcorruptlike.ElasticTransform can currently only process image data. Got a batch containing: %s. Use imgaug.augmenters.geometric.ElasticTransformation for batches containing non-image data.z, )Zget_column_namesrt   joinrj   r   r{   )rn   rv   rf   rw   rx   colsro   r   r   r{   z  s   "

z ElasticTransform._augment_batch_r   )r}   r~   r   r   rk   r{   r   r   r   ro   r   r   ;  s    5	r   )r0   )r	   N)r	   )?r   
__future__r   r   r   r   numpyr   Zimgaugr&    r   r#   r   r%   r   rm   r
   r"   r   r/   r6   r=   r?   r@   rA   rB   rD   rC   rT   rU   rV   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   Z	Augmenterrb   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>   sl    E
d
5
 
 
 
 
 
"
;
 
 
 
 
 
 
 
 
 
 
 
 d(;;;;;;;;;;;;;;;;;;