Spatial and Spectral Features Utilization on a HyperSpectral Imaging System for Rice Seed Varietal Purity Inspection Hai Vu ∗ , Christos Tachtatzis † , Paul Murray † , David Harle † , Trung Kien Dao ∗ , Robert Atkinson † , Thi-Lan Le ∗ , Ivan Andonovic † , Stephen Marshall † ∗ International Research Institute MICA, Hanoi University of Science and Technology † Dept. of Electronic and Electrical Engineering, University of Strathclyde Email: hai.vu@mica.edu.vn Abstract—A conventional method to inspect the varietal purity of rice seeds is based on evaluating human visual inspection where a random sample is drawn from a batch. This is a tedious, laborious, time consuming and extremely inefficient task. This paper presents an automatic rice seed inspection method using Hyperspectral imaging and machine learning, to automatically detect unwanted seeds from other varieties which may be contained in a batch. Hyperspectral image data from Near-infrared (NIR) and Visible cameras are acquired for six common rice seed varieties. The results of applying two classifiers are presented, a Support Vector Machine (SVM) and a Random Forest (RF), where each consists of six one-versus-rest binary classifiers. The results show that combining spectral and shape- based features derived from the rice seeds, increase precision of the multi-label classification to 84% compared 74% when only visual features are used. I. I NTRODUCTION Ensuring rice seed quality is a significant challenge for the large rice export nations such as India, Thailand, US and Vietnam. Rice seed impurities can impact on the yield by introducing weeds and off-types into the crop making it susceptible to disease. The consequences are not limited to a decrease in yield but also to the grade and price of the produce. A responsibility lies with rice seed producers to ensure high quality seed and a critical procedure is the batch screening and inspection. Conventional methods to inspect seeds, as shown in Fig.1(a), rely on extracting a sample from a batch and human visual inspection. The inspection of the sample is performed visually to assess the grain properties, such as shape, length, width and size. This task is tedious, laborious, time consuming and requires trained and experienced personnel. Recently, the cost and size of Hyperspectral Imaging (HSI) Systems has reduced significantly. This technology has emerged as a useful tool in food sciences and applications. Such systems provide spatial and textural information like other traditional cameras with the added advantage that they offer high resolution spectral signatures for each pixel in the image data acquired. In this paper, we investigate the benefits of analyzing the extracted features taken from a HSI system to solve issues of rice seed varietal purity inspection. We deploy (a) Q5 BT07 BC15 KD18 N97 LL (b) Fig. 1. (a) A conventional way (human visual) to inspect purity of rice seed samples. (b) Six common rice seed varieties examined in this study. an automatic inspection method which combines hyperspectral imaging and tools from machine learning to automatically detect seeds which are erroneously contained within a batch when they actually belong to a completely different species. In this study, the purity of six common rice seed varieties, as shown in Fig.1(b), are examined. Automatic rice seed inspection systems that employ ma- chine vision addressing this challenge have been shown in pre- vious works [1]–[3]. Commonly, shape descriptors of the seed samples are extracted through image processing and vision- based approaches [1], [3], [4]. The challenge in comparing and quantifying performance between these approaches, is that each one has been evaluated on different rice seed varieties. It is therefore unclear if the differences in performance come from better feature descriptors or if this is due to varying inter- class/intra-class among the examined species. In this study, a HSI system provides both spatial and spectral information about the seed samples. Therefore, the inspection techniques that utilize both types of feature should be investigated. We formulate the purity inspection problem as six one-versus-rest binary classifiers. In this work, the binary classifiers are built using a SVM and a RF, and both approaches are compared. While the spatial features measure physical properties of rice seed, the mean spectrum of all pixels in a seed sample can be used to infer chemical properties of the species. Thanks to discriminant analysis techniques, the combinations of both features show significant benefits and potential in hyperspec- tral imaging, particularly, to develop a machine vision system for rice seed quality assessments. The remainder of paper is organized as follows. Section II briefly describes related techniques for rice and rice seed 978-1-5090-4134-3/16/$31.00 c 2016 IEEE