Ring artifact attenuation through multiscale collaborative filtering of correlated noise in sinogram domain
Project description
Multiscale BM3D filter for streak noise / ring artifact attenuation
This package contains the full pipeline for multiscale BM3D streak noise reduction in sinogram data as described in
Mäkinen, Y., Marchesini, S., Foi, A., 2021,
"Ring artifact reduction via multiscale nonlocal collaborative filtering of spatially correlated noise"
J. Synchrotron Rad. 28(3). DOI: http://doi.org/10.1107/S1600577521001910
Usage:
The denoising is applied to sinogram data.
NOTE: Input data streaks should be along the first axis: (theta, y, x) or (theta, x)
from bm3d_streak_removal import *
For the full pipeline as described in the paper:
data_denoised = full_streak_pipeline(data, brightfield, darkfield)
For extreme streak attenuation and multiscale denoising without normalizations (input is presumed to be in log-scale):
data_norm = extreme_streak_attenuation(data_norm)
data_denoised = multiscale_streak_removal(data_norm)
For a demo example, see the "demo" folder inside the package or download the demo files from https://webpages.tuni.fi/foi/streak/bm3d_streak_removal_demo.zip.
Adjusting the filter:
All algorithm parameters are automatically calculated based on the input data.
The main extra parameter is the horizontal binning count ("K"). The automatic value is based solely on axis size; while the usually a good guess, it may be possible to improve denoising quality by adjusting it. To reduce the number of scales (the denoising result was oversmooth in low frequencies):
# Bin count when max_bin_iter_horizontal='auto' (default)
default_bin_count = default_horizontal_bins(data_norm)
# Use one scale less
data_denoised = multiscale_streak_removal(data_norm, max_bin_iter_horizontal=default_bin_count-1)
Likewise, if the widest streaks were not denoised:
# Use one scale more
data_denoised = multiscale_streak_removal(data_norm, max_bin_iter_horizontal=default_bin_count+1)
For simple overall BM3D filtering strength adjustment, use the filter_strength parameter (default is 1):
# Increase filtering strength slightly
data_denoised = multiscale_streak_removal(data_norm, filter_strength=1.1)
For other possible inputs, see the respective function comments in the Python file.
License
The package is available for non-commercial use only. For details, see LICENSE.
Authors:
Ymir Mäkinen (ymir.makinen@tuni.fi)
Stefano Marchesini
Alessandro Foi
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bm3d_streak_removal-0.2.0.tar.gz
.
File metadata
- Download URL: bm3d_streak_removal-0.2.0.tar.gz
- Upload date:
- Size: 39.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55ad39887b429697a647318d65d09565b18d86e22a00c942fac4392859eb5370 |
|
MD5 | 8a670b00928784b7a4d478dd6b4a2387 |
|
BLAKE2b-256 | 6908c6353bb9c5ca602c6be25e7807784361df3aee6bb135064a81808f6dd725 |
File details
Details for the file bm3d_streak_removal-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: bm3d_streak_removal-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcd5372369c3de63baf46df5815bcd8c2a9b6627e4b6bf3c4e6643762b5e9fa4 |
|
MD5 | 226edc70c551d0b8ec329303775d0e0e |
|
BLAKE2b-256 | 9b01907bd81c49be4fe40719149dceeb79467fa39b75bfac103e40670606be90 |