Development of a machine vision system for weedy rice seed identification - Ruslan, Rashidah (2021)
Weedy rice contamination in certified rice seed has a dramatic impact on the rice seed industry in Malaysia. To ensure the purity of the certified seed, the authorized agency (Department of Agriculture) made a manual inspection of the rice seed samples. The task is laborious and time-consuming as well as very subjective and error-prone as it is influenced by the skills and experience of the operators in identifying the weedy rice seeds within the cultivated rice seed samples. High similarities between weedy rice morphological features and cultivated rice seed make it more challenging to separate the weedy rice effectively. Therefore, this study was formulated to explore the possibility of automating the manual process of distinguishing the weedy rice using a machine vision and machine learning technique. A machine vision prototype (Patent ID: PI2018500018) works as a platform to replace the human vision in identifying the weedy rice seed was developed. The hardware structure configuration includes selecting a suitable imaging system with uniform lighting and designing the seed plate and body case prototype. The finalized prototype was installed with a moving camera attached to the front light and equipped with imaging and features extraction software. Five cultivated rice seeds varieties and weedy rice variants were collected from the Seed Testing Laboratory. The monochrome and RGB images of the seed kernel were acquired using the prototype for classification model development. Each images is comprised of 15 rice seeds acquired on a seed plate. In total, 895 weedy rice and 7350 cultivated rice seed kernels were used. Ninety-four features were extracted from the morphological, colour and textural parameters. Features optimisation was done based on Stepwise Discriminant Analysis (SDA) and Principal Component Analysis (PCA) approaches. The PCA uses features selected from the correlation loading’s observation and PCs with the explained variances greater than 10%. The optimised features from the two types of input image were fed to seven machine learning classifiers and trained using a cross-validation technique using single-parameter (RGB Morph, RGB Colour, RGB Texture, Mono Morph, Mono Grey, Mono Texture), and three-parameter-sets (RGB MCT, Mono MGT, RGB Mono MCGT). The models were trained using ML classifiers such as Decision Trees (DT), Discriminant Analysis (DA), Naïve Bayes (NB), K-Nearest Neighbour (KNN), Support Vector Machines (SVM), Ensemble Classifier (EC), and Logistic Regression (LR). The results revealed SDA has a high percentage of features reduction than the CL plot for the single-parameter-set and a low percentage of features reduction for the three-parameters-set. Furthermore, the SDA had higher classification performance among other optimisation methods. For classification performance, RGB MCT dataset (combination of morphology, colour and textural features from RGB images) modeled by the SVM classifier had the best classification accuracy and average correct classification of 98.1% and 93%, respectively. The RGB MCT model used nine morphology, 22 colour, and 12 texture features. The model was proven to achieve high sensitivity (97.4% to 99.8%) and specificity (97.5% to 100%) when tested using different seeds samples. In conclusion, this study contributed to the development of a complete laboratory-scaled machine vision equipped with the classification model using optimised morphology, colour and texture features.