Denoising a 2D signal based on wavelet
Project description
MSATwtdenoiser
A wavelet-based de-noising method designed for MethaneSAT xCH4 retrieval (or any other noisy image)
Installation
Use the package manager pip to install MSATwtdenoiser.
pip install MSATwtdenoiser
Usage
see example.py
or
from MSATwtdenoiser import MSATdenoise,example
example()
or
from MSATwtdenoiser import MSATdenoise
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import inspect
img = np.array(mpimg.imread('steve.jpg'))
img.astype(float)
img = np.mean(img,axis=2)
img = img+np.random.normal(0,100,[np.shape(img)[0],np.shape(img)[1]])
# denoiser
denoiser = MSATdenoise(img,'db4',5)
denoised_img = denoiser.denoised
#plotting
fig = plt.figure(figsize=(12, 3))
ax = fig.add_subplot(1, 2, 1)
ax.imshow(img, interpolation="nearest", cmap=plt.cm.gray)
ax = fig.add_subplot(1, 2, 2)
ax.imshow(denoised_img, interpolation="nearest", cmap=plt.cm.gray)
fig.tight_layout()
plt.show()
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MSATwtdenoiser-0.0.4.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for MSATwtdenoiser-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e6d908a30d15b939ca120f7e893eab56bd2203f5226390a61fc5efd4dc4e86d |
|
MD5 | ee942f8bf2b13727fea1447fd4c52fda |
|
BLAKE2b-256 | 23c0a3dfbbd6f18edb2dfc6f615604d62022081401eea01cba3ead5eebcfc73f |