0% found this document useful (0 votes)
1 views

DIP unit 3

The document discusses various techniques in digital image processing, focusing on gray level transformations, histogram processing, and spatial filtering. It covers methods such as negative image, log transformation, and gamma transformation for enhancing image quality, as well as the application of fuzzy techniques to improve intensity transformation and spatial filtering. Additionally, it highlights the significance of these techniques in fields like medical imaging, remote sensing, and computer vision.
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)
1 views

DIP unit 3

The document discusses various techniques in digital image processing, focusing on gray level transformations, histogram processing, and spatial filtering. It covers methods such as negative image, log transformation, and gamma transformation for enhancing image quality, as well as the application of fuzzy techniques to improve intensity transformation and spatial filtering. Additionally, it highlights the significance of these techniques in fields like medical imaging, remote sensing, and computer vision.
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/ 89

1

UNIT 3
Bhavana Tiwari

Basic Grey Level Transformations, Histogram Processing, Spatial Filtering, Smoothing Spatial Filters,
Sharpening Spatial Filters, Combining Spatial Filter Methods, Segmentation of Grey Level Images, Water
Shade Algorithm, Fuzzy Techniques for Intensity Transformation and Spatial Filtering.
Gray Level Transformation
2

• Image enhancement is the most fundamental and simple process of digital


image processing. output image. For this purpose, we will use the
mathematical operation of gray In this process, the intensity level of
an image is manipulated to get a better level transformation, also
known as intensity transformation.
Image enhancement in the spatial domain is based on the following
expression:
3
4
5
LINEAR TRANSFORMATION AND IMAGE ENHANCEMENT

Gray level transformation can be linear or non-linear operation. Linear transformation possesses
the property of homogeneity and additivity. Linear gray level transformation techniques which are
used in image enhancement are discussed in detailed manner in the subsequent sections.
6
1. BASIC INTENSITY TRANSFORMATION FUNCTION
Gray level transformation is one of the simplest image processing techniques. In digital image processing,
the transformation functions are stored in a table. The mappings are implemented via table lookups. For an
n-bit image, a lookup table will have 2n entries.

There are three basic types of intensity functions used in gray level transformation:

• Negative Image
• Log Transformation
• Gamma Transformation
BASIC INTENSITY TRANSFORMATION FUNCTION

NEGATIVE IMAGE

The negative of a image having intensity range [0, L – 1] can be found using the following transformation: 7
Negative Image
This technique is used to enhance white or light color
detail in dark background, as dark color in light
background is easily visible than light color in dark
background. Here dark becomes light and light
becomes dark.
8
LOG TRANSFORMATION
In log transformation, the higher range of intensity level is mapped to a lesser range of
intensity level at the brighter side, whereas the lesser range of intensity level is
mapped to higher range of intensity level at the darker side. The log transformation 9
expands the dark pixels. Log transformation is applied when the intensity levels are very
large, for example, 0 to 10^6. This is because transformation compresses the intensity
levels of input level.

The inverse logarithmic transformation is called exponential transformation.


It has the opposite behavior that of logarithmic transformation. The higher range of
intensity level is mapped to higher range of intensity level at the brighter side,
whereas the lesser range of intensity level is mapped to a lesser range of intensity level
at the darker side.
POWER LAW (GAMMA) TRANSFORMATION
The power law (or gamma) transformation is of the form:
10
Histogram Processing
11

• Histograms of high contrast images have intensity values spanned across


the maximum and minimum intensity levels. We try to transform the
histogram of a given input image to a uniform distribution using the
technique of histogram equalization. Result of histogram equalization is
always uniform distribution. It is independent of the probability
distribution function of the input image. Hence we obtain a high contrast
image.

Result of Histogram Equalization is always


uniform independent of shape of input image
Histogram Equalization in Digital Image Processing
12

• A digital image is a two-dimensional matrix of two spatial coordinates,


with each cell specifying the intensity level of the image at that point. So,
we have an N x N matrix with integer values ranging from a minimum
intensity level of 0 to a maximum level of L-1, where L denotes the
number of intensity levels. Hence, the intensity levels of a pixel r can take
on values from 0,1,2,3,…. (L-1). Generally, L = 2m, where m is the
number of bits required to represent the intensity levels. Zero level
intensity denotes complete black or dark, whereas L-1 level indicates
complete white or absence of grayscale.
13
14
15
16
17
18
19
20
Spatial Filtering and its Types
21
Spatial Filtering technique is used directly on pixels of an image. Mask is usually considered to be added in
size so that it has specific center pixel. This mask is moved on the image such that the center of the mask
traverses all image pixels.

Classification on the basis of Linearity


There are two types:

1. Linear Spatial Filter


2. Non-linear Spatial Filter
Spatial Filtering

 Spatial filtering is a technique used to enhance the image based on the spatial
characteristics of the image. It can be used for image sharpening, edge 22
detection, blurring, image sharpening and noise reduction.

 Linear spatial filters apply a linear operation to an image, such as convolution


with a kernel or mask. They are used to enhance or extract features from an
image, such as edges or textures such as Sobel and Prewitt, and linear image
enhancement techniques, such as histogram equalization.

 Nonlinear spatial filters apply a nonlinear operation to an image. They are used
to enhance or extract features from an image in a more complex way than
linear filters. Examples include median filters, which are used to remove
noise from an image by replacing each pixel with the median value of the
pixels in its neighborhood, and morphological filters, which are used to
extract specific shapes or structures from an image.
23
24
What is Spatial Filtering?

25

Neighborhood operations operate on a larger


neighborhood of pixels than point operations as discussed
in Image Processing #3. They are mostly a square around
a central pixel and any size rectangle and any shape filter
are possible.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
DIP
44
DIP

45
DIP

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

DIP
62
63

DIP
64

DIP
65

DIP
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Segmentation of Grey Level Images 80
81
82
Water Shed Algorithm 83
84
85
Fuzzy Techniques in Image Processing
86
1. Fuzzy Techniques in Image Processing
Fuzzy logic, derived from fuzzy set theory, is a method that allows us to deal with uncertainty and ambiguity
in data. Unlike traditional binary logic, which considers only true or false values, fuzzy logic introduces
degrees of truth, which can range between 0 and 1. This flexibility makes fuzzy techniques particularly
useful for image processing tasks, where pixel values can often be uncertain or gradual, rather than strictly
binary.
2. Intensity Transformation
Intensity transformation is a key step in image processing that involves modifying the intensity values of an
image's pixels to enhance or adjust its appearance. This transformation can be used to increase contrast,
brighten or darken an image, and highlight certain details. Fuzzy techniques can be applied in intensity
transformation to achieve smoother, more adaptive adjustments by mapping pixel intensities to fuzzy
membership functions.
For example, in a grayscale image, pixel values (intensities) can be interpreted as belonging to fuzzy sets
such as "dark," "medium," or "bright." Based on these fuzzy sets, we can apply transformations to enhance
certain features while preserving the overall natural look of the image. This approach is beneficial when we
want to highlight subtle features or handle areas with varying lighting conditions.
Common Intensity Transformations:

•Contrast Stretching: Enhancing contrast by expanding the range of 87


intensity values.

•Logarithmic Transformations: Useful for compressing the dynamic


range of an image, particularly in regions with high intensity.

•Power-Law (Gamma) Transformations: Allows for nonlinear


adjustments of brightness in the image.
Using fuzzy logic, these transformations can be adapted to work
dynamically across different regions of the image, based on local intensity
levels and membership in fuzzy sets.
3. Spatial Filtering
Spatial filtering involves the manipulation of pixels within a local neighborhood in an image.
It is commonly used for tasks such as smoothing, sharpening, edge detection, and noise
reduction. Spatial filters work by applying a kernel (matrix of values) to each pixel and its 88
neighbors to calculate a new intensity value for that pixel.Incorporating fuzzy techniques into
spatial filtering can enhance these processes by making the filtering adaptive. Instead of
applying the same kernel across the whole image, fuzzy rules allow the filter to change based
on local pixel characteristics. For instance, fuzzy spatial filters can adjust the degree of
smoothing in noisy regions while preserving edges in clearer areas.
Types of Spatial Filtering:
Smoothing Filters:
Used to reduce noise or smooth out transitions in the image.
Sharpening Filters:
Enhance edges and fine details to make features more pronounced.
Edge Detection:
Highlights boundaries between different regions by identifying sharp changes in
intensity.Using fuzzy rules, spatial filtering can become context-aware. For example, an
edge-detection filter could apply stronger filtering where edges are clear and reduce filtering
in regions with gradual intensity changes.
Applications of Fuzzy Techniques in Image Processing
Fuzzy techniques in intensity transformation and spatial filtering have
various applications, including: 89
•Medical Imaging: Enhancing details in MRI or X-ray images.
•Remote Sensing: Processing satellite images to highlight land features.
•Computer Vision: Improving object detection accuracy by making
images clearer and more informative.
In summary, fuzzy techniques bring flexibility and adaptability to image
processing tasks, especially for handling complex or ambiguous visual
information. They help create more natural-looking transformations and
filters that can be adjusted based on the unique characteristics of each
image region.

You might also like