## 2 Materials and Methods
### Smart Phone Application  
The smart phone application that implements the plant disease method described in the previous section was initially developed for Windows phone platforms and is currently ported to Android and iOS. The basic pages in the Windows phone implementation are shown in Figure 6. In Figure 6a, the main application page is displayed where the user can select a stored photograph of the plant part to be tested. The selection of the appropriate BSM or SSM is performed in this page by altering the corresponding thresholds \(B_{g}\) and \(T_{h}\) (SSM1), or by selecting directly SSM2 or SSM3 (through a combination of the \"Manual\" and \"Altern\" check boxes). The \"Min Spot Area\" field defines the minimum number of pixels per spot. Spots that consist of a smaller number of pixels are considered noise and are neglected. The image analysis takes place and an image with four levels of gray appears showing the background in white, the normal leaf (or plant part in general) in gray and the spots in black color (Figure 6b). The halo around the spots is also displayed with white color. The user can interactively switch between the initial color and the resulting gray image to adjust the \(B_{g}\) andthresholds for higher segmentation precision. An unsuccessful spot segmentation is not difficult to be recognized even by an inexperienced user as was shown with the examples of Figures 3 and 4.  
Figure 6: Application pages. The main page before image analysis (**a**), the main page after image analysis (**b**), spot histograms (**c**), leaf histograms (**d**), halo histograms (**e**), histogram feature extraction results (**f**), selection of the plant (**g**) and the plant part (**h**), additional information (**i**), geolocation (**j**), retrieval of weather data (**k**) and disease classification results (**l**).  
The draft color histograms of the spots, the normal leaf and the halo can be viewed in real-time as shown in Figure 6c-e, respectively. At the bottom of these pages, estimated features values (e.g., \(N_{s}\), \(A_{s}\), \(G_{s}\), \(G_{l}\)) are displayed. In administration mode, the page of Figure 6f is displayed with all the histogram features (begin, end, peak). These feature values are required for the definition of new disease signatures. In user mode, all the information displayed in Figure 6c-f can be hidden.  
The pages where the plant type and part is selected are shown in Figure 6g,h, respectively. Different disease signatures have to be defined for each (plant type, plant part) pair. In Figure 6i, additional information can be given by the user that could improve the diagnosis accuracy. This information can include the plant variety, draft descriptions about the number of plants and the portion of one plant that has been infected, how long ago the first symptoms noticed, etc. The next application page (Figure 6j) allows the user to select the geolocation of the plant. This is used in order to retrieve publicly available weather metadata for this location from pages like the one offered by OpenWeather [29]. The user can arbitrarily select specific dates in the page shown in Figure 6k. The weather data retrieved for the selected dates are used to estimate the average temperature and moisture features \(T_{n}\), \(T_{x}\), \(M_{d}\) of Table 1. For example, if three dates are defined by the user, the \(T_{n}\) is the average of the three minimum temperatures measured on these dates. The last page shown in Figure 6l lists the three diseases that achieved the highest score (see Equation (7)) by the plant disease classification method explained in the previous section.