Coder Social home page Coder Social logo

xiayude / snn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nvlabs/snn

0.0 1.0 0.0 2.03 MB

Matlab code implementation the modified Non Local Means and Bilateral filters, as described in I. Frosio, J. Kautz, Statistical Nearest Neighbors for Image Denoising, IEEE Trans. Image Processing, 2018. The repository also includes the Matlab code to replicate the results of the toy problem described in the paper.

License: Other

MATLAB 100.00%

snn's Introduction

SNN (Statistical Nearest Neighbors)

Matlab code implementation of the modified Non Local Means and Bilateral filters, as described in I. Frosio, J. Kautz, Statistical Nearest Neighbors for Image Denoising, IEEE Trans. Image Processing, 2018. The repository also includes the Matlab code to replicate the results of the toy problem described in the paper.

License

Copyright (C) 2018 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).

Description

Non-Local-Means image denoising is based on processing a set of neighbors for a given reference patch. Few Nearest Neighbors (NN) can be used to limit the computational burden of the algorithm. Resorting to a toy problem, we show analytically that sampling neighbors with the NN approach introduces a bias in the denoised patch. We propose a different neighbors’ collection criterion to alleviate this issue, which we name Statistical NN (SNN). Our approach outperforms the traditional one in case of both white and colored noise: fewer SNNs can be used to generate images of superior quality, at a lower computational cost. A detailed investigation of our toy problem explains the differences between NN and SNN from a grounded point of view. The intuition behind SNN is quite general, and it leads to image quality improvement also in the case of bilateral filtering. An offset parameter o, passed as input to our algorithm, allows moving from the traditional NN approach (o = 0.0) to SNN (o = 1.0) in a continuous way. Better results are experimentally achieved for an offset o = 0.8.

ResultsFigure

The figure shows a set of 8 bits, noisy, 100 x 100 patches from the Kodak dataset, corrupted by zero-mean Gaussian noise with standard deviation 20. Traditional NLM (NLM3610.0) uses 361, 3x3 patches in a 21x21 search window; it removes noise effectively in the flat areas (the skin, the wall), but it blurs the small details (see the texture of the textile, fresco details). Using 16 NNs for each patch (NLM160.0) improves the contrast of small details, but introduces colored noise in the flat areas. The proposed SNN technique (NLM161.0) uses 16 neighbors and mimics the results of traditional NLM in flat areas (high PSNR), while keeping the visibility of small details (high FSIMC, a perceptual image quality metric). Best results are achieved when patches are collected through SNN, with o = 0.8 (NLM160.8).

Usage

/NLM/nlm.m: Matlab code to filter a user defined image thorugh the modified Non Local Means filter (accordingly to the SNN approach) and user defined filtering parameters. The traditional Non Local Means filter is achieved passing offset = 0 in input.

/NLM/runme.m: example usage of /NLM/nlm.m.

/BilateralFilter/bilateralFilter.m: Matlab code to filter a user defined image thorugh the modified Bilateral filter (accordinagly to the SNN approach) and user defined filtering parameters. The traditional Bilateral filter is achieved passing offset = 0 in input.

/BilateralFilter/runme.m: example usage of /BilateralFilter/bilateralFilter.m.

/ToyProblem/toyProblem.m: Matlab code to replicate the results on the toy problem described in our paper.

/ToyProblem/runme.m: example usage of ToyProblem/toyproblem.m.

References

I. Frosio, J. Kautz, Statistical Nearest Neighbors for Image Denoising, IEEE Trans. Image Processing, 2018.

@ARTICLE{8463600, 
author={I. Frosio and J. Kautz}, 
journal={IEEE Transactions on Image Processing}, 
title={Statistical Nearest Neighbors for Image Denoising}, 
year={2019}, 
volume={28}, 
number={2}, 
pages={723-738}, 
doi={10.1109/TIP.2018.2869685}, 
ISSN={1057-7149}, 
month={Feb},
}

snn's People

Contributors

ifrosio avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.