How to get matrix 1D from Wavelet DWT using Opencv?

110 Views Asked by At

I've tried to use haar wavelet method but the result matrix is not in 1D matrix. How to get 1D matrix from haar wavelet? Here's my code:

Import cv2
From pwt import wavedec

imgcv1 = cv2.split(resize)[0] cv2.boxFilter(imgcv1, 0, (7,7), imgcv1, (-1,-1), False, cv2.BORDER_DEFAULT) #cv2.resize( imgcv1, (32, 32 ) ,imgcv1) 
imf = np.float32(imgcv1)/255.0 
# float conversion/scale
coeffs = wavedec(imf, "haar", level = 2)
cA2 = coeff
print(cA2)
0

There are 0 best solutions below