CE-671 INTRODUCTION TO REMOTE SENSING
LABORATORY -5
(2025-26 1st SEMESTER)
OBJECTIVES
• Using different techniques for contrast enhancement
• Gray level slicing and its applications
METHODOLOGY:
For this exercise, we will be using the Resourcesat-II LIS-III imagery. There are three bands given ‘G’,
‘R’ and ‘IR’ corresponding to bands ‘2’, ‘3’ and ‘4’. The exercise is to be carried out in MATLAB (or
any other programming language) and is divided into two parts ‘Contrast Enhancement’ and ‘Gray
Level Slicing’. Also, for carrying out mathematical operations on an image, first convert it to ‘double’.
CONTRAST ENHANCEMENT
For each of the below techniques, display the original and transformed image colour composites
using ‘subplot’. Compute the mean, standard deviation, and variance of the bands (original and
transformed). Show the histograms also. Apply below techniques for each band and then create
colour composite.
1. HISTOGRAM EQUALIZATION
Use the images given with this lab.
Perform histogram equalization using the ‘histeq’ function in Matlab.
2. INVERSE TRANSFORMATION
If L represents the original image. Use the following equation for inverse transformation
𝐿𝑖𝑛𝑣= (2𝑛 -1)−𝐿
n: number of bits used to represent an image. It is 8 bit (i.e. 256 grey levels) in given
single band image.
3. LOG TRANSFORMATION
If L represents the original image. Use the following equation for log transformation
𝐿𝑙𝑜𝑔= 𝐶 × 𝑙𝑜g(1+𝐿)
C: constant. Its value should be such that the log transformed image should not have
digital number (DN) exceeding 2𝑛−1.
i. Why in the equation there is a value of ‘1’ added to each pixel before the log operation?
ii. Observe the transformed images (i.e. colour composite) by varying the value of C.
iii. How does the value of C affect the transformation? What should be the maximum value of
C?
(Hint: when performing a logarithmic transformation, it is often desirable to bring the result
back to valid image data. You may use ‘mat2gray’ and ‘im2uint8’)
4. POWER LAW TRANSFORMATION
i. If L represents the original image. Use the following equation for the transformation
Lpower=C × Lɤ
where C: constant
ɤ: constant
ii. Observe the transformed images (i.e. colour composite) by varying the value of C.
a. Observe the transformed images (i.e. colour composite) for 𝛾 < 1
b. Observe the transformed images (i.e. colour composite) for 𝛾 > 1
GRAY LEVEL SLICING
i. Convert the original colour composite image to gray by using ‘rgb2gray’.
ii. How many bands are present in the colour composite image and in the converted gray scale
image?
iii. Write a code to perform gray level slicing (on the converted gray scale image) with respect
to the following classes.
Table 1: Class and digital number range of a class.
Range in gray scale New digital
S.No. Class
image number
1 River
2 Vegetation
3 Urban
4 Land
5 Sand
iv. Visualise converted gray scale image and select the ‘data cursor’ tool. Click on the pixels of a
class and decide the intensity range for that class. If the converted gray scale image has less
contrast, then use any of the previous contrast enhancement technique, for better
visualisation (and can also perform gray level slicing on this contrast enhanced image).
v. Generate a new gray scale image after performing gray level slicing.
DELIVERABLES:
• Report with images and explanations
• Published MATLAB code (.pdf file)
SUBMISSION DUE DATE: 07:00 PM, 29th August (Friday)