## 2 Materials and Methods
### Proposed Method
#### 2.2.1 Plant Segmentation  
In this step, the plant regions are segmented from the input plant images using the region growing algorithm. To segment the plant images, initially, the RGB plant images are resized into 227 \(\times\) 227 \(\times\) 3 and converted to HSV images. Then, the plant region is segmented based on Algorithm 1.  
The selection criterion (\(G_{i}\)) is given in the following equation:  
\[G_{i}=\{0.1<H(v_{i})>0.4\text{ and }S(v_{i})>0.1\}, \tag{1}\]  
where \(H(v_{i})\) denotes the \(i\)th pixel value of the H plane and \(S(v_{i})\) denotes the \(i\)th pixel value of the S plane in the HSV plant image.  
A pixel is considered a seed pixel (s) when it is the first occurring pixel that satisfies selection criterion \(G_{i}\) in the HSV plant image. The similarity criterion plays a major role in the region growing process. This has to be chosen such that the plant region can be segmented from the plant image. In the proposed method, the similarity criterion (\(G_{i,i}\)) was chosen as given in Equation (2):  
\[G_{i,j}=\begin{cases}1,&\text{if }G_{i}\text{ and }G_{j}\text{ are true}\\ 0,&\text{otherwise}\end{cases} \tag{2}\]  
where \(i\) and \(j\) are neighboring pixels of the plant image.  
Equations (1) and (2) are used in the region growing algorithm (Algorithm 1) to segment the plant region.  
Figure 4: Workflow of the proposed method.  
```
1:Input (I): HSV Plant image
2:OUTPUT (P): Segmented plant region
3:\(B\) = Background region
4:\(s\) = seed pixel
5:\(G_{i,j}\) = similarity criterion between the \(i\)th pixel and its non-visited neighboring \(j\)th pixel.
6:\(G_{s,i}\) = similarity criterion between the \(s\) and \(i\)th pixel.
7:Initialize: P = { }, B = { } and \(G_{s,i}\)=0.
8: Select the seed pixel (s) as discussed in Section 2.2.1
9:for each unassigned neighboring pixel of \(s\)do
10:\(G_{ij}=G_{ij,j}+G_{s,i}\)
11:if\(G_{i,j}\) remains_unchanged then
12: Add that pixel to \(B\)
13: Search for a new seed pixel from the nearby unassigned pixels of the image.
14:else
15: Add that pixel to \(P\)
16: Update the current pixel as seed pixel.
17:endif
18:endfor
19:Repeat until all pixels are assigned to either \(P\) or \(B\)
```  
**INPUT (I):** HSV Plant image  
The second step is noise removal from the segmented image. The segmented plant region contains certain background regions like the reflection of light, background pixels similar to the diseased portion, etc., as noise regions. These noise regions affect the root root disease identification. Hence, it is very important to remove these noise regions. Uttmost care should be taken in the noise removal stage because infected leaf regions may be removed along with the noise regions present in the segmented plant region. In the proposed method, the noise removal is done in the following way: (i) Initially, the connected components (similar pixels connected with each other) are identified in the segmented image. (ii) Then, the area of each component is calculated. (iii) Finally, the small objects are removed by thresholding. In the proposed method, based on experimentation, the threshold value was chosen to be 3500. After removing the noise region from the segmented region (P), it is mapped with the input HSV plane. There will be pixels in the HSV plane that do not map with P which are considered as background pixels. These background pixels are removed in HSV plane and the remaining plant region is used as the mask over the original RGB plant image to obtain the plant region.  
Since the aim of the proposed method is to identify the root-rot-diseased plants (without ground truth images, so that it can be applied in various environments where the creation of ground truth images is tedious) and not plant segmentation, the segmentation accuracy was not calculated as this calculation requires ground truth images.