# Automated Visual Identification of Foliage Chlorosis in Lettuce Grown in Aquaponic Systems
## 4 Results and Discussion  
This section first presents the validation of the proposed method by a case study. Then, the performance of the proposed method is compared with existing similar methods. To validate the proposed model, twenty healthy seedings were placed in NFT-based hydroponic systems for five weeks (plantation cycle), after which lettuce was harvested. A 12 MP Sony Exmor RS camera sensor was used to capture the crop images during this period. Twenty images of 4032 \(\times\) 3024 pixels (one image for one lettuce plant) were captured daily at 9:00 am from the top while keeping the distance between the camera and channel at a value of 40 cm throughout the plantation cycle, i.e., five weeks. In total, 700 images of plants were collected over five weeks. During the first three weeks, no significant difference was observed in the color of the foliage. After the third week, foliage chlorosis was observed in eight lettuce plants. Therefore, for further processing, the images captured in the last two weeks of the plantation cycle were considered for model validation. In total, 280 images were divided into two classes based on the color of the foliage: Green Foliage--No Leaf Chlorosis (168 images) and Yellow Foliage--Leaf Chlorosis (112 images). The dataset is complemented with more lettuce images with green (32) and yellow (88) foliage, downloaded from Ecosia. The images were added to their respective classes. All the images were resized to 1000 \(\times\) 1000 pixels and saved in JPG format. The augmentation process was then performed. In total, 100 images (50 from both classes) were selected randomly for the augmentation, which created 100 new images. The new images were added to their respective classes, increasing the length of the dataset to 500 images. Half of these images belong to the (\(g\)) class, and half belong to the (\(y\)) class and, hence, are saved in two folders named (\(g\)) and (\(y\)), respectively. Out of 500 images, 100 random images (50 from each folder) were extracted and saved in a separate validation folder to be used for the model evaluation. In order to complement the validation data, 20 images were randomly selected (10 from each class), and their R, G, and B values were altered using Adobe Photoshop in a way that the healthy-looking lettuce appears yellow, and the unhealthy lettuce appears green. The validation dataset now had 120 images in total. Figure 6 shows an example of the new images generated for the validation dataset. The segmentation was then performed on all 520 images in the dataset. Figure 7 shows an example of the segmented images. For the computation of the threshold values, 400 images (g and y folder) were used by following the process mentioned in Section 3.3. The R, G, and B values and their counts were computed for the foreground (lettuce foliage) of 400 segmented images in two classes, (\(g\)) and (\(y\)). The mean values of the R, G, and B channels were then computed. Each class has 200 foliage images, so for each class 3 \(\times\) 200 = 600 mean values (3 refers to 3 channels of an image) were obtained, which were automatically saved in an excel file. Out of the 600 means values for each class, 200 belong to the red channel, 200 belong to the green channel, and 200 belong to the blue channel. The threshold values (\(g_{ref}\)) and (\(y_{ref}\)) were obtained by dividing the mean values of the three channels by 200, which are given below. \[g_{ref}=[\overline{x}_{R,m},\overline{x}_{G,\ m},\overline{x}_{B,m}]=[123.4, \ 138.2,\ 19.8] \tag{27}\]  
\[y_{ref}=[\overline{x}_{R,l},\overline{x}_{G,\ l},\overline{x}_{B,l}]=[156.6, \ 155.8,\ 22.2] \tag{28}\]  
The model was validated using a validation dataset comprising 120 different segmented images belonging to two classes, (\(g\)) and (\(y\)). The mean values of the three channels were computed for each image and were inserted into Equations (27) and (28) in place of (\(x_{R}\)), (\(x_{G}\)), and (\(x_{B}\)), along with the reference values (\(g\)) and (\(y\)) computed above.