عنوان مقاله [English]
Among the essential nutrients, nitrogen is the most important element for plant growth, flowering and fruiting . One of the results of nitrogen deficiency is lack of chlorophyll formation in leaves, while its high consumption, in addition to increasing nitrate accumulation, reduces the amount of vitamin C.
Managing the use of nitrogen fertilizers should be considered by researchers and farmers. The average uptake of this fertilizer is estimated at only 33% and 67% of it is extracted from the soil and pollutes surface and groundwater [2-3]. Swamps and ecosystems are very sensitive to the indiscriminate use of nitrate fertilizers. And this causes severe and sudden changes in them. Excessive consumption of nitrogen causes a decline in yield and exacerbates many diseases and pests of the plant.
Recently, hyperspectral imaging has been introduced as a useful technique for detection of internal and external features of products [4-7]. Hyperspectral imaging is a combination of vision imaging and spectroscopy techniques to obtain spectral and spatial information of an object. The spatial information is important to achieve the goal of the detection system, the spectral imaging method has more advantages than near-visible-infrared spectroscopy which just relies on single-point measurement. In order to use spectral information to analyze the physical or chemical properties of products, the entire surface must be evaluated to achieve a complete diagnosis. The hyperspectral imaging method meets these needs and has been applied for detection of contaminants, diseases, and defects in various biological products.
Lu et al.  considered individual wavelength as an independent classifier and used receiver operating curve (ROC) analysis to select the best classifiers based on their performance. Dhaka et al.  used the convolutional neural network (CNN) to identify nitrogen deficiency in maize in three growth stages. 384 hyperspectral images were generated. The results showed that the plant growth stage was an influential factor. Ghosal et al.  used a relatively simple CNN for classification of soybean leaf into classes including food deficiency (potassium and iron), herbicide-damaged, and healthy leaves; CNN classification had an accuracy of 94%. Yu et al.  investigated on detection of heavy metal stress of mercury in tobacco using hyperspectral and machine learning methods. The appearance and texture of the tobacco plant were examined. Partial least squares discrimination analysis and support vector machine were used to estimate the status of mercury-stressed tobacco plants. The performance of these models was evaluated using confusion matrices and ROC. The results revealed that hyperspectral imaging combined with machine learning methods has a powerful potential to differentiate tobacco under pressure by the heavy metal mercury. Jarolmasjed et al  recognized bitter pit of apples using spectroscopic imaging. Their method was able to classify apples with accuracy of 85%. Imer et al.  studied on detection hollow heart in potatoes using hyperspectral imaging.
Reliable diagnosis of the nutritional status of agricultural products is an essential part of farm management , since both excess and deficiencies of nutrient can cause severe damage and reduced yields. Here, attempts were made to identify nitrogen-rich cucumbers using three different multi- layer perceptron neural network (MLP) and hybrid neural network-cultural (ANN-CA) algorithms and support vector machine.
To prepare samples of cucumber fruits with excess and standard nitrogen, cucumber seeds, Super Arshiya’F1 cultivar, were planted in 16 pots. All pots received the same inputs and fertilizers as needed until the plants grew and the fruit emerged. Excess nitrogen by 30%, 60% and 90% was then added to 12 pots (each class includes 4 pots). Hyperspectral images of each class were taken in two stages i.e. the day before the application of excess fertilizer and 10 days after it.
Hardware system used to extract spectral-spatial characteristics in each individual wavelength, included LabTop (Intel Corei5, 2430M at 2.40GHz, 4GB of RAM, Windows 10), hyperspectral camera (Imantajhiz Co., Iran; www.hyperspectralimaging.ir) in the range of 400 to 1100 nm, two tungsten halogen lamps (SLI-CAL (StellarNet, USA)) and a lighting chamber to omit ambient light.
2.2. Classification algorithms of Cucumber fruit based on nitrogen content
2.2.1. Classifier hybrid artificial neural network -cultural algorithm (ANN-CA)
The cultural algorithm is based on the rules of cultural evolution that contains the knowledge, traditions, beliefs and ethics of member of society. The work space of algorithm includes 2 sections namely population and cultural space. Population space searches candidature solutions while cultural space is the knowledge-based space that obtained data is stored and accessible to the current generation. A linkage is used to link two spaces for interaction and exchange the information. In fact, the method is that parameters are selected in the form of a vector by the cultural algorithm and fed to the artificial neural network. The squared mean error is used to examine the performance of network after each proposed structure. The input and output of artificial neural network are spectral data and cucumber classes. At the end, the structure with least mean square error is introduced as the selected structure by the cultural algorithm. The involved parameters are number of layers and neurons, transfer function, back- propagation network training and back propagation weight / bias learning function.
After selection of optimal structure, 200 replications were done to evaluate the validity of the artificial neural network. For each replication, 60% of the data were randomly selected for training, 10% for validation and 30% for artificial neural network testing.
2.2.2. Multilayer perceptron neural network classifier
There are various adjustable parameters in the artificial neural network that ensure their high performance by optimally adjusting them. In this study, using trial and error, the structure of multilayer perceptron neural network was selected.
2.2.3. Support vector machine classifier
Support vector machines (SVMs) are a kind of supervised learning methods based on the linear classification of data. In the linear division of data, an attempt is made to select a line that has a more reliable margin. Finding the optimal line for data is done by QP methods, which are known methods for solving constrained problems. Before linear division, the data is taken to a much larger space by the phi function. In order to solve the problem of very high dimensions using these methods, the Lagrange double theorem is used.
The hybrid neural network-cultural (ANN-CA) algorithm has been more successful than the MLP and SVM methods. The accuracy of the class1 (normal fertilizer) and class4 (excess nitrogen by 90%) is highest in ANN-CA and MLP methods, which indicates that the results of both classes are closer to the actual value of that class. The precision value of the first and fourth class is also the highest, which means that the standard deviation was less. The high value related to recall criteria of class 1 and class 4 indicates that the classifier was more capable of correctly distinguishing cucumbers with normal and excess nitrogen by 60%. On the other hand, the specificity of class 1 and class 4 are more than others, which indicates the ability of the classifier to correctly identify the sample. Better results in class1 and class4 is an expected and logical result because it is easier to identify these two classes than class2 and class3. Overall, according to the table, it can be concluded that ANN-CA and MLP methods were able to classify cucumbers in terms of nitrogen content, but SVM results are not acceptable.
In all classes, box plots relater to class1 and class4 are more compact, indicating the higher ability of algorithm to identify cucumbers related to these classes.