I am trying to use Region based Histogram Equalization on 'Approximation Coefficients' generated from Wavelet Decomposition.
Here is the code:-
loading image
img = cv2.imread("some_image.jpg")
discrete wavelet transform - cA Approx Coeff; cD Detail Coeff
cA, cD = pywt.dwt(img, 'db2')
Applying CLAHE (Contrast Limited Adaptive Histogram Equalization) on cA - Approx Coeff
clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8))
clahe.apply(cA)
I want to apply Contrast Limited Adaptive Histogram Equalization on 'cA'(Approx Coeff) however python throws an error. Can someone tell me where am I going wrong?
error: C:\projects\opencv-python\opencv\modules\imgproc\src\clahe.cpp:360: error: (-215) _src.type() == CV_8UC1 || _src.type() == CV_16UC1 in function `anonymous-namespace'::CLAHE_Impl::apply
UPDATE: I am trying to accomplish the Approx Coefficients-> REgion based histogram enhancement section of the diagram. Block diagram