Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
35 views

Presentation 1

The document discusses spatial domain image processing techniques. It describes spatial filtering and histogram processing methods. Spatial domain refers to directly manipulating pixel values in an image. Common techniques include basic intensity transformations, contrast stretching, thresholding, histogram equalization, and linear spatial filtering of images. The objective is to enhance images by improving contrast, highlighting features, or modifying pixel values based on neighborhood pixels.

Uploaded by

MJAR Programmer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Presentation 1

The document discusses spatial domain image processing techniques. It describes spatial filtering and histogram processing methods. Spatial domain refers to directly manipulating pixel values in an image. Common techniques include basic intensity transformations, contrast stretching, thresholding, histogram equalization, and linear spatial filtering of images. The objective is to enhance images by improving contrast, highlighting features, or modifying pixel values based on neighborhood pixels.

Uploaded by

MJAR Programmer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

CHAPTER-3

Spatial Domain Image Processing


Outline
• Spatial Processing of Digital Images
• Basic Intensity Transformation Functions
• Histogram of images
• Spatial filtering
• Histogram processing
• Combining Spatial Enhancement Method
Principle Objective of Enhancement
• Image enhancement is the procedure of improving the
quality and the information content of original data before
processing.
• To Process an image so that the result will be more
suitable than the original image for a specific application.
• The techniques are problem oriented.
• A method which is quite useful for enhancing an image
may not necessarily be the best approach for enhancing
another image.
Principle Objective of Enhancement
Images may suffer from the following degradations:
 Poor contrast due to poor illumination or finite sensitivity of the
imaging device.
 Electronic sensor noise or atmospheric disturbances leading to
broadband noise.
 Aliasing effects due to inadequate sampling.
 Finite aperture effects or motion leading to spatial degradation of
the image.
Good images
For human visual
 The visual evaluation of image quality is a highly subjective
process.
 It is hard to standardize the definition of a good image.
For machine perception
 The evaluation task is easier.
 A good image is one which gives the best machine recognition
results.
• A certain amount of trial and error usually is required
before a particular
• image enhancement approach is selected.
Spatial domain methods
 Spatial domain refers to the aggregate of pixels
composing an image or the image plane itself.
 Approaches in this categories are based on direct
manipulation of pixel in an image.
 Spatial domain process are denoted by the expression
 g(x,y)=T[f(x,y)]
 f(x,y)- input image
 T- operator on f, defined over some neighborhood of f(x,y)
 g(x,y)-processed image
 Neighborhood can be any shape but generally it is
rectangular ( 3x3, 5x5, 9x9 etc).
Cont...

• The neighborhood of a point (x,y) can be explained by using a square or

rectangular sub image area centered at (x,y).

• The center of sub image is moved from pixel

to pixel starting at the top left corner.

• The operator T is applied to each location

• (x,y) to find the output g at that location .

• The process utilizes only the pixel in the area

of the image spanned by the neighborhood.


A 3*3 neighborhood about a point (x, y) in an image.
Cont..
• The smallest possible neighborhood is of size 1 x 1.
• In this case, g depends only on the value of f at a single point (x, y)
and T becomes an intensity (also called a gray-level, or mapping)
transformation function of the form:
S=T(r)
• Where, r- Denotes the gray level of f(x,y)
• s- Denotes the gray level of g(x,y) at any point (x,y)
• There are three kinds of functions in gray level transformation:
 Point Processing
 Basic Gray Level Transformation
 Piece wise linear transformation functions
Point processing
1) Contract stretching:
• It produces an image of higher contrast than the original one.
• The operation is performed by darkening the levels below k
and brightening the levels above k in the original image.

• In this technique the value of r below k are compressed by the


transformation
• function into a narrow range of s towards black.
• The opposite effect takes place for the values of r above k.
Cont...
2) Thresholding function:
• It is a limiting case where T(r) produces a two levels
binary image.
• The values below k are transformed as black and above k
are transformed as white.
Basic Gray Level Transformation
• These are the simplest image enhancement techniques.
1. Image Negative:
• The negative of an image with gray level in the range of [0, L-1] is
obtained by using the negative transformation.
• The expression of the transformation is

s= L-1-r

• Reverting the intensity levels of an image in this manner produces


the equivalent of a photographic negative.
Cont..
2. Log transformations:
• The general form of the log transformation is s= c log(1+r)
• Where c- constant and r ≥ 0
• This transformation maps a narrow range of gray level values in the input
image into a wider range of output gray levels. The opposite is true for
higher values of input levels.
• We would use this transformations to expand the values of dark pixels in an
image while compressing the higher level values. The opposite is true for
inverse log transformation.
Cont...
• 3. Power Law Transformation:
• Power law transformations has the basic form
• Where c and y are positive constants.
• Power law curves with fractional values of y map a narrow range of dark
input values into a wider range of output values, with the opposite being true
for higher values of input gray levels.
• We may get various curves by varying values of y.
Cont...
• The three have generalized by the following graphs:
Piece wise linear transformation functions
• The principal advantage of piecewise linear functions is
that these functions can be arbitrarily Complex.
• But their specification requires considerably more user
input.
1. Contrast Stretching:
• We may have various low contrast images and that might
result due to various reasons such as lack of illumination,
problem in imaging sensor or wrong setting of lens
aperture during image acquisition.
• The idea behind contrast stretching is to increase the
dynamic range of gray levels in the image being
processed.
Cont..
• The location of points (r1,s1) and (r2,s2) control the shape
of the curve
A. If r1=r2 and s1=s2, the transformation is a linear
function that deduces no change in gray levels.
B. If r1=s1, s1=0 , and s2=L-1, then the transformation
become a thresholding function that creates a binary
image.
C. Intermediate values of (r1, s1) and (r2, s2) produce
various degrees of spread in the gray value of the
output image thus effecting its contract , so that the
function is single valued and monotonically increasing.
Cont..
• Fig. 3.10(a) shows a typical
transformation used for contrast
stretching.
• Fig. 3.10(b) a low-contrast image :
result from poor illumination, lack of
dynamic range in the imaging sensor,
or even wrong setting of a lens
aperture of image acquisition.
• Fig. 3.10(c) shows the result of
contrast stretching, obtained by setting
(r1, s1) ( rmin, 0) and (r2, s2) (rmax,
L-1) where rmin and rmax denote the
minimum and maximum intensity
levels in the input image.
• Fig. 3.10(d) shows the result of using
the thresholding function, with (r1,s1)
(m,0) and (r2, s2) (m, l-1)where m is
the mean intensity level in the image.
Cont..
• Highlighting a specific range of gray levels in an image is
often desirable.
• E.g. when enhancing features such as masses of water in
satellite image and enhancing flaws in x- ray images.
• There are two ways of doing this:
• One method is to display a high value for all gray level in
the range of interest and a low value for all other gray
level.
• Second method is to brighten the desired ranges of gray
levels but preserve the background and gray level
tonalities in the image.
Cont..
2. Gray Level Slicing
• Highlighting a specific range of gray levels in an image is often
desirable.
• E.g. when enhancing features such as masses of water in
satellite image and
• enhancing flaws in x- ray images.
• There are two ways of doing this:
• One method is to display a high value for all gray level in the
range of interest
• and a low value for all other gray level.
• Second method is to brighten the desired ranges of gray levels
but preserve
• the background and gray level tonalities in the image.
Cont..
Cont..
• Sometimes it is important to highlight the contribution made to the total

• image appearance by specific bits. Suppose that each pixel is represented

• by 8 bits.

• Imagine that an image is composed of eight 1-bit planes ranging from bit

• plane 0 for the least significant bit to bit plane 7 for the most significant bit.

• In terms of 8-bit bytes, plane 0 contains all the lowest order bits in the

• image and plane 7 contains all the high order bits.


Cont..
Histogram processing
• The histogram manipulation is a fundamental tool in
image processing.
• Histograms are simple to compute and are also suitable
for fast hardware
• implementations, thus making histogram-based
techniques a popular tool for
• real-time image processing.
• Histogram shape is related to image appearance. For
example, Fig. 3.16
• shows images with four basic intensity characteristics:
dark, light, low
• contrast, and high contrast; the image histograms are also
shown.
Cont..
Dark image
 Components of histogram are concentrated on the low side of the
gray scale.
Bright image
 Components of histogram are concentrated on the high side of the
gray scale.
Low-contrast image
 The histogram is narrow and centered toward the middle of the
gray scale
High-contrast image
 The histogram covers broad range of the gray scale and the
distribution of pixels is not too far from uniform, with very few
vertical lines being much higher than the others.
Fundamentals of spatial filter
• Filtering refers to passing, modifying, or rejecting specified

frequency components of an image.

• Spatial filtering modifies an image by replacing the value of

each pixel by a function of the values of the pixel and its


neighbors.

• If the operation performed on the image pixels is linear, then the

filter is called a linear spatial filter . Otherwise, the filter is a


nonlinear spatial filter.
Linear spatial filtering

• f and a filter kernel, w.


• The kernel is an array whose size defines the
neighborhood of operation, and whose coefficients
determine the nature of the filter, our focus will be on
masks of odd sizes, e.g. 3x3, 5x5,...
• At any point (x, y) in the image, the response, g(x,y), of
the filter is the sum of products of the kernel coefficients
and the image pixels encompassed by the kernel:

You might also like