Tayyeba Rafaqat (Ms-15799) : Assignment 02
Tayyeba Rafaqat (Ms-15799) : Assignment 02
2) Minimum and maximum ranges of RGB pixel values have been selected manually for
each class using impixelinfo() in MATLAB. For training, parameters of class conditional
densities have been found using following pixel value ranges.
3) Assuming joint Gaussian density for each class, mean vector and co-variance matrix
for each class have been calculated using above data ranges. Mean and standard
deviation of each RGB feature have been calculated separately for each class. The
resulting joint gaussian class conditional density parameters are
where d=3, x=selected pixel to be classified, μ=mean vector of given class and
Zero-one loss matrix has been selected since all class errors are equally likely.
Pixel has been classified in class i such that the conditional risk for that class is
minimum.
A new image has been generated of dimensions as input image. Each input image pixel
is classified in one of the three classes. For class1, RGB value is [255,0,0]. Similarly, for
class 2 and 3, [0, 255, 0] and [0, 0, 255] respectively.
Segmented image.
5) Classification using minimum risk Bayes classifier is significantly accurate. The
inaccuracies are minimal and can be ignored. Major part of the image is classified
accurately. For further improvement, other classification techniques can be applied.