You are on page 1of 12

LINEAR FILTERING IN

IMAGE PROCESSING
APPLICATIONS

           By 
Prateek Joshi
2bv07e052
INTRODUCTION

• Filtering is a technique for modifying or enhancing an image.


• An image is filtereed to emphasize certain features or remove
other features.
• Image processing operations implemented with filtering
includes
•  
• Smoothing, 
• Sharpening, and 
• Edge enhancement.
DEFINITION

Linear filtering is filtering in which the value of an


output pixel is a linear combination of the values of
the pixels in the input pixel's neighborhood.
 

 
 
A pixel is the smallest single component of a digital image.
 
The more pixels used to represent an image, the closer the result can
resemble the original.
NOISE IN DIGITAL IMAGES
Digital images are prone to a variety of types of noise.
Noise is the result of errors in the image acquisition process
that result in pixel values that do not reflect the true intensities
of the real scene.
There are several ways that noise can be introduced into an
image, depending on how the image is created.
 Eg:
• If the image is scanned from a photograph made on film, the
film gain is a source of noise. Noise can also be the result of
damage to the film, or be introduced by the scanner itself.
• If the image is acquired directly in a digital format, the
mechanism for gathering the data (such as a CCD detector)
can introduce noise.
• Electronic transmission of image data can introduce noise.
REMOVING THE NOISE

• We can use linear filtering to remove certain types of noise.


Certain filters, such as averaging or Gaussian filters, are
appropriate for this purpose. For example, an averaging filter
is useful for removing  noise from a photograph.
• Linear image processing is based on the same two
techniques as conventional DSP:  
o convolution and 
o Fourier analysis. 

• The process is carried out by convolving the original image


with an appropriate filter kernel, producing the filtered image.
LINEAR CONVOLUTION

• Convolution is a neighborhood operation in which each


output pixel is the weighted sum of neighboring input pixels.
 
• The matrix of weights is called the convolution kernel, also
known as the filter.
 
• A convolution kernel is a correlation kernel that has been
rotated 180 degrees.
 
 
 
 
 
 
For example, suppose the image is
A = [17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9]
and the convolution kernel is
h = [8 1 6
357
4 9 2] 
STEPS
• Rotate the convolution kernel 180deg about its center 
• element.
• Slide the center element of the convolution kernel so 
• that it lies on top of the (2,4) element of A.
• Multiply each weight in the rotated convolution kernel by
• the pixel of A underneath.
• Sum the individual products from step 3.
Hence the (2,4) output pixel is
LINEAR FILTERS

Uniform filter - The output image is based on a local averaging


of the input filter where all of the values within the filter support
have the same weight. 
 
Gaussian filter - The use of the Gaussian kernel for smoothing
has become extremely popular. This has to do with certain
properties of the Gaussian (e.g. the central limit theorem,
minimum space-bandwidth product) as well as several
application areas such as edge finding and scale space
analysis. .
 
 
Performing Linear Filtering of Images
Using imfilter
Filtering of images, either by correlation or convolution, can be
performed using the toolbox function imfilter. 
 
This example filters an image with a 5-by-5 filter containing
equal weights. Such a filter is often called an averaging filter.
 
>>>>>>MATLAB<<<<<<
 

A serious problem with image convolution is the enormous


number of calculations that need to be performed, often
resulting in unacceptably long execution times.
Thus we use FFT convolution for faster execution.
 
THANK YOU

You might also like