how to use createCLAHE in python's namesapce cv2?
I've read the opencv-python-toturial and saw a example as below:
import numpy as np
import cv2
img = cv2.imread('tsukuba_l.png',0)
# create a CLAHE object (Arguments are optional).
clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8))
cl1 = clahe.apply(img)
cv2.imwrite('clahe_2.jpg',cl1)
I've installed opencv but cannot find the cv2.createCLAHE method, is this a bug? My opencv version is 2.4.2 and Python 2.7.5.
"My opencv version is 2.4.2" - there is your problem.
there is no CLAHE in 2.4.2, to use it, you will have to update.
thank you, i will try 3.0.
hmm, 3.0 only if you want to try the alpha version. (there are a couple of hiccups currently)
unless you're out for adventure, consider 2.4.10 (the stable release) for now