Agricultura 12: No 1-2:17-22 (2015) Copyright 2015 by University of Maribor DE GRUYTER OPEN G The accuracy of the germination rate of seeds based on image processing and artificial neural networks Uroš ŠKRUBEJa, Črtomir ROZMANb and Denis STAJNKOb* aLokovica 8a, SI-3325 Šoštanj, Slovenia bUniversity of Maribor, Faculty of Agriculture and Life Sciences, SI-2311 Hoče, Slovenia ABSTRACT This paper describes a computer vision system based on image processing and machine learning techniques which was implemented for automatic assessment of the tomato seed germination rate. The entire system was built using open source applications ImageJ, Weka and their public Java classes and linked by our specially developed code. After object detection, we applied artificial neural networks (ANN), which was able to correctly classify 95.44% of germinated seeds of tomato (Solanum lycopersicum L.). Key words: image processing, artificial neural networks, seeds, tomato INTRODUCTION As one of the most important input in agriculture a quality seed is a basis for higher agricultural productivity and a key to economic growth. A number of methods for seed quality evaluation and sorting have been developed so far, mainly based on the detection of various physical and chemical properties which correlate well with certain vigour and germination parameters (McDonald 1998). Nowadays, seed testing is performed in accredited laboratories by trained human analysts. The tests are designed to evaluate the quality of the seed lot. Several tests are done. For instance, a germination test determines the maximum germination potential, or viability of the seed. The germination rate of a particular seed lot is a key indicator which shows the seed performances in the field and it is expressed as a percentage (for example a 90% germination rate means 90 out of 100 seeds are likely to germinate under proper growing conditions). This information is important for calculating optimal seeding rates and to determine whether a particular seed lot has the potential to produce a quality crop. Since the manual counting is time-consuming and labour intensive process, we are looking at ways we can improve the process efficiency. We have been examining ways of automating a task by means of computer vision systems, based on image processing and machine learning. This can provide an alternative to manual counting and inspection of seed samples. Image analysis was introduced in the field of seed technology already by Howarth and Stanwood (1994) who have developed a colour image database to characterize the phenotypic variation of genetic resources. Image processing also provided precise results in the field of seed identification or classification (Uchigasaki et al. 2000, Granitto et al. 2002) and germination assessment (McDonald et al. 1998). Dell'Aquila et al. (2000) used image analysis to characterize the imbibition of white cabbage seeds, while Geneve and Kester (2001) evaluated seeding size after germination by computer-aided analysis of digital images from a scanner (Ducournau et al. 2004). Urena et al. (2001) proposed a machine vision system which used automated data gathering process and a fuzzy logic-based system for automatic evaluation of germination quality. Ducournau et al. (2004) presented a machine vision system *Correspondence to: E-mail: denis.stajnko@um.si designed to count the number of emergent radicle tips on seed lots under controlled lighting, temperature and hygrometric conditions. The automated acquisition system employed an algorithm that was able to count the germinated seeds and provided the mean germination time based on the difference between two consecutive pictures. Modern computer vision mainly based on image processing procedures such as proprietary software MATLAB or other specialized expensive software. In our work a free image processing and analysis program named ImageJ was used, which is readily available, open source and public domain software developed at the National Institutes of Health (NIH), Bethesda, Maryland USA (Rasband 2012). MATERIALS AND METHODS Tomato seeds (Solanum lycopersicum L.) variety 'Marmande', were obtained from the seed company Semenarna Ljubljana d.d. Slovenia. Before the experiment, the uncovered seeds were stored for a month in an incubator at 4 C°, 50% relative humidity to equilibrate to an identical seed moisture condition. Then we randomly chose 700 seeds from 3 bags as the sample. Next, we placed a dark filter paper inside twenty-eight glass Petri dishes (90x98x18mm) and moistened each with 3ml distilled water. The dark filter paper was used to obtain optimal contrast between seed, radicle and filter paper. Twenty-five seeds were placed on top of the wet filter paper in each dish and spaced them evenly. We put covers on the dishes. The seeds were germinated under a controlled condition and maintained in the dark at 20 to 30 °C (±1 °C) and 75% relative humidity for seven days in a Jacobsen incubator. The seeds were illuminated for 8 hours in every 24 hour period. Light was provided by a cool white fluorescent source of 750 lux. Images were captured by a Nikon D80 digital SLR camera with Sigma 18 - 200mm zoom lens. The camera was mounted on a stand with an easy vertical movement, which provided rigid stable support. The camera was set at a distance 450 mm. The images were obtained by 3872x2592 pixels, horizontal resolution 300 dpi, vertical resolution 300 dpi and a bit depth 24. We placed a warm white, 22 W fluorescent tube with a 210 mm diameter circular lamp with a rated voltage of 220 V around the Petri dish with a seeds sample. A light diffuser, a semi-spherical steel bowl of 270 mm diameter, covered the light bulb, prevented external influences and provided diffused light (Figure 1). All images were transferred from the digital camera to a personal computer PC (dual-core microprocessor Intel Pentium B950 2.10 GHz, 4 GB installed memory RAM) via universal serial bus (USB) cable. Images processing The ImageJ software was used for image processing and extracting features from original RGB images (Figure 2a). First, we cut off the frame from each RGB image to establish the correct region of interest (ROI) in the centre of each image by using the known radius, so the cropped image was received (Figure 2b).The cropping process reduced the size of the images so all the following manipulations were more efficient. In our study the original matrix of 3872x2592 pixels was reduced to 1854x1836 pixels. In the second step a Gaussian filter with sigma parameter ff set at 2 was used for smoothing the image. This filter used a convolution with a Gaussian function (Eq. 1) described by Rasband (2008): Fig. 1: Proposed computer vision system (1) where X is the intensity of pixel, ¡x is a mean,a is the standard deviation,