Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views35 pages

Local Preprocessing - 1

Local pre-processing methods in image processing are categorized into smoothing and gradient operators, with smoothing reducing noise but blurring edges, while gradient operators highlight rapid changes. Various techniques like averaging, convolution masks, and median filtering are employed to suppress noise while preserving important image features. Advanced methods, such as using rotating masks and inverse gradient weighting, enhance image quality by selectively averaging pixels based on their local properties.

Uploaded by

Surya Mersal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views35 pages

Local Preprocessing - 1

Local pre-processing methods in image processing are categorized into smoothing and gradient operators, with smoothing reducing noise but blurring edges, while gradient operators highlight rapid changes. Various techniques like averaging, convolution masks, and median filtering are employed to suppress noise while preserving important image features. Advanced methods, such as using rotating masks and inverse gradient weighting, enhance image quality by selectively averaging pixels based on their local properties.

Uploaded by

Surya Mersal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Local Pre-processing

Local Pre-processing
• Local pre-processing methods are divided into two groups according
to the goal of the processing.
• Smoothing aims to suppress noise or other small fluctuations in the
image; it is equivalent to the suppression of high frequencies in the
Fourier transform domain.
• Unfortunately, smoothing also blurs all sharp edges that bear important
information about the image.
• Gradient operators are based on local derivatives of the image
function.
Local Pre-processing
• Derivatives are bigger at locations of the image where the image
function undergoes rapid changes, and the aim of gradient operators is
to indicate such locations in the image.
• Gradient operators have a similar effect to suppressing low frequencies
in the Fourier transform domain.
• Noise is often high frequency in nature; unfortunately, if a gradient
operator is applied to an image, the noise level increases
simultaneously.
Local Pre-processing
• Another classification of local pre-processing methods is according to
the transformation properties; linear and non-linear transformations
can be distinguished.
• Linear operations calculate the resulting value in the output image
pixel f (i, j) as a linear combination of brightness's in a local
neighborhood O of the pixel g(i, j) in the input image.
• The contribution of the pixels in the neighborhood O is weighted by
coefficients h:
Local Pre-processing
• It is equivalent to discrete convolution with the kernel h, which is
called a convolution mask.
• Rectangular neighborhoods O are often used with an odd number of
pixels in rows and columns, enabling specification of the central pixel
of the neighborhood.
• The choice of the local transformation, size, and shape of the
neighborhood O depends strongly on the size of objects in the
processed image.
• If objects are rather large, an image can be enhanced by smoothing of
small degradations.
Image Smoothening
• Image smoothing uses redundancy in image data to suppress noise,
usually by some form of averaging of brightness values in some
neighborhood O.
• Smoothing poses the problem of blurring sharp edges, and so we shall
consider smoothing methods which are edge preserving here, the
average is computed only from points in the neighborhood which have
similar properties to the point being processed.
• Local image smoothing can effectively eliminate impulse noise or
degradations appearing as thin stripes, but does not work if
degradations are large blobs or thick stripes.
Averaging, statistical principles of noise
suppression
• Noise and Averaging: Noise in an image is often modeled as a
random variable with a mean of zero and a standard deviation, 𝜎.
• To reduce noise, multiple images of the same scene can be captured,
and the pixel values from these images are averaged.
• The idea is that while the noise fluctuates randomly, the underlying
pixel value remains consistent.
• Thus, averaging multiple noisy measurements can cancel out the
noise, leading to a cleaner estimate of the true pixel value.
Averaging, statistical principles of noise
suppression
Averaging, statistical principles of noise
suppression
Averaging, statistical principles of noise
suppression
• Practical Consideration
• While averaging multiple images can be effective for noise
reduction, it is often not feasible to have multiple images in
practice. In such cases, local neighborhood averaging within a
single image is applied.
• This local averaging is performed by convolving the image with a
convolution mask (also called a kernel or filter), such as the 3×3 or
5×5 masks shown. These filters calculate the weighted average of a
pixel and its neighboring pixels to reduce noise.
Averaging, statistical principles of noise
suppression
Smoothing Filters
Convolution Masks
• A simple 3×3 convolution mask, computes the average of a pixel
and its 8 neighbors. This filter is useful in reducing noise but can
also blur edges.
• More complex masks, give more weight to the center pixel,
preserving edges better while still reducing noise.
Averaging, statistical principles of noise
suppression
Separable Filters
Separability in 2D means that the convolution kernel can be
factorized as a product of two one-dimensional vectors, and theory
provides a clue as to which convolution masks are separable.
As an example, consider a binomic filter.
Its elements are binomic numbers which are created as a sum of the
corresponding two numbers in Pascal’s triangle.
Consider such a filter of size 5 × 5—it can be decomposed into a
product of two 1D vectors, h1, h2
Averaging, statistical principles of noise
suppression
Averaging with limited data validity
• Aim is to improve the effectiveness of image averaging by ensuring
that the process only involves valid data and excludes regions that
might degrade image quality if averaged.
• We avoid blurring by averaging only those pixels that satisfy specific
criteria, effectively excluding outliers or pixels that are part of distinct
features (e.g., edges, strong gradients, or corrupted regions).
Criteria for Valid Data
• Different criteria can be used to decide whether a pixel should be included in
the averaging process. Some of these criteria include brightness levels, local
gradients, or change in brightness over time.
Averaging with limited data validity
Criteria for Valid Data
• Brightness Interval Criterion: One approach is to define a brightness interval
[𝑚𝑖𝑛,𝑚𝑎𝑥] that represents invalid data (e.g., corrupted pixel values). Only
pixels outside this range are included in the averaging process.
Averaging with limited data validity
Criteria for Valid Data
Gradient Magnitude as a Criterion: Another method involves computing the
magnitude of a gradient operator over the image and using this to decide
whether a pixel should be averaged.
• Only pixels with small gradients (indicating smooth regions) are averaged,
while those with large gradients (e.g., edges) are preserved to maintain
sharpness.
Brightness Change Criterion: A different approach uses the rate of change in
pixel brightness over time to identify pixels that should or should not be
averaged.
• This technique is useful for correcting large-area errors without affecting valid
regions.
Averaging with limited data validity
• The main advantage of these methods is that they prevent the
corruption of critical image features (e.g., edges, sharp boundaries) by
ensuring that only appropriate pixels are averaged.
• This technique is especially beneficial when dealing with localized
corruption or noise in images, as it can selectively smooth out
undesirable regions without affecting the overall image quality.
Averaging according to inverse gradient
• A technique that improves image smoothing by assigning weights to
pixels based on the inverse of their gradient values.
• This method helps to maintain edge sharpness and prevent blurring in
regions where pixel values change significantly, such as at edges.
Averaging according to inverse gradient
Averaging according to inverse gradient
Averaging according to inverse gradient
Averaging according to inverse gradient
Averaging according to inverse gradient
Averaging using a rotating mask
• This technique introduces a non-linear image smoothing technique that
aims to reduce edge blurring by selectively averaging pixels based on
regional homogeneity.

• This method differs from traditional linear filtering techniques by


using variable-shaped masks to adaptively select homogeneous
regions around a pixel.
Averaging using a rotating mask
Concept of Rotating Mask
• The method uses multiple 3×3 masks that are rotated and translated
around a 5×5 neighborhood of the target pixel.
• The goal is to select the mask configuration that best fits the local
region's homogeneity, which helps preserve edges and reduce noise.
• As shown below, there are eight possible rotated 3×3 masks, which are
evaluated to determine which one best represents the local structure.
• The ninth mask represents the 3×3 neighborhood of the central pixel.
Averaging according to inverse gradient
Averaging using a rotating mask
Algorithm
Averaging using a rotating mask
Non-linear Approach: Unlike linear methods (e.g., simple averaging or
convolution filters), this technique uses a non-linear selection process.
• It does not average all pixels uniformly, but rather selects a subset of
pixels that satisfy a homogeneity criterion.
• This subset is dynamically adjusted depending on local pixel
intensities.
Rotating Masks: The rotating masks adapt to local structures and
choose the mask shape that best captures the characteristics of the local
area.
• This prevents averaging across edges, which would blur them, and
ensures that smooth regions are effectively smoothed.
Averaging using a rotating mask

• The size and shape of the mask significantly influence the outcome.
Smaller masks lead to more iterations and finer convergence, but
larger masks suppress noise faster and produce a stronger sharpening
effect.
• Larger masks, however, might lose information about details smaller
than the mask size.
Median filtering
• In probability theory, the median divides a probability distribution into two
equal halves, meaning that half the data points are less than the median,
and half are greater.
• For a random variable 𝑥, the median M is defined as the value for which
the probability of the outcome 𝑥<M is 0.5.
• In the context of image processing, the median is found by sorting the
intensity values of a group of pixels and selecting the middle value.
Median Filtering in Image Processing
• Median filtering is a non-linear smoothing method where each pixel in the
image is replaced by the median of its surrounding neighborhood's
brightness values.
Median filtering
• It is particularly effective for removing impulse noise (e.g.,
salt-and-pepper noise) because it is less sensitive to extreme values than
the mean.
• Impulse Noise Removal: As shown below, median filtering can remove
bright and dark dots (impulse noise) without blurring the image
excessively, unlike linear filters.

You might also like