Monday, 2 June 2014

Image Enhancement


Two types of techniques are done
1.Spatial domain techniques
  • Point operations
  • Histogram equalization and matching
  • Applications of histogram-based enhancement

2. Frequency domain techniques

  • Unsharp masking
  • Homomorphic filtering

MATLAB function >imadjust

How can we achieve adjustment
1. histogram equalization
2. histogram specification

Histogram of an image represents the relative frequency of occurrence of various gray levels in the image
MATLAB function >imhist(x)

function y=hist_eq(x)

%to calculate histogram
[M,N]=size(x);
for i=1:256    
h(i)=sum(sum(x= =i-1));
End

% histogram equalization
y=x;s=sum(h);
for i=1:256    
I=find(x= =i-1);    
y(I)=sum(h(1:i))/s*255;
end

Unsharp masking
% Implementation of Unsharp masking

function y=unsharp_masking(x,lambda)

% Laplacian operation
h=[0 -1 0;-1 4 -1;0 -1 0]/4;
dx=filter2(h,x);
y=x+lambda*dx;


No comments:

Post a Comment