overlay.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. """Alias for module blend.
  2. Deprecated module. Original name for module blend.py. Was changed in 0.2.8.
  3. """
  4. from __future__ import print_function, division, absolute_import
  5. import imgaug as ia
  6. from . import blend
  7. _DEPRECATION_COMMENT = (
  8. "It has the same interface, except that the parameter "
  9. "`first` was renamed to `foreground` and the parameter "
  10. "`second` to `background`."
  11. )
  12. @ia.deprecated(alt_func="imgaug.augmenters.blend.blend_alpha()",
  13. comment=_DEPRECATION_COMMENT)
  14. def blend_alpha(*args, **kwargs):
  15. """See :func:`~imgaug.augmenters.blend.blend_alpha`."""
  16. # pylint: disable=invalid-name
  17. return blend.blend_alpha(*args, **kwargs)
  18. @ia.deprecated(alt_func="imgaug.augmenters.blend.BlendAlpha",
  19. comment=_DEPRECATION_COMMENT)
  20. def Alpha(*args, **kwargs):
  21. """See :class:`~imgaug.augmenters.blend.BlendAlpha`."""
  22. # pylint: disable=invalid-name
  23. return blend.Alpha(*args, **kwargs)
  24. @ia.deprecated(alt_func="imgaug.augmenters.blend.BlendAlphaElementwise",
  25. comment=_DEPRECATION_COMMENT)
  26. def AlphaElementwise(*args, **kwargs):
  27. """See :class:`~imgaug.augmenters.blend.BlendAlphaElementwise`."""
  28. # pylint: disable=invalid-name
  29. return blend.AlphaElementwise(*args, **kwargs)
  30. @ia.deprecated(alt_func="imgaug.augmenters.blend.BlendAlphaSimplexNoise",
  31. comment=_DEPRECATION_COMMENT)
  32. def SimplexNoiseAlpha(*args, **kwargs):
  33. """See :class:`~imgaug.augmenters.blend.BlendAlphaSimplexNoise`."""
  34. # pylint: disable=invalid-name
  35. return blend.SimplexNoiseAlpha(*args, **kwargs)
  36. @ia.deprecated(alt_func="imgaug.augmenters.blend.BlendAlphaFrequencyNoise",
  37. comment=_DEPRECATION_COMMENT)
  38. def FrequencyNoiseAlpha(*args, **kwargs):
  39. """See :class:`~imgaug.augmenters.blend.BlendAlphaFrequencyNoise`."""
  40. # pylint: disable=invalid-name
  41. return blend.FrequencyNoiseAlpha(*args, **kwargs)