Git Product home page Git Product logo

bilateral-filtering's Introduction

Bilateral Filtering

===================

Applying Bilateral Filtering to images

Overview

The bilateral filter is a nonlinear filter that does spatial averaging without smoothing edges; it has proven to be an effective image denoising technique amongst other various contexts in which it has been used, such as texture editing, relighting, tone management and optical-flow estimation. An important issue with the application of the bilateral filter is the selection of the filter parameters, which affect the results significantly. In this repository, a brief synopsis on how bilateral filtering operates is given, alongside some examples of applications that take advantage of it, especially image denoising. Furthermore, the implementation of this filter is explained in details.

Introduction

The bilateral filter is perhaps the simplest and most intuitive one among explicit weighted-average filters. It computes the filtering output at each pixel as the average of neighboring pixels, weighted by the Gaussian of both spatial and intensity distance. The bilateral filter smooths the image while preserving edges. Therefore, the idea underlying bilateral filtering is to do in the range of the image what traditional filters do in its domain. Similarly to tradition filters, range filtering is defined in order to average image values with weights, depending on image intensity or color, that decay with dissimilarity. Then range and domain filtering are combined.

Implementation

The code for the bilateral filtering was implemented on Matlab. The filter was implemented both for gray scale and color images. Firstly the domain filter is computed on the input image within the specified window. The larger the domain parameter is, the blurrier the image will become.After that, the window size is adjusted and then the range filter is computed.Finally the bilateral filter is computed by taking the product of the domain and range filters before normalizing the output.The function bilateralGrayscale contains the Matlab code for this implementation. Regarding color images, the same process was followed for every one of the R, G and B channels. Then the channels are combined again for the final result. One can notice that the effectiveness of the filter in this case is not as expected, mainly because of the different intensity profile and contrast of each band. Furthermore this process is computationally more expensive because the bilateral filter is applied to every different channel. The implementation for color images can be found in the bilateralRGB with the supplementary function bilateral_each_channel.

License

MIT

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.