Morphological dilation
was performed to remove background noise, and this was followed by a mask operation to get
back the original colour of the segmented image resulting in a binary image and finally the
true image ofthe bananas (Fig.3). The RGB values were then extracted from the image and
converted to hue value using the following transformation: