Research Article

A Novel AI-Based Approach for Better Segmentation of the Fungal and Bacterial Leaf Diseases of Rice Plant

Algorithm 2

Ground truth algorithm.
To create Ground truth image dataset, we applied following steps:
1. Read Image
2.
Manually select pixels and such that,
if
Where intensity of is and (x,y)and (p,q)are randomly selected pixel coordinates on image Img. Here we are taking a random value because intensity having nearby gray values has similar color, so they can be part of foreground or background.
Store coordinates in dataset
else
Store coordinates in dataset
end
end
Here, d1 and d2 are two datasets contains the coordinates of the pixels found in foreground and background of the output of k-means clustering.
3. Remove entries from d2 if any
4. Now coordinates of dataset d1 and dataset d2 may use as coordinates of foreground objects and coordinates of background object.
5. Exit