Beruflich Dokumente
Kultur Dokumente
INTENSITY TRANSFORMATIONS
AND SPATIAL FILTERING
GROUP 3
J A C K S O N Q U E E N E TT E E .
110407023
O L A G U N J U A B D U L - H A M M I D O.
110407039
E KW U R I B E C H I S O M
110407019
OLALEYE LOVE
110407040
IKEDIASHI JAMES
L E C T U R E R : D R . FA S H A N U
Function adapthisteq
This toolbox function performs contrast-limited
MATLAB CODES
>> f =
imread('C:\Users\RO
QEEB A.
RAHEEM\Desktop\us
-map2.gif');
>> g1 = adapthisteq(f);
>> imshow(f)
>> figure, imshow(g1)
>> g2 = adapthisteq (f,
'NumTiles', [25 25]);
>> figure, imshow(g2)
>> g3 = adapthisteq(f,
'NumTiles', [25 25],
'ClipLimit', 0.10);
>> imshow(g3)
Significant Enhancement
SPATIAL FILTERING
Spatial filtering term is the filtering operations
LINEAR NON-LINEAR
(Spatial Convolution)
AND
g = imfilter(f, w, filtering_mode,
boundary_options, size_options)
The most common syntax for imfilter is
imshow(g2, [ ])
W = fspecial( 'type',
parameters)
generates a filter mask
W, also a number of
predefined 2-D linear
spatial filters, expressed
Function fspecial
NOISE
CORRUPTED
IMAGE
>>fn=imnoise(f,
salt & pepper,
0.2);
IMAGE
WITH
REDUCED
SALT &
PEPPER
NOISE
Median filtering g =
MEDIAN
FILTER >>gm =
medfilt2(fn)
MATLAB CODES
>> f = imread('C:\Users\ROQEEB A.
RAHEEM\Desktop\us-map2.gif');
>> imshow(f)
>> PSF = fspecial('gaussian',7,10);
>> g = imfilter(f,PSF,'symmetric','conv');
>> figure;imshow(g);title('Blurred Image');
>> w = fspecial('laplacian', 0)
w =
0 1
1 -4
0 1
0
1
0
2],'replicate','both');
Undefined function or variable 'UNDERPSF'.
deconvblind(Blurred,UNDERPSF);
Undefined function or variable 'Blurred'.
deconvblind(g,UNDERPSF);
>> figure;imshow(J1);title('Deblurring
with Undersized PSF');
>> INITPSF = padarray(UNDERPSF,[2
2],'replicate','both');
>> [J3, P3] =
deconvblind(Blurred,INITPSF);
Undefined function or variable 'Blurred'.
with INITPSF');
>>
Input image
Gaussian blur
MATLAB CODES
>> f = imread('C:\Users\ROQEEB A.
RAHEEM\Desktop\us-map2.gif');
>> imshow(f)
>> len = 21;
>> theta = 11;
>> psf = fspecial('motion', len,
theta);
>> g = imfilter(f, psf, 'conv',
'circular');
>> subplot(1, 2, 1);
>> subimage(f);
>> title('input image');
>> subplot(1,2,2);
>> subimage(g);
>> title('blurred image');
>> figure, imshow(g)
>> imshow(f), figure, imshow(g)
>> w = fspecial('laplacian', 0)
w=
0 1 0
1 -4 1
0 1 0
>> g1 = imfilter(f, w, 'replicate');
>> imshow(g1, [])
>> f2 = im2double(f);
>> g2 = imfilter(f2, w, 'replicate');
>> imshow(g2,[])
>> g = f2 - g2;
>> imshow(g)
Input image
Laplacian filter
Laplacian filter 2
Laplacian filter 3
MATLAB CODES
>> f = imread('C:\Users\ROQEEB A.
RAHEEM\Desktop\us-map2.gif');
>> fn = imnoise(f, 'salt & pepper', 0.2);
>> imshow(fn)
>> gm = medfilt2(fn);
>> imshow(gm)
>> gms = medfilt2(fn, 'symmetric');
>> imshow(gms)
Noisy image
Noise removed
imprecise information
A fuzzy set, A, is an ordered pair consisting of values
of z and a membership function that assigns a grade
of membership in A to each z. That is,
A = {z, A (z)|z z}
This membership function is infinite-valued, thus
allowing a gradual transition
Fundamental problem with crisp sets (membership
is either true or false) that limits their use in many
practical applications is lack of flexibility
MEMBERSHIP FUNCTIONS
Defuzzify the final output fuzzy set: obtain a crisp, scalar output by computing the center of gravity of
the aggregated set from step 4 --- function out = defuzzify(Qa, vrange)
vo = vQ(v)dv
Q(v)dv
Apply an aggregation method to the fuzzy sets from step 3: approach used is to form the union (OR) of
the individual outputs, so the max operation is employed
function Qa =
aggfcn(Q)
Apply an implication method: The single output of the antecedent of each rule is used to provide the
output corresponding to that rule
function Q =
implfcns(L, outmf, varargin)
Perform any required fuzzy logical operations: outputs of all parts of an antecedent must be combined to
yield a single value using the max or min operation
Fuzzify the inputs: For each scalar input, find the corresponding fuzzy values by mapping that input to
the interval [0, 1]
4
3
2
1
inputs
function Q = implfcns(L, outmf, varargin)
Improving performance
The fuzzy system function created by fuzzysysfcn