Lab Exercises: LAB 8
(Histogram & Histogram Equalisation)
General guidance:
1. All the images you use can be downloaded from the website:
http://www.dcs.qmul.ac.uk/~phao/CIP/Images/
2. The formats for the images we provided are TIF, BMP and RAW.
3. For RAW images, the files have no head data, just the image data as matrices
stored. For our RAW images, we do not provide the colour components, and all
the data are gray-scale images, a one-byte unsigned integer per pixel, value from
0 to 255.
4. The size of image Cameraman is of 128x128. Other images are of 512x512.
Exercise 1.
Finding Histogram
To find the histogram of an image by counting the numbers of the pixel values in the
image.
Exercise 2.
Histogram Normalisation
To normalise a histogram by dividing by the number of the counted pixels.
Exercise 3.
Histogram Equalisation
To equalise a histogram of an image and to find the transform (corresponding gray
levels for mapping) for histogram equalisation and then apply the transform to the image.
Exercise 4 (for MSc students).
Histogram Displaying
To make a histogram into an image and display the image in a window. The image can
be sized to 256-by-256.
Questions: What happens if we apply histogram equalisation twice to the same image?
Are the transforms the same if we apply histogram equalisation to different regions of
interest (ROI) in an image?