Code Monkey home page Code Monkey logo

homomorphic-filtering's Introduction

Implementation of Homomorphic Filtering on images in MATLAB

Every pixel of an image can be represented by an illuminance and reflectance components. The illuminance L(x,y) represents the amount of light upon the pixel, having slow variations through space. While that the reflectance R(x, y) indicates how much light is reflected. This component is strictly related to the material where the light it being reflected on and can have fast variations.

So, every pixel can be understood as being a mix of these two components:

I(x, y) = L(x, y) * R(x, y)

This way, to fix the lighting on a scene it does not only take an increase to the illuminance component, since it is mixed with the reflectance.


Operation

Homomorphic Filtering

  • We have to transform the equation into frequency domain in order to apply high pass filter. However, it's very difficult to do calculation after applying Fourier transformation to this equation because it's not a product equation anymore. Therefore, we use 'log' to help solving this problem.

  • Then, we apply Fourier transformation.

  • Next, applying high-pass filter to the image. To make the illumination of an image more even, the high-frequency components are increased and low-frequency components are decrease.

  • Afterward, returning frequency domain back to the spatial domain by using inverse Fourier transform.

  • Finally, using exponential function to eliminate the log we used at the beginning to get the enhanced image

The following figure show the result of applying Homomorphic Filter. The figures are produced by using Matlab.

Original Image vs Homomorphic Filtered Image

According to the above figures, we can see that how homomorphic filtering is used for correcting non-uniform illumination in image, and the image become clearer than the original image.

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.