Matlab image Processing _ homomorphic filtering

Source: Internet
Author: User

Homomorphic filtering:The generalized superposition principle is used to filter the homomorphic system. homomorphic filtering is an image processing method combining frequency filtering and gray-scale transformation, which relies on image illuminance/reflectivity model as the basis of frequency domain processing, and uses the compression luminance range and contrast enhancement to improve the image quality. Using this method, the image processing can accord with the non-linear characteristic of the luminance response of the human eye, and avoids the distortion of direct Fourier transform processing of the image . the basic principle of homomorphic filtering is that the pixel gray value is considered as the product of two component of illuminance and reflectivity. As the illuminance is relatively small, it can be regarded as the low-frequency component of the image, and the reflectivity is the high-frequency component. By dealing with the influence of illuminance and reflectivity on the gray value of the cell, the detail characteristics of the shadow area are revealed.
the basic flow of homomorphic filter processing is as follows:S (x, y)---->log---->DFT----> Frequency domain filtering---->idft---->EXP---->t (x, y)where S (x, y) represents the original image; T (x, y) represents the processed image; The log represents the logarithmic operation; the DFT represents the Fourier transform (FFT is used in practical operation); IDFT represents Fourier inverse transformation (using fast Fourier inverse transform ifft in practical operation) ; Exp represents an exponential operation.

Implementation code:

function I3 = Test_tontai (i) i=double (Rgb2gray (i)); [M,n]=size (I); rl=0.5;rh=4.7;% can adjust the parameter C=2;d0=10;i1=log (i+1) According to the need effect, the% take logarithmic fi=fft2 (I1);% Fourier transform N1=floor (M/2); N2=floor (N/2 ); for i=1:m for    j=1:n        D (i,j) = ((I-N1). ^2+ (J-N2). ^2);        H (i,j) = (RH-RL). * (exp (c* (-D (I,J)./(d0^2)))) +rl;% Gaussian homomorphic filter    endendi2=ifft2 (H.*FI);% Fourier inverse transform i3=real (exp (I2)); Subplot (122), Imshow (i3,[]); Title (' Homomorphic filter Enhanced ');

It is found that homomorphic filtering has the effect of high dynamic range compression, such as the ability to brighten the part of the image that is dark.


As the original image, it belongs to a low-exposure image:



After the Homomorphic filter:



Matlab image Processing _ homomorphic filtering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.