class_docstr: Apply ``x = (x - mean) * contrast_factor + mean`` to each channel.
class_docstr_tok: ["Apply","``","x","=","(","x","-","mean",")","*","contrast_factor","+","mean","``","to","each","channel","."]
docstr: Args:
      factor_range (list or tuple): an interval to randomly sample the `contrast_factor`.
      rgb (bool or None): if None, use the mean per-channel.
      clip (bool): clip to [0, 255] even when data type is not uint8.
code: def __init__(self, factor_range, rgb=None, clip=True):
      """
      Args:
          factor_range (list or tuple): an interval to randomly sample the `contrast_factor`.
          rgb (bool or None): if None, use the mean per-channel.
          clip (bool): clip to [0, 255] even when data type is not uint8.
      """
      super(Contrast, self).__init__()
      self._init(locals())
  
imports: import numpy
  import cv2
  from ...utils.develop import log_deprecated
  from .base import PhotometricAugmentor
label_desc: Use image node_id 1 to create a new Contrast object from inherited base classes: PhotometricAugmentor with example: obj = Contrast(factor_range, rgb, clip)