小波程序原理

import numpy as np
import pywt
data = np.ones((4, 4), dtype=np.float64)
[[1. 1. 1. 1.]
 [1. 1. 1. 1.]
 [1. 1. 1. 1.]
 [1. 1. 1. 1.]]
 
coeffs = pywt.dwt2(data, 'haar')
# (cA, (cH, cV, cD)) : tuple
# Approximation, horizontal detail, vertical detail and diagonal
# detail coefficients respectively
cA, (cH, cV, cD) = coeffs

print(cA)
[[2. 2.]
 [2. 2.]]
 
print(cH)
[[0. 0.]
 [0. 0.]]

 

你可能感兴趣的:(算法)