import cv2
import numpy as np
import os
def randLighting(img):
saturation = 1.5
exposure = 1.5
hsv = cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
r0 = np.random.rand()
r1 = np.random.rand()
r2 = np.random.rand()
r3 = np.random.rand()
saturation = r0 * (saturation - 1) + 1
exposure = r1 * (exposure - 1) + 1
if (r2 > 0.5):
exposure = 1 / exposure
if (r3 > 0.5):
saturation = 1 / saturation
# for i in range(row):
# for j in rang