code: def random_distort_image(image, hue=18, saturation=1.5, exposure=1.5):
      # determine scale factors
      dhue = np.random.uniform(-hue, hue)
      dsat = _rand_scale(saturation)
      dexp = _rand_scale(exposure)
  
      # convert RGB space to HSV space
      image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV).astype("float")
  
      # change satuation and exposure
      image[:, :, 1] *= dsat
      image[:, :, 2] *= dexp
  
      # change hue
      image[:, :, 0] += dhue
      image[:, :, 0] -= (image[:, :, 0] > 180) * 180
      image[:, :, 0] += (image[:, :, 0] < 0) * 180
  
      # convert back to RGB from HSV
      return cv2.cvtColor(image.astype("uint8"), cv2.COLOR_HSV2RGB)
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/utils/image.py
imports: import cv2
  import numpy
  import copy
label_desc: Use image node_id 5 for calling a global function with example usage: random_distort_image(image, hue, saturation, exposure) and returns: cv2