Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/longhao-chen/bm3ddenoise.jl
An implementation of the BM3D denoising algorithm for Julia.
https://github.com/longhao-chen/bm3ddenoise.jl
denoise-images image-processing julia
Last synced: about 2 months ago
JSON representation
An implementation of the BM3D denoising algorithm for Julia.
- Host: GitHub
- URL: https://github.com/longhao-chen/bm3ddenoise.jl
- Owner: Longhao-Chen
- License: mit
- Created: 2021-02-12T11:46:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-11T09:36:32.000Z (over 3 years ago)
- Last Synced: 2024-11-08T23:05:59.661Z (2 months ago)
- Topics: denoise-images, image-processing, julia
- Language: Julia
- Homepage:
- Size: 458 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BM3DDenoise.jl
![](https://github.com/Longhao-Chen/BM3DDenoise.jl/workflows/Unit%20test/badge.svg)An implementation of the BM3D(sparse 3D transform-domain collaborative filtering) denoising algorithm for Julia.
## Installation
Within Julia, use the `Pkg`:
```julia
using Pkg
Pkg.add("BM3DDenoise")
```## Usage
```julia
using BM3DDenoise
using Images
img = load("noise_image_path")
denoise_img = bm3d(img, noise_variance) # noise_variance noise_variance is the variance of the noise.
```### Example
```julia
using BM3DDenoise
using Images
using Downloads
noise_image_path = download("http://www.cs.tut.fi/~foi/GCF-BM3D/images/Lena512_noi_s10.png")
noise_variance = 10 / 255
img = load(noise_image_path)
denoise_img = bm3d(img, noise_variance) # noise_variance noise_variance is the variance of the noise.
```If you want to customize parameters, see:
```julia
?bm3d_config
```## Noise estimator
For the image that does not know the noise variance, we can use [Wavelets.jl](https://github.com/JuliaDSP/Wavelets.jl/) to make noise estimation.
```julia
using Pkg; Pkg.add("Wavelets")
using Wavelets
using Imagesnoise_img = load("image_path")
# Convert to YCrCb color space for estimation
noise_img = YCbCr.(noise_img)
noise_img_y = channelview(img_y)[1,:,:] # Extract y channel.
# normalization
noise_img_y .-= 16.
noise_img_y ./= (235. - 16.)noise_variance = Threshold.noisest(noise_img_y)
```# Acknowledgements
Thank you for your help in this project!* [johnnychen94](https://github.com/johnnychen94)
# Reference
> https://webpages.tuni.fi/foi/GCF-BM3D/
> https://github.com/rcrandall/BM3D.jl
> https://blog.csdn.net/qq_33552519/article/details/108632146
> http://www.ipol.im/pub/art/2012/l-bm3d/article.pdf
> https://blog.csdn.net/github_28260175/article/details/81101457
> https://blog.csdn.net/qq_36955294/article/details/83443317