DMPT 2025 Lecture12 ENG ContextOperations
DMPT 2025 Lecture12 ENG ContextOperations
PROCESSING TECHNIQUES
– Lecture 12
12.1 Context operations in digital image processing
– Linear and nonlinear filters
12.2 Applications of image filters
The median filter considers each pixel in the image whether or not it
is representative of its surroundings. Instead of using mean value
of neighboring pixels, the median filter uses the median of those
values.
To find median value the values of the surrounding neighborhood
pixels should be first sorted into numerical order and then the
middle pixel value is chosen. If the neighborhood set of pixels
contains an even number of pixels, the average of the two middle
pixel values is the median value.
Examples of finding the median in sets of data with an odd and
even number of values.
1,1,1,6,7,8,9 – median = 6; 4,4,4,6,7,8 – median = 5
where x is the distance from the origin in the horizontal axis, y is the
distance from the origin in the vertical axis, and σ is the standard
deviation of the Gaussian distribution.
After applying the two dimension Gaussian function the contours
are becoming concentric circles with a Gaussian distribution from
the center point.
The Gaussian smoothing operator is a kind of 2-D convolution
operators.
KCH – DMPT Lecture12 2025 7/20
Context operations
Linear filters
– output is a linear combination of their input.
Nonlinear filters
The general idea in non-linear image filtering is that instead of using
the spatial mask in a convolution process, the mask is used to
obtain the neighboring pixel values, and then ordering mechanisms
produce the output pixel.
A median filter is a nonlinear filter – each output sample is
computed as the median value of the input samples.
Kernel:
f’(x,y) = ω f(x,y)
f – original image,
f’ – filtered (transformed) image,
ω – filter kernel
Identity:
Edge detection:
Sharpen:
Box blur:
Gaussian blur 3 × 3:
Gaussian blur 5 × 5:
Unsharp masking 5 × 5
based on Gaussian blur
with amount as 1 and threshold as 0