Skip to main content

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

in terms of the name of wavelets, please check out https://pywavelets.readthedocs.io/en/latest/ref/wavelets.html

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

MIT

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.6.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

MSATwtdenoiser-0.0.6-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page