class_docstr: Adjust image contrast by scaling pixels to ``255*gain*log_2(1+v/255)``.
  
  This augmenter is fairly similar to
  ``imgaug.augmenters.arithmetic.Multiply``.
  
  **Supported dtypes**:
  
  See :func:`~imgaug.augmenters.contrast.adjust_contrast_log`.
  
  Parameters
  ----------
  gain : number or tuple of number or list of number or imgaug.parameters.StochasticParameter, optional
      Multiplier for the logarithm result. Values around ``1.0`` lead to a
      contrast-adjusted images. Values above ``1.0`` quickly lead to
      partially broken images due to exceeding the datatype's value range.
  
          * If a number, then that value will be used for all images.
          * If a tuple ``(a, b)``, then a value from the interval ``[a, b]``
            will uniformly sampled be used per image.
          * If a list, then a random value will be sampled from that list
            per image.
          * If a ``StochasticParameter``, then a value will be sampled per
            image from that parameter.
  
  per_channel : bool or float, optional
      Whether to use the same value for all channels (``False``) or to
      sample a new value for each channel (``True``). If this value is a
      float ``p``, then for ``p`` percent of all images `per_channel` will
      be treated as ``True``, otherwise as ``False``.
  
  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.LogContrast(gain=(0.6, 1.4))
  
  Modify the contrast of images according to ``255*gain*log_2(1+v/255)``,
  where ``v`` is a pixel value and ``gain`` is sampled uniformly from the
  interval ``[0.6, 1.4]`` (once per image).
  
  >>> aug = iaa.LogContrast(gain=(0.6, 1.4), per_channel=True)
  
  Same as in the previous example, but ``gain`` is sampled once per image
  *and* channel.
class_docstr_tok: ["Adjust","image","contrast","by","scaling","pixels","to","``","255","*","gain","*","log_2","(","1+v\/255",")","``",".","This","augmenter","is","fairly","similar","to","``","imgaug.augmenters.arithmetic.Multiply","``",".","*","*","Supported","dtypes","*","*",":","See",":","func",":","`","~imgaug.augmenters.contrast.adjust_contrast_log","`",".","Parameters","--","--","--","--","--","gain",":","number","or","tuple","of","number","or","list","of","number","or","imgaug.parameters.StochasticParameter",",","optional","Multiplier","for","the","logarithm","result",".","Values","around","``","1.0","``","lead","to","a","contrast-adjusted","images",".","Values","above","``","1.0","``","quickly","lead","to","partially","broken","images","due","to","exceeding","the","datatype","'s","value","range",".","*","If","a","number",",","then","that","value","will","be","used","for","all","images",".","*","If","a","tuple","``","(","a",",","b",")","``",",","then","a","value","from","the","interval","``","[","a",",","b","]","``","will","uniformly","sampled","be","used","per","image",".","*","If","a","list",",","then","a","random","value","will","be","sampled","from","that","list","per","image",".","*","If","a","``","StochasticParameter","``",",","then","a","value","will","be","sampled","per","image","from","that","parameter",".","per_channel",":","bool","or","float",",","optional","Whether","to","use","the","same","value","for","all","channels","(","``","False","``",")","or","to","sample","a","new","value","for","each","channel","(","``","True","``",")",".","If","this","value","is","a","float","``","p","``",",","then","for","``","p","``","percent","of","all","images","`","per_channel","`","will","be","treated","as","``","True","``",",","otherwise","as","``","False","``",".","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.LogContrast","(","gain=","(","0.6",",","1.4",")",")","Modify","the","contrast","of","images","according","to","``","255","*","gain","*","log_2","(","1+v\/255",")","``",",","where","``","v","``","is","a","pixel","value","and","``","gain","``","is","sampled","uniformly","from","the","interval","``","[","0.6",",","1.4","]","``","(","once","per","image",")",".",">",">",">","aug","=","iaa.LogContrast","(","gain=","(","0.6",",","1.4",")",",","per_channel=True",")","Same","as","in","the","previous","example",",","but","``","gain","``","is","sampled","once","per","image","*","and","*","channel","."]
code: def __init__(
      self,
      gain=(0.4, 1.6),
      per_channel=False,
      seed=None,
      name=None,
      random_state="deprecated",
      deterministic="deprecated",
  ):
      # TODO add inv parameter?
      params1d = [
          iap.handle_continuous_param(
              gain,
              "gain",
              value_range=(0, None),
              tuple_to_uniform=True,
              list_to_choice=True,
          )
      ]
      func = adjust_contrast_log
  
      super(LogContrast, self).__init__(
          func,
          params1d,
          per_channel,
          dtypes_allowed="uint8 uint16 uint32 uint64 int8 int16 int32 int64 "
          "float16 float32 float64",
          dtypes_disallowed="float128 bool",
          seed=seed,
          name=name,
          random_state=random_state,
          deterministic=deterministic,
      )
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import six.moves
  import skimage.exposure
  import cv2
  import imgaug
  from imgaug.imgaug import _normalize_cv2_input_arr_
  from .None import meta
  from .None import color
  from ..None import parameters
  from ..None import dtypes
  from ..augmentables.batches import _BatchInAugmentation
label_desc: Use image node_id 1 to create a new LogContrast object from inherited base classes: _ContrastFuncWrapper with example: obj = LogContrast(gain, per_channel, seed, name, random_state, deterministic)