4 RESULT AND DISCUSSION
To compare the performance of the SVM classifier
with a neural network classifier, we built a GRNN
classifier (Agustin and Oh, 2007). Optimal
Parameters for SVM and Kernel Function Selection
The best way to find these parameter values is to do
an exhaustive grid search. An survey has been
published in (Chang and Lin, 2001) and
recommending the RBF kernel in SVM. We
evaluated varies kernel functions and the results are
summarized in the Table 1 showing parameters and
kernel function that will give maximum accuracy for
milled rice classification.
Table 1: Optimal parameter for leading to highest
classification accuracy in SVC with different kernels.
Kernel Penalt
(C)
amma r De
ree(d) Accurac
(%)
Linear 32 0.00781250 NA NA 93.13
Polynomial NA NA 25 4 93.13
RBF 32768 0.00781250 NA NA 93.38
Sigmoid 32768 0.00195313 0
A 92.95
4.1 Data and Features Set
The dataset given in Table 2 is composed of 4,979
training instances and 2,011 test instances. Milled
rice categories contain an equal number of instances.
The features are scaled in the range {-1, 1} to
prevent attributes with larger values to dominate
smaller ones. Similar scaling factor is applied to
testing data. Numeric values were assigned to
different classes.
Table 2: Training and test data used for SVC and GRNN
classifiers.
Categories Samples Training Test
Damaged 1165 826 339
Good 1165 827 338
Paddy(Palay) 1165 814 351
Chalky 1165 850 315
Discolored 1165 831 334
Red Kernel 1165 831 334
Total: 6990 4979 2011
Figure 3 presents images of the extracted milled rice
grains from the image sample as input data to stage
2 (see the rice evaluation framework in Figure 1).
Six geometric features and 24 colour features are
then extracted for each rice kernel images. Shape
descriptors such as area, perimeter, major axis,
minor axis, feret diameter, and roundness define the
geometric features while the mean, median, range,
and standard deviation of each kernel images
Figure 3: Extracted colour rice blobs ready for features
extraction.
in RGB and Cielab colour spaces having a total of
24 colour features.
We used thirty seven rice images (1407×1776
pixels, 24-bit bitmap format) as the source of our
real dataset in evaluating the performance of the
regression and classification models. The images
contain milled rice kernels of different defectives
types whose sample weight varies between 0.5
grams to 10.0 grams. For background segmentation,
we use the optimal color range in scaled Cielab
space {255, 165, 255} to delete background pixels
but we also use other ranges (e.g., {255, 160, 255}
and {255, 170, 255}) to test the or SVM regression
and classification model when the filter ranges
deviated from the optimal threshold.
4.2 Regression
Table 3 shows various results of weight estimation.
For SVR, we obtain an MSE, MAE, and correlation
coefficient of 78.35x10
-3
, 0.206 and 0.9943,
respectively.
Table 3: Weight estimation result between SVR and LR
using different parameters for background segmentation.
Defectives
ACTUAL LR/160 SVR/160 LR/165 SVR/165 LR/170 SVR/170
Chalky 5.23 5.68 5.65 5.79 5.76 5.90 5.87
Good 16.22 16.22 16.08 16.46 16.31 16.68 16.53
Immature 23.54 27.17 26.99 27.64 27.46 28.09 27.90
Red 50.02 49.65 49.23 51.16 50.72 52.12 51.66
yellow 64.08 66.10 65.57 67.28 66.73 68.31 67.74
Threshold values used in background subtraction are 160, 165 and 170
Note: All units are in grams, LR - Linear Regression, SVR - Support Vector Regression
LR, on the other hand, resulted to an MSE,
MAE, and correlation coefficient, of 87.64x10
-3
,
0.220 and 0.9945, respectively. Based on these
results, SVR slightly outperforms LR. There is one
excellent characteristic of SVR which makes it a
desirable approach for milled rice weight estimation.
The deviation of the prediction error is lesser than
LR when the threshold value used in background
segmentation deviates from the optimal value.
WEIGHT ESTIMATION AND CLASSIFICATION OF MILLED RICE USING SUPPORT VECTOR MACHINES
379