You are on page 1of 6

A REPORT ON COLOR AND MULTISPECTRAL IMAGING TECHNIQUE LAB No-1

By: Sharib Ali

Objective:
Understanding of handling color in images: representation, conversion. Segmentation and
interpretation.

PART I. Study of the Intensity, Luminance and color component

Objective: Intesity-Importance is mainly in the quantity measured linearly by image sensors.


Luminance- It refers to the quantity perceived by the human visual system.
1. “Flowers.tif” was loaded using the function “imread”
2. The image was converted to gray level of components R, G and B by averaging the three
components RGB . Command: Image= sum(image,3);
3. The image was illuminated by scaling the RGB of the image with the weigths 0.299,0.587 and
0.113 respectively.
4. Matlab function rgb2gray was used and the image were compaired.

Conclusion: The averaged and transformed image was almost similar to the one which was obtained
by the MATLAB function.

A. Appropriate Color Spaces

Submitted to: Professor Alamin Mansouri Page 1


A REPORT ON COLOR AND MULTISPECTRAL IMAGING TECHNIQUE LAB No-1
By: Sharib Ali

The more appropriate color space to describe intuitively a clolor is ‘RGB’ color space because
mixture of RGB color will give a variety of colors. Hence, it can be useful to find the uncorrelated
components.
The most common RGB on computers these days is RGB24 which gives 8 bits to each color level
(that's what gives us the 0-255 range as 2 to the 8th power is 256), thus white is 255,255,255
and black is 0,0,0
B. Processing of Color image “house.tif”
1. The image was made brighter by adding some constant to the image without changing the
colors.
2. MATLAB function “rgb2hsv” is used to convert the RGB image to hsv image.
3. In HSV space, we increase the value ‘0-1’ to get the brighter image without changing the
color.
4. The color gets pure by increasing the saturation in HSV space(0 to 1).
5. The colour can be changed by changing the hue value in HSV space (0 to 1).
6. With the slight change in the shading hue changes the color.
7. Different colour spaces are better for different applications, for example some equipment
has limiting factors that dictate the size and type of colour space that can be used. The other
possibilities of such color combination could be CMY(K) (Cyan Magenta Yellow
(Black)), YIQ and YUV are analogue spaces for NTSC and PAL systems
respectively, YCbCr is a digital standard.

Submitted to: Professor Alamin Mansouri Page 2


A REPORT ON COLOR AND MULTISPECTRAL IMAGING TECHNIQUE LAB No-1
By: Sharib Ali

Part II. Segmentation: Thresholding and classification

Objective: The goal of image segmentation is to cluster pixels into salient image regions, i.e.,
regions corresponding to individual surfaces, objects, or natural parts of objects.
A. Thresholding
1. The colour image consists of three graylevel images R,G & B which were ploted as
below:

2. In RGB space a filtered image of the house was made with the pixels having the same
color as façade and others at pixel 0.
3. Similarly, the façade with the blue was also made

Submitted to: Professor Alamin Mansouri Page 3


A REPORT ON COLOR AND MULTISPECTRAL IMAGING TECHNIQUE LAB No-1
By: Sharib Ali

4. The image was converted from RGB to HSV color space using “rgb2hsv(image)”
5. The three components were ploted for ‘hue’, ‘saturation’ and ‘value’.

6. The problem is it gives some ambiguity with the colors and shading effects.
7. Shading Effect is reduced in ‘Saturation space’.
8. We use image2(i,j,2)<=0.49 && image2(i,j,2)>=0.35 condition to
illustrate make the thresh holding. We obtained the values from the
histogram plot.
9. We apply the median filter to the previous threshold image to eliminate the outliners.

Submitted to: Professor Alamin Mansouri Page 4


A REPORT ON COLOR AND MULTISPECTRAL IMAGING TECHNIQUE LAB No-1
By: Sharib Ali

B. Multi-Thresholding
1. The correlation between (R,G), (G,B) and (B,R) were found for the images “hand.jpg” and “colors.tif”.
But since, we didn’t get better result with it so we used HSV format in which the correlation was found
between the (H,S),(S,V) & (V,H). The MATLAB function used was “corr2”
2. The number of clouds were distinct and more in those pair of components which had lowest
correlation.
Eg. In “hand.jpg” we got three clouds with lowest correlation along (B,R), but here two clouds are much
more distinct and so they must correspond the objects.

3. We define an object as a class here and take the threshold values of blue and red to get the object
separately (Segmentation).

Submitted to: Professor Alamin Mansouri Page 5


A REPORT ON COLOR AND MULTISPECTRAL IMAGING TECHNIQUE LAB No-1
By: Sharib Ali

C.Classification
1. We defined 6 different classes for different colors defined in figure below.
2. We took the different pixel values randomly (RGB) for different classes and then we found the
distance(Euclidean) with the pixel values at different positions of the pixel in the image.
3. The class which has the minimum distance is assigned that value to the image and in this way
different classes will be filled with the pixel values which were initially assigned to 0.
4. Finally, we get the set of six different classes which we can display as a class.

Thus, we can combine different classes of color resembling the image to get the required object as
shown above. This result was given by the computation we had done.

Limitations:
It becomes a slow process in MATLAB to get the result as it has many interpolations.

---------

Submitted to: Professor Alamin Mansouri Page 6

You might also like