This action might not be possible to undo. Are you sure you want to continue?

1007/s11694-012-9129-9

ORIGINAL PAPER

**Classiﬁcation of dates varieties and effect of motion blurring on standardized moment features
**

Gabriel Thomas • A. Manickavasagan R. Al-Yahyai

•

Received: 30 July 2012 / Accepted: 11 October 2012 Ó Springer Science+Business Media New York 2012

Abstract Computer vision technology has been used as a successful non-destructive quality assessment tool for various food products. In general, several features are extracted from the images of interest, and used for the classiﬁcation models. Furthermore, in most of the studies, static images have been used in the calibration and evaluation models. Classiﬁcation models with a reduced number of features, and a mechanism to test the capability of the algorithm for moving objects by means of simulating the blurring effect on the static images would be beneﬁcial to determine the performance of the system in real-time quality monitoring in industries. Using three date varieties as model food, motion was simulated for the date’s images and a successful neural network classiﬁer was designed with only three statistical features (mean, standard deviation, and skewness). The reduced number of features and simplicity of the classiﬁer yielded a solution that can be potentially implemented in hardware fast enough so that to consider the case of classiﬁcation of the dates in a conveyor

belt. To test the solution under such conditions, a blurring degradation function was used to verify that the classiﬁer would work. The effects that motion blurring causes to these statistical moments in a general sense were examined using random numbers drawn from the distribution in the Pearson system. Because motion blurring showed a tendency to change the distribution to a Gaussian density, the same features and classiﬁer yielded similar results despite of motion. Keywords Classiﬁcation Á Neural network Á Bayes classiﬁer Á Pearson random numbers Á Statistical moment Á Image motion

Introduction In computer vision (CV) technology, objects are imaged and analyzed to characterize their quality. This technique has great potential to be used as a non-destructive and objective quality measurement method. It is a reliable technique for the measurement of various quality attributes of agricultural and food products [1–4]. Attribute characterization using images taken while the objects are at static could be implemented at quality control laboratories. However, the efﬁciency of the developed classiﬁcation models for the objects moving on a conveyor at various speeds would be highly beneﬁcial to determine their ability for online quality monitoring in the real-time production facilities in food industries. Therefore the objective of this study was to determine the classiﬁcation effects caused by simulated motion of date varieties with three grayscale features at static and motion blurred conditions. Motion was simulated via low pass ﬁltering which system response is usually calculated in order to eliminate motion bluring

G. Thomas (&) Department Electrical and Computer Engineering, Faculty of Engineering, University of Manitoba, E3-555 Engineering and Information Technology Complex, Winnipeg, MB R3T5V6, Canada e-mail: Gabriel.Thomas@ad.umanitoba.ca; thomasg@cc.umanitoba.ca A. Manickavasagan Department of Soils, Water and Agricultural Engineering, College of Agricultural and Marine Sciences, Sultan Qaboos University, P.O. Box 34, 123 Al-Khoud, Sultanate of Oman R. Al-Yahyai Department of Crop Science, College of Agricultural and Marine Sciences, Sultan Qaboos University, P.O. Box 34, 123 Al-Khoud, Sultanate of Oman

123

G. Thomas et al.

using deconvolution techniques. Different methods propose alternative models for the low pass impulse response of the system and the expression that corresponds to linear motion in one direction as deﬁned in [12] is used here; a conveyor belt motion scenario reduces the model to this case only. Dates are used as model images and this technique can be used as such in other products. Date is an important commodity in Oman, and around 50 % of the cultivable lands are under date palm vegetation. Although annual production of dates in Oman is 255,891 Mt, only 9,000 Mt (2.5–3.5 % of production) is exported due to various reasons [5]. Quality assurance has always been a major problem for Omani dates to compete in international markets [6]. Varietal purity, color, uniformity of size, and absence of defects are some of the important quality parameters for dates in domestic and international market. Generally, manual grading of dates is followed in handling and processing facilities to identify date varieties. This method has many constraints such as subjectivity, inﬂuence of mental stress, inﬂuence of environment, efﬁciency of individuals at various times of the shift, and so on. An automated variety identiﬁcation method using CV technique would be beneﬁcial to the date industries in Oman which would correspond to a ﬁrst step to assess the quality by avoiding contamination from different varieties. Materials and methods Image acquisition Three date varieties namely Khalas, Fard, and Madina were used in this study. Samples for each variety were obtained from at least three shops in Oman, and the varietal purity was conﬁrmed by a ‘‘date variety expert’’ at Sultan Qaboos University. A conglomerate sample of 108 dates was taken for each variety (n = 108 for each variety) and the sample was imaged (single date images) with a color camera (model: D3, Nikon, Japan, Resolution—4,256 9 2,832 pixels). The date samples were illuminated with halogen lamp (Visa tech, model SOLO 1600B) during imaging. Then all images were converted into gray scale images using Matlab software, and analyzed. Feature selection As the background of these images was deemed to have little information regarding the classiﬁcation of each date, a thresholding operation was done in order to eliminate it based on the maximization of the between-class variance. The method is well known as Otsu’s method [7] and it is brieﬂy described next.

Starting by considering an image with background class deﬁned as wb, and object in class wo, with probabilities P P Pðwb Þ ¼ À TÀ1 f ðzi Þ and Pðwo Þ ¼ À L f ðzi Þ where i¼1 i¼T z denotes discrete image intensity, f(zi), i = 1, 2, …, L is the corresponding histogram normalized to have area equal to one, and L is the number of distinct intensity levels; the threshold T is found by maximizing r2 ðT Þ ¼ P B pðwb Þðlb À ltot Þ2 þ pðwo À ltot Þ2 where lb ¼ TÀ1 zi f ðzi Þ, i¼1 P P lo ¼ L zi f ðzi Þ and ltot ¼ L zi f ðzi Þ. T i¼1 Statistical features in the form of standardized moments were to be considered [8]: cn ¼ ln E½z À mn ¼ rn rn ð1Þ

where E is the expected value, r the standard deviation and ln is the nth moment about the mean. For n = 3 one can ﬁnd skewness that measures the asymmetry of the probability density function of the random variable associated to the image values. For n = 4 the value is known as kurtosis which also evaluates the shape of a distribution by quantifying its peakness. Because processing speed was important, out of the mean, standard deviation, skewness, and kurtosis, we decided to work with only three of them which would eliminate approximately 25 % of the computations. Then, for feature evaluation, a selection scheme with a backward sequential search starting with a full feature set and sequentially removing features was considered to be a practical solution for the decision of what features to work with. We decided to use a new feature selection scheme that is based on fuzzy entropy measures with a similarity classiﬁer as presented by Luukka [9], which is brieﬂy described next. The method starts by forming an ideal vector vi = (v1(f1), …, vi(ft)) that represents the class I as good as possible by calculating the mean values of available vectors in each class vi(fi) for i = 1, 2, …, t features. Afterwards, the similarities Shx; vi between the sample x to be classiﬁed and the ideal vectors v need to be calculated as: Shx; vi ¼

t 1X ð1 À jxðfr Þ À vðfr ÞjÞ t r¼1

ð2Þ

In order to calculate the relevance of the features, fuzzy À Á entropy values are calculated with similarity values lA xj as suggested by DeLuca and Termini [10]: À Á À Á n X lA Àxj Álog lÀ xj þ À ÁÁ À Á A H 1 ð AÞ ¼ À ð3Þ 1 À lA xj log 1 À lA xj j¼1 where low entropy indicates high similarity values and high entropy values are obtained otherwise.

123

Dates varieties and effect of motion blurring

Similarly, fuzzy entropy as suggested by Parkash et al. [11] was used in this work which follows the expression: À Á À À ÁÁ n X plA xj p 1 À l A xj þ sin À1 H 2 ð AÞ ¼ À sin 2 2 j¼1 ð4Þ Effect of motion To validate the use of the classiﬁer in motion conditions, a simulation was conducted where the blurring degradation caused by motion in one direction was implemented in the frequency domain as [12]: H ðu; vÞ ¼ Te sin ðpuaÞeÀjpua pua ð5Þ

Fig. 1 Gray scale images of date samples (ﬁrst row Fard, second row Khalas, third row Madina)

where u and v are normalized frequency samples, Te is the camera exposure time, and a is the rate of movement in the x axis direction: xo(t) = at/T. When t = T the image has been displaced by a total distance a.

120

Khalas (blue) Fard (green) Madina (red)

Mean

**Results and discussion
**

Value

110 100 90 80 70 60 0 20 40 60 80 100

Evaluation of features Figure 1 illustrates three samples of each variety of dates. The standardized moments were calculated only within the pixels located within the date and not the background and were computed for one date image at a time. From the small image sample, it can be inferred that features such as the mean value would work for the class Fard, since they look darker than the other two classes. Figure 2 shows the mean values m for 108 images of each class calculated with the expression mean m = ltot. Note how in Fig. 2 the values for class Fard do appear darker and dissimilar than the other two. We tested the four features (mean, standard deviation, skewness, and kurtosis) and evaluated them according to Eqs. (3) and (4). The selection process consistently eliminated the values of kurtosis. With this result, the next section elaborates on the design of the classiﬁer using only the mean, standard deviation, and skewness as inputs. Classiﬁer selection and classiﬁcation results As described in the previous section, three features were to be used in the ﬁnal classiﬁer. Figure 3 shows a scatter plot of the features and albeit three clusters are visible, there is still some overlapping. A Lillilifors test [13] of the default null hypothesis that the values of the different features come from a Gaussian distribution passed the test conﬁrming the Gaussianity of the clusters. Afterwards, a Bayes

Sample Index

Fig. 2 Average gray level values of date samples

classiﬁer for Gaussian pattern classes under the condition of a 0–1 loss function was implemented forming three decision functions dj(x) for j = 1, 2, 3 of the form [12]: À Á dj ðxÞ ¼ ln P wj hÀ ð1=2ÞlnCj À ÁT À Ái À ð1=2Þ x À mj CÀ1 x À mj ð6Þ j where mj = Ej{x} are the means of the feature grouped in vector x, and Cj = Ej{(x2mj)(x2mj)T}. This classiﬁer was tested using 80 samples for training and 28 samples for testing. A 65.48 % of correct classiﬁcations were obtained this way, and in particular there were only two misclassiﬁcation for the class Madina yielding a 92.86 % of accuracy for this variety. When kurtosis was used instead of skewness, a performance of 35.71 % was obtained. This conﬁrmed that the selection made by Luukka’s approach was correct.

123

G. Thomas et al.

0.8 0.6

Khalas Madina Fard

MSE

0.4 0.2

Train Test

skewness

2 0 -2 35 30 25 80 100 120

0

0

5

10

15

20

25

Epoch

mean

standard deviation 20

15

60

Fig. 4 Mean squared error (MSE) using a two layer neural network with ﬁve hidden neurons. Matlab deﬁnes MSE as the measurement of the network’s performance according to the mean of squared classiﬁcation errors

Fig. 3 Sctatter plot of the selected features for date samples

Table 1 Mean squared error (MSE) obtained while using a two layer neural network with different number of hidden neurons No. of neurons n=3 MSE (%) Time (s) 12.73 1.0915 n=5 11.04 1.0130 n = 10 12.27 1.0031 n = 15 13.62 1.0441 n = 20 13.79 1.0711

than 0.025 s using an Asus Ee Slate tablet computer with an Intel i5 1.33 GHz processor and 4 GB of RAM memory. At this point the speciﬁed classiﬁcation efﬁciency of more than 90 % was achieved with a simple neural network architecture to allow the option of a future implementation in hardware rather than in a computer based software solution. Thus, the solution was considered to be fast enough to actually be implemented in a scenario where a conveyor belt with continuous motion could be used. Effect of motion

At this point, a two layer neural network was used with hyperbolic tangent sigmoid transfer functions using Matlab as the software platform for development. The training algorithm used was the scaled conjugate gradient. In order to deﬁne the number of hidden neurons N, neural networks were trained 30 times with different numbers of hidden neurons. The initial weights are calculated randomly by Matlab and these averages would give an idea of the best number of hidden neurons to be used. Because only three features are used, the expectation was that the network would not need many neurons. Table 1 shows the average results after training the different networks 30 times with respect to mean squared error (MSE) as well as time required for training. Because of the small numbers of neurons used, the training time was very short for all of them. From these results, it was decided that the number of hidden neurons to use was ﬁve, not only because it had the minimum MSE value in Table 1 but also because of the computational savings of not having to compute more multiplications once the network had to perform classiﬁcations. Figure 4 shows the performance obtained using such a network. The total number of epochs needed was 23, for each class 65 out of 108 images were used for training, best performance was obtained with MSE values of 3.81 % for testing, 9.7 % for training and a needed training time of 0.78 s. Once trained, classiﬁcations were performed in less

Figure 5 shows blurring simulated using Eq. (5) for a = 20 for the images shown in Fig. 1. Because a bright illumination set up was contemplated so that to eliminate any possible shadows of the dates in bulk, faster shutting camera times are expected and the blurring in Fig. 5 was considered an extreme case. In order to have an idea of the effects this blurring will cause to the features, 5,000 images of size 256 9 256 formed by random numbers drawn from the distribution in the Pearson system with speciﬁed l, r, c3, and c4, were generated and blurred for different values of a. Figure 6 shows how these features changed as the blurring progresses. As the degradation function in (5) is a low pass ﬁlter, blurring can be seen as a weighted averaging and no changes in mean values are expected. The slight changes in Fig. 6a correspond to the darkening of the beginning and ﬁnal values of the blurred images caused by discrete implementation of the ﬁlter that viewed in the discrete time domain, convolution values have this windowing effects. The standard deviation is reduced as expected after low pass ﬁltering and skewness tend to go to zero, making the samples more Gaussian as what we would see by averaging random samples and explained by the central limit theorem. We used these features using Bayes classiﬁers in order to identify the image blurring effects on classiﬁcation.

123

**Dates varieties and effect of motion blurring
**

0.7 0.65

correct classification

0.6 0.55 0.5 0.45 0.4 0.35 0 5 10 15 20 kurtosis skewness

motion rate a

Fig. 7 Bayes classiﬁer results for different motion rates Fig. 5 Motion blurred images of date samples (ﬁrst row Fard, second row Khalas, third row Madina)

0.45 0.4 0.35 0.3 a=4.8495 a=9.899 a=14.9495 a=20

(a)

mean

129 128 127 126

MSE

0 5 10 15 20

0.25 0.2 0.15 0.1

(b)

standard deviation

6 4 2 0

0.05 0 0 10 20 30 40 50 60

Epoch

Fig. 8 Mean squared error (MSE) obtained while using a two layer neural network with blurred images (results of test images)

0 5 10 15 20

(c)

skeewnes

0.1

0.05

0

0

5

10

15

20

motion value a

Fig. 6 Results of motion blurring on selected features of date samples

Results with accuracies similar to the ones found in Pydipati [14] for detection of citrus disease were found using a simpler neural network and reduced number of features. Because of this simplicity, real time classiﬁcation under motion blurring caused by examining the dates on a conveyor belt was deemed feasibly. Thus, we developed a methodology to introduce motion via a degradation function implemented in the frequency domain to conﬁrm the robustness of the proposed method.

Acknowledgments We thank The Research Council (TRC) of Sultanate of Oman for funding this study (Project No. RC/AGR/ SWAE/11/01-Development of Computer Vision Technology for Quality Assessment of Dates in Oman).

Figure 7 shows the results when using both skewness and kurtosis. As it can be seen, motion blurring at these rates did not cause any major differences and it was further conﬁrmed that rejecting the kurtosis feature was correct as indicated by the feature selection section. Similar two layer networks as the one used in Fig. 4 were used for different values of a, and Fig. 8 shows the consistent good results.

References

1. A. Manickavasagan, G. Sathya, D.S. Jayas, N.D.G. White, J. Cereal Sci. 47, 518 (2008)

123

G. Thomas et al. 2. S. Mahesh, D.S. Jayas, J. Paliwal, N.D.G. White, Sens. Instrum. Food Qual. Saf. 5, 1 (2011) 3. M.I. Mladenov, S.M. Penchev, M.P. Dejanov, M.S. Mustafa, Sens. Instrum. Food Qual. Saf. 5, 111 (2011) 4. S.R. Delwiche, M.S. Kim, Y. Dong, Sens. Instrum. Food Qual. Saf. 5, 63 (2011) 5. FAO Statistics (2007), http://faostat.fao.org/site/342/default.aspx. Accessed 24 May 2012 6. A.S. Al-Marshudi, Tropicultura 20, 203 (2002) 7. N. Otsu, IEEE Trans. Syst. Man Cybernet. 9, 62 (1979) 8. J.F. Kenney, E.S. Keeping, Mathematics of Statistics, Pt. 1, 3rd edn (Princeton, NJ, 1962) 9. P. Luukka, Expert Syst. Appl. 38, 4600 (2011) 10. A. DeLuca, S. Termini, Inform. Cont. 20, 301 (1971) 11. O.M. Parkash, P.K. Sharma, Mahajan, Inf. Sci. 178, 2389 (2008) 12. R.C. Gonzalez, R.E. Woods, Digital Image Processing,, 2nd edn. (Prentice Hall, NJ, 2001) 13. H.W. Lilliefors, J. Am. Stat. Assoc. 62, 399 (1967) 14. R. Pydipati, T.F. Burks, W.S. Lee, Trans. ASAE 48, 2007 (2005)

123

- Phenotypic Diversity of Cultivated Mangoes in Oman
- Disinfestation of Stored Dates Using Microwave Oven
- كيف_أصبحوا_عظماء
- 3aeez_alsmo
- 3aeez_s3adh
- 3aeez_as3d_alnas
- 3aeez_mfta7_nga7
- 3aeez_al7b
- Status of Citrus Aurantifolia Infected With Witches Broom Disease Of
- 5e-07-Alyahyai_fshs05_carambola Growth Yield Krome
- 5H 08 PGR Report FAO Oman2en
- 5e-08-Monitoring Soil Water Content for Irrigation Scheduling Carambola
- 5G-07-Pages From ISHS Sept 2005 Chronica-ch4503
- 5F-01-Pages From Tayebaat Magazine
- 5B-02-An Overview of Date Palm Production-chapter1
- 5A 09 Fruitpomes FRUITS
- 5A-05--Sub-Optimal Irrigation Affects Chemical Quality Attributes of Dates During Fruit Development
- 5A-02-Milk Banana Postharvest Submit IJPTI-PROOF
- 5A-08-Molecular Characterization and Potential Sources of Tristeza Virus in Oman-j.1365-3059.2011.02553.x
- 5A-04-Euphytica 2012 Lime Genetic Diversity (2)
- 5A-07-Physical and Chemical Quality of Freeze-stored Dates
- 5A-06-Managing Irrigation of Fruit Trees Using Plant Water Status
- 14F_IJAB-11-468_097-100-Physical and Chemical Quaity Attributes of Freeze-stored Dates
- Test File

- An.pdf
- An Introduction to Neural Networks Python
- NARMA-L2 (Feedback Linearization) Control - MATLAB & Simulink - MathWorks India
- 1.1.10
- 2009__Neural Network Approach to Continuous-time Direct Adaptive Optimal Control for Partially Unknown Nonlinear Systems
- Neural Network Credit Scoring Models
- Tutorial 3 Introduction to MatlabToolbox
- Pula
- Conference Greece
- Resume
- Capitulo_6
- SUBSET SELECTION FOR LANDMARK MODERN AND HISTORIC IMAGES
- MATLAB - Programs
- Synopsis
- Gesture_recognition[1]
- ANN Simulink Examples
- neural network tutorial
- RNA_curso
- 14736
- matlab-Tifac.pdf
- 10.1016_j.chemolab.2012.07.005_neeu1
- Neural Network For The Estimation Of Ammonia Concentration In Breath Of Kidney Dialysis Patients
- 1-s2.0-S187661021200834X-main(2)
- SETAISBEXAM
- CST196.Chap12.060124
- Software Requirement Specification Document
- MATLAB by Examples_ Starting With Neural Network in Matlab
- IBM SPSS Neural Network
- Insilico Desigh of Bio-reactors
- Signal Prediction in the LOCA Using Elman Recurrent Neural Networks
- Classification of Dates Varieties and Effect of Motion Blurring

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd