Lab = cv2.cvtColor(bgr, cv2.COLOR_BGR2LAB)Ĭlahe = cv2.createCLAHE(clipLimit=2.0,tileGridSize=(100,100)) Img_transf = clahe.apply(img_transf)ĭoing this CLAHE method with LAB color space, as suggested in the question How to apply CLAHE on RGB color images: import cv2, numpy as np ![]() Img_transf = cv2.cvtColor(img3, cv2.COLOR_BGR2HSV)Ĭlahe = cv2.createCLAHE(tileGridSize=(100,100)) I also tried CLAHE (Contrast Limited Adaptive Histogram Equalization) with various tileGridSize from 1 to 1000: img3 = cv2.imread(f) I also tried YCbCr instead, and it was similar. Unfortunately, the result is quite bad since it creates awful micro contrasts locally (?): Img4 = cv2.cvtColor(img_transf, cv2.COLOR_HSV2BGR) Or with HSV: img_transf = cv2.cvtColor(img3, cv2.COLOR_BGR2HSV) Img4 = cv2.cvtColor(img_transf, cv2.COLOR_YUV2BGR) Img_transf = cv2.equalizeHist(img_transf) Img_transf = cv2.cvtColor(img3, cv2.COLOR_BGR2YUV)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |