Vision Assignment




PART I : Conversion of colored images to grayscale images


Test Image 1 : Spectrum

This is a classical example to show how the luminosity method is far better than any other. The average method gives no detail at all. The average value remains same at all points. Similarly, the intensity method also does not give too much detail. It does not take into account that lumonisity is different for different colors even if they have same intensity.This can be seen at the ends where the greyvalue decrease. And finally, the luminosity method gives nice results.


Orignal Image


gray=(red+blue+green)/3


gray=sqrt(red*red+blue*blue+green*green)


gray=.299*red+.587*green+.114*blue




Test Image 2 : Lena image

First published in Playboy,1972 this image has been used extensively in image processing researchs. The image provides a lot of variation in colors, textures and surfaces and has been the choice for experimentation for the past three decades.
Comments : The luminance greyscale image gives more features than the other two. This can be seen especially in the region around top part of hat and the lips.

ORIGNAL IMAGE g=(r+b+g)/3
g=sqrt(r*r+b*b+g*g) g=.299*r+.587*g+.114*b


Source Codes






Part II : Edge Detection

Test Image 1 : Tetrahedral

Original Image Grayscale image(.pgm format)

Effect of sigma -->

Sigma = 1 ; Threshold = 80 Sigma = 2 ; Threshold = 80
Sigma = 3 ; Threshold = 80 Sigma = 4 ; Threshold = 80

Effect of threshold -->

Sigma = 1 ; Threshold = 80 Sigma = 1 ; Threshold = 50
Sigma = 1 ; Threshold = 20 Sigma = 1 ; No Threshold




Test Image 2 : Lena Image

Original image Sigma = 1 ; Threshold = 80

Comments :

Source Codes