This exercise is on colour in image analysis
-
Download ColourMM.zip and extract it with
winzip.
-
Discuss the differences between the colour spaces, RGB, HSV. May be review
the respective slides from the lecture.
- start matlab and try to convert an RGB image to HSV space
-
Go to directory ColourMM/Images. (You can get help by typing
help command)
-
I=imread('dP940.tif');
-
imshow(I)
-
display only e.g. the red component : imshow(I(:,:,1))
-
use rgb2hsv (help rgb2hsv)
-
display the different components of the hsv and discuss them
- go to the directory ColourMM, start matlab and type
ColourMM. You will get a user interface. Some of the function
are already working and some you will have to implement.
-
Modelling of the chromaticity of the reflecting material: You can select
a light source (927 = 2700K, 940 = 4000K, 950 = 5000K, 965 = 6500K) and
a reflecting material (skin, blue-, green-, red-plastic). If you press
calculate
and plot chromaticities you will get a '*' indicating the light sources
chromaticity. Your task is now to implement the calculation and visualization
of the materials reflections in the file exercise1.m. Have a look
at the slides around
spectral integration and independence to
brightness if necessary.
-
By pressing on Load Image you can load an image. The number in the
file name indicates the light source used for taking the image (927 = 2700K,
940 = 4000K, 950 = 5000K, 965 = 6500K). Load an image (for example Gundega940.tif),
press Select Area and show chromaticities. You get a new figure
with the image. Now you can select an area (take the forehead) and doubleclick
to stop the selection. The chromaticities of the selected pixels will be
displayed after some calculation time (matlab is not very fast) in the
chromaticity plane. Compare the modelled with the measured data.
-
Implement a simple segmentation. The file exercise2.m gives a framework
for this. We will discuss possibilities together. (Images starting with
x are downsampled which makes the processing faster).