Assignment 2
Image processing and computer vision
Q1) What is meant by image enhancement by point processing? Discuss any two
methods in it.
Ans)
Image enhancement: Image enhancement is a basic digital image processing
method. It is the process of manipulating or adjusting digital image so that the
result is more suitable for display or further image analysis. Like, you can remove
noise, sharpen, smooth brighten an image.
Point processing: It is a method of image enhancement; the point processing
technique depends only on the intensity at a point. It is also called as intensity
transformation or gray level mapping function.
Point processing is further categorized into two types:
1. Linear intensity transformation functions:
• Negative transformation functions
• Identity transformation function
2. Non-Linear transformation functions:
• The logarithmic transformation
• The power-law transformation
Methods for image enhancement by point processing:
1) Image negatives: This type of processing is suited for enhancing white or gray
detail embedded in dark regions of an image
• The negative of an image with intensity levels in the range [0, L-1] is
obtained by using the negative transformation.
• The expression of negative transformation is given by: S = (L-1) - r
o S represents a negative image
o L has a maximum gray level range of values 0 to 255
o r is the original gray scale image
• Reversing the intensity levels of an image in this manner produces the
equivalent of photographic negative.
Example of image negative transformation:
A) Gray-scale image and B) Negative image
2) Logarithmic transformation: Logarithmic functions are particularly useful when
the input gray level may have an extremely large range of values.
• Genral form of the log transformation- S = c log (1 + r)
o “c” is a constant
o R >= 0
• Logarithmic transformation maps a narrow range of low input gray levels
values into a wider range of output values.
• The inverse log transformation performs the opposite transformation
Example of image logarithmic transformation:
A) Gray-scale image and B) log transformation image
Basic gray-level transformation functions used for image enhancement:
This shows the gray level transformation of both negative and log function
Q2) Explain smoothing spatial filters and nonlinear order statistic spatial filters.
Ans)
Smoothing filters are used for:
• Blurring and
• Noise reduction in the image.
Blurring is a pre-processing step for removal of small details and noise reduction is
accomplished by blurring.
Types of smoothing spatial filters:
• Linear filter (Mean filter)
• Order statistics (Non-linear)
Order Statistics Filter:
It is based on ordering the pixels contained in the image area encompassed by the
filter. It replaces the value of the center pixel with the value determined by the
ranking result. Edges are better preserved in this filtering. The filter selects a
sample from the window but does not average. This is best suited for “salt and
pepper” noise.
Types of Order statistics filter:
• Minimum filter: 0th percentile filter is the minimum filter. The value of
the center is replaced by the smallest value in the window.
• Maximum filter: 100th percentile filter is the maximum filter. The value
of the center is replaced by the largest value in the window.
• Median filter: Each pixel in the image is considered. First neighboring
pixels are sorted and original values of the pixel is replaced by the
median of the list.
Q3) Explain the method of using the second derivate for Image sharpening by
Laplacian Operator.
Ans)
The derivative operator Laplacian for an Image is defined as
For X-direction,
For Y-direction,
By substituting Equations in 2 and 3 in 1 we obtain the following equation
The equation represented in terms of Mask:
0 1 0
1 -4 1
0 1 0
When the diagonals also considered then the equation becomes,
The Mask representation of the above equation,
1 1 1
1 -8 1
1 1 1
Now let’s discuss further how image sharpening is done using Laplacian.
Equation:
Where f(x,y) is the input image
g(x,y) is the sharpened image and
c= -1 for the above-mentioned filter masks.