Daniel Stanley Tan edited subsection_Segmenting_the_Infected_Part__.tex  over 8 years ago

Commit id: e2a0330d7fad9af5881ffea7049b0fa7d045be8b

deletions | additions      

       

Following their work, we converted the image from the RGB color space to the L*a*b* color space. Commission Internationale d’Eclairage (CIE) designed the L*a*b* color space to match how humans perceive differences in color and luminance \cite{szeliski2010computer}, thus making it a good color space for computing distances. It is composed of a luminosity or lightness dimension (L*) and two chromaticity or color dimension (a*b*). Isolating the color information to two dimensions (in L*a*b*) makes it computationally more efficient than having the color information spread to three dimensions (in RGB) \cite{dubey2013infected}.   The pixels are then clustered in the a*b* space using the K-Means algorithm. The K-Means algorithm starts by randomly selecting $k$ pixels as the initial centroids for the clusters.The  $k$ is a user defined parameter that sets the number of clusters to be formed. The centroids represent the clusters and is used in determining which pixels belong to it. The rest of the algorithm is an iterative process and proceeds as follows: (Step 1) Assign all the pixels to the cluster with the centroid closest to them. We used the Euclidean distance in computing for the similarity -- the lesser the distance the more similar they are. (Step 2) Compute for the new centroids of each cluster by getting the mean of all the pixels within that cluster. (Step 3) Repeat Steps 1 and 2 until the clusters do not change anymore. After clustering, the image is then segmented based on the clusters of its pixels, i.e. each cluster of pixels form a separate image. The general idea is that the infected part of the fruit would be similar in color and will tend to be in a separate cluster from the healthy part of the fruit.