{'fraction_non_alphanumeric': 0.03762339355559695, 'fraction_numerical': 0.020953622648537902, 'mean_word_length': 4.440222897669706, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Investigation on the Growth of Green Bean Sprouts with Linear Discriminant Analysis

Machine vision technique is playing an increasingly important role in monitoring plant growth. The identification of good or bad status of growing plant requires specific features such as color, length, and solidity of stems. This paper addresses recognition of growing status of the green bean sprout. For preprocessing, RGB color images are converted to hue-saturationintensity (HSI) images, and then, principal component analysis (PCA) is applied to reduce the high dimensionality of image data. Finally, linear discriminant analysis (LDA) recognizes whether the growing status is good or bad. In the experiments, the images of the green bean sprouts growing in jars are acquired for 6 consecutive days. The correct classification rates are compared between PCA only process and LDA combined with PCA. The experimental results show PCA+LDA can achieve more than 93.3% average accuracy after 3 days.


Introduction
Image processing and machine vision techniques have made considerable achievements in the agricultural applications [1,2]. Distinguishing spices and scales of plants are one of the important agriculture sectors for successful farming. Distinct features such as scale, shape, color, and texture are often used to identify the species and estimate the density and scale of plants. In [3], wood species are classified by pattern recognition methods. Texture of cork tiles are recognized with neural networks in [4]. Different types of beers are classified by color information [5]. In [6], infrared imaging is used to characterize the agriculture fields. Image processing has been extended to diagnose disease of the plant [7,8].
Green bean sprouts are a culinary vegetable grown by sprouting small and round mung beans [9]. Good agriculture practices are required for successful cultivation such as good seeds, proper lighting conditions, and enough fresh water. Since they are often infected by bacteria and grow only for a week, daily monitoring of the growing status is important.
In this paper, we address recognition of growing status of the green bean sprout. First, RGB color images of plants are converted into hue-saturation-intensity (HSI) domain [10,11]. The principal component analysis (PCA) and the linear discriminant analysis (LDA) are adopted to classify well or badly growing plant areas. PCA and LDA are widely used feature extraction and classification methods in the fields of pattern recognition and computer vision [12][13][14][15][16][17][18][19][20][21][22][23]. In [12][13][14], biometric information such as face is classified with PCA. Plant growing status is identified with PCA in [15]. LDA combined with PCA is applied to classify faces in [16], and it was adopted to analyze 3D information in [17].
PCA projects input vectors onto a subspace spanned by the eigenvectors of the covariance matrix of training data [18]. The eigenvectors are called the principal components, so it maximizes the variance of data. This projection is optimal in terms of mean square error (MSE) between original and reconstructed vectors.
LDA is a classification method with linear projection into a space satisfying the Fisher criteria [18]. LDA projects vectors onto lower dimensional subspace where the ratio of determinant of between-class covariance matrix to determinant of withinclass covariance matrix is maximized. However, LDA often suffers from the singularity problem of the within-class covariance matrix [19][20][21]. This problem occurs in most practical cases, when the number of pixels is larger than the number of training images. Therefore, dimensionality reduction like PCA can be preceded to avoid the singularity problem. In [19,22,23], LDA is applied to photon-counting features, which is not involved with the singularity problem.
In this paper, PCA either classifies unknown data or extract features reducing the dimensionality of vectors. In the experiment, the images of eight jars growing green bean sprouts are captured for 6 days in a row. Four images are acquired from well growing plants and the other four are from badly growing plants. Three images are trained for each class and the other two images are tested to evaluate the classification performance. The experimental results show that PCA+LDA can achieve more than 93.3% correct classification rate after 3 days and 83.6% overall average. The paper is organized as follows: Section 2 presents the classification methods, PCA and LDA. Section 3 shows the experimental results. The conclusion follows in Section 4.

Recognition of Growing Status
The images in RGB domain are converted into images in HSI domain. The HSI color model describes a color in terms of how it is recognized by the human eye [10]. In the next subsection, PCA and LDA are discussed in terms of expectation values and their estimation. It is assumed that LDA is preceded by PCA.

Principal Component Analysis
A random vector is composed of the HSI information of the pixels as , and x I are, respectively, HSI vector of the image data, thus the dimension of each vector is the same with the number of pixels; d is the dimension of the vector x; and t denotes transpose. The mean vector and covariance matrix of x are, respectively, defined as In the eigenanalysis, the following equation is hold: where e i is the eigenvector which corresponds to eigenvalues λ i , λ 1 ≥ ... ≥ λ d ; and diag(·) denotes a diagonal matrix. The PCA projection is performed as where W P = [e 1 · · · e l ], l ≤ d is a PCA projection matrix; x u is an unknown vector; l is a reduced dimension after the PCA projection. In the experiments, l is set at the minimum number satisfying the following equation: A decision for a class is made by minimizing the Euclidean distance between unknown vector and a conditional mean vector asĵ where n c is the number of class; µ µ µ x|j is the conditional mean vector of class j, µ µ µ x|j = E x|j (x|j), thus µ µ µ x = E j (µ µ µ x|j ).
The condition and mean vectors, and the covariance matrix are conventionally estimated by the sample mean aŝ where x j (n), n = 1, ..., n j is one realization of the random vector x for class j; π j is the weight of observations of class j; n j is the number of training vectors for class j; and n t is the total number of training vectors, that is n t = nc j=1 n j .

Linear Discriminant Analysis
The Fisher LDA is a linear projection method that maximizes the ratio of determinant of between-class covariance matrix to the determinant of within-class covariance matrix. The withinclass covariance matrix measures the concentration of each class: where µ µ µ y|j = W t P µ µ µ x|j . The between-class covariance measures the separation of the classes: where µ µ µ y = W t P µ µ µ x . The Fisher criteria is as follows: where r is a reduced dimension of a vector which is the same with n c − 1 [18].
The within-class covariance matrix and the between-class covariance matrixes are, respectively, estimated as [19] where y j (n) = W t P x j (n). It is well known that Eq. (15) is equivalent with the generalized eigenvalues problem. The column vectors of W F are eigenvectors of (Σ W yy ) −1ΣB yy corresponding to non-zero eigenvalues of (Σ W yy ) −1ΣB yy . It is noted that rank(Σ W yy ) ≤ min(n t − n c , l). SinceΣ W yy is a l ×l dimensional matrix, l should be less or equal to n t − n c in order to avoid the singularity problem ofΣ W yy . In the paper, the dimensionality reduction is performed by PCA since the original dimension d is larger than the number of training data. The decision process for LDA is implemented with Euclidean distance between unknown vector and the conditional

Experimental Results
In the experiments, a jar and a water bowl are set up to grow green bean sprouts. A webcam with an illumination source is located above the jar as shown in Figure 1. Eight jars are captured for 6 consecutive days. Four jars are in a good condition for growth, but the other four jars are depleted with water or exposed to light during day time, thus sprouts in those jars become badly grown. Figure 2 shows the well growing plant (Class 1) and the badly growing plant (Class 2) images for 6 days. Each image size is 1600×1600 pixels.
Plant images are divided into non-overlapped 200×200 (Case 1) or 400×400 (Case 2) pixel windows. Pixels in each window comprise a random vector, thus 16 and 64 vectors are obtained from one image for Case 1 and Case 2, respectively. The dimension of a vector is 120,000 and 480,000 for Case 1 and Case 2, respectively, considering HSI color information. Table 1 shows the training and testing image sets used in seven different experiments. The vectors from three images are trained per each class and the other two images are tested, thus the number of training data per class (n j ) is 48 (=16×3) and 192 (=64×3) for Case 1 and Case 2, respectively. The total number of training data (n t ) is 96 and 384 for Case 1 and Case 2, respectively, since the number of class (n c ) is two.  eigenvectors corresponding to the two largest eigenvalues. One column vector is divided into of three parts: hue, saturation, and intensity.     Figure 8. The thresholding value is −23.41 accordingly. It is shown that the training and testing data are more separable in Case 2 with a larger size window. Figures 9 and 10 show the average correct classification rate over seven experiments for 6 days. Figure 9(a) and 9(b) are PCA results for Case 1 and Case 2, respectively. Figure 10(a) and 10(b) are PCA+LDA results for Case 1 and Case 2, respectively. The classification rates are more than 93.3% after 3 days when the PCA+LDA scheme is applied with 400×400 pixel windows in Figure 10(b). Table 2 shows the average classification rate over 6 days.   Table 2 shows that the best result comes from the PCA+LDA scheme with 200×200 pixel windows, which is 83.6%. Although the overall performance is better for Case 1 in PCA+LDA, Case 2 provides better or similar classification results from the 3rd day to the 6th day in Figure 10. The average classification rate for those 4 days is 92.1% for Case 2 but 90.7% for Case 1.

Conclusion
The recognition of the growing status of green bean sprouts was discussed in this paper. For the preprocessing, RGB color images are converted to HSI images. We adopt PCA and LDA for the classification of good or bad status of growing plants. The best results come from the PCA+LDA scheme with a smaller window size. This proposed method can be applied to other agriculture produce. Study for classification of other plants remains for future study.

Conflict of Interest
No potential conflict of interest relevant to this article was reported.