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
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 details)
Built Distribution
File details
Details for the file MSATwtdenoiser-0.0.6.tar.gz
.
File metadata
- Download URL: MSATwtdenoiser-0.0.6.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21992eae93f0c999b170bb413db984a3997ce436e9d6f3015853f66843b96adc |
|
MD5 | 068264039822031167a425db62c49486 |
|
BLAKE2b-256 | 0c62bd03620889727171ce0cdac5a6d3eeaaa5beebe22a4f80ab0c8672b0c5bd |
File details
Details for the file MSATwtdenoiser-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: MSATwtdenoiser-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e9d8e3054f073985e2514bd6b22307d87f40ea534ef1eca9a834ba8a484c3d7 |
|
MD5 | badf89638fee0ec273c79fbc4fe0cbb0 |
|
BLAKE2b-256 | 7ebadc3a3809d7aa8bc34782857e6b62f391e739ca62d8f38582ead499e9a3b3 |