Ejemplo n.º 1
0
f = np.linspace(0, Fs, Ns)


k1 = 2
k2 = 4
k3 = 6
k4 = 100


R = 4
alpha = 1e-6
M = np.size(y)
N = int(M * R)

ff = np.linspace(0, Fs, int(Ns * R))
A = pys.gaussian((M, N))
A = pys.odctdict((M, N), isnorm=True)
# A = pys.dctdict(N)
# A = pys.odctndict((M, N))
print(A.shape)

x1 = pys.romp(y, A, k=k1, alpha=alpha, verbose=False)
y1 = np.matmul(A, x1)

x2 = pys.romp(y, A, k=k2, alpha=alpha, verbose=False)
y2 = np.matmul(A, x2)

x3 = pys.romp(y, A, k=k3, alpha=alpha, verbose=False)
y3 = np.matmul(A, x3)

x4 = pys.romp(y, A, k=k4, alpha=alpha, verbose=False)
Ejemplo n.º 2
0
sfrom = [0, 255]
# sfrom = None
sto = [0, 255]

alpha = 0.000001
CR = 4
N = H
M = int(N / CR)
k1 = int(N / 8)

dictype = 'DCT'
mestype = 'Gaussian'
seed = 2019

if mestype is 'Gaussian':
    Phi = pys.gaussian((M, N), seed=seed, verbose=True)

print("===observation...")

if dictype is 'DCT':
    D = pys.dctdict(N)

A = np.matmul(Phi, D)

plt.figure()
plt.subplot(221)
plt.imshow(X)
plt.title('Orignal image signal')
plt.subplot(222)
plt.imshow(D)
plt.title('Dictionary matrix (' + dictype + ')')
Ejemplo n.º 3
0
alpha = 0.000001
CR = 16
N = H
M = int(N / CR)
k1 = int(N / 32)
k2 = int(N / 16)
k3 = int(N / 8)
k4 = int(N / 4)
k5 = int(N / 2)
k6 = int(N / 1)
dictype = 'DCT'
mestype = 'Gaussian'

if mestype is 'Gaussian':
    Phi = pys.gaussian((M, N), verbose=True)

print("===observation...")

if dictype is 'DCT':
    D = pys.dctdict(N)

A = np.matmul(Phi, D)

plt.figure()
plt.subplot(221)
plt.imshow(X)
plt.title('Orignal image signal')
plt.subplot(222)
plt.imshow(D)
plt.title('Dictionary matrix (' + dictype + ')')