DIP unit 3
DIP unit 3
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
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.
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.
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
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: