hist equalization

This commit is contained in:
Glenn Jocher 2020-04-10 17:29:57 -07:00
parent 9bc3a551d9
commit 4bbfda5cde
1 changed files with 3 additions and 3 deletions

View File

@ -521,9 +521,9 @@ def augment_hsv(img, hgain=0.5, sgain=0.5, vgain=0.5):
cv2.cvtColor(img_hsv, cv2.COLOR_HSV2BGR, dst=img) # no return needed cv2.cvtColor(img_hsv, cv2.COLOR_HSV2BGR, dst=img) # no return needed
# Histogram equalization # Histogram equalization
if random.random() < 0.2: # if random.random() < 0.2:
for i in range(3): # for i in range(3):
img[:, :, i] = cv2.equalizeHist(img[:, :, i]) # img[:, :, i] = cv2.equalizeHist(img[:, :, i])
def load_mosaic(self, index): def load_mosaic(self, index):