Skip to content

Instantly share code, notes, and snippets.

@Praveen76
Created April 15, 2022 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Praveen76/b1f3dba5b11a21590d93b44e2053b55a to your computer and use it in GitHub Desktop.
Save Praveen76/b1f3dba5b11a21590d93b44e2053b55a to your computer and use it in GitHub Desktop.
img=cv.imread('D:\lowcontrast.jpg')
cv.imshow('img',img)
gray_img=cv.cvtColor(img,cv.COLOR_BGR2GRAY)
cv.imshow('img',gray_img)
clahe=cv.createCLAHE(clipLimit=40)
gray_img_clahe=clahe.apply(gray_img)
cv.imwrite('clahe_hist.jpg',gray_img_clahe)
cv.imshow('Man',gray_img_clahe)
cv.waitkey(0)
cv.destroyAllWindows()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment