TMCnet News

Apple Shape Classification Method Based on Wavelet Moment [Sensors & Transducers (Canada)]
[October 22, 2014]

Apple Shape Classification Method Based on Wavelet Moment [Sensors & Transducers (Canada)]


(Sensors & Transducers (Canada) Via Acquire Media NewsEdge) Abstract: Shape is not only an important indicator for assessing the grade of the apple, but also the important factors for increasing the value of the apple. In order to improve the apple shape classification accuracy rate, an approach for apple shape sorting based on wavelet moments was proposed, the image was first subjected to a normalization process using its regular moments to obtain scale and translation invariance, the rotation invariant wavelet moment features were then extracted from the scale and translation normalized images and the method of cluster analysis was used for finished the shape classification. This method performs better than traditional approaches such as Fourier descriptors and Zemike moments, because of that Wavelet moments can provide time-domain and frequency domain window, which was verified by experiments. The normal fruit shape, mild deformity and severe deformity classification accuracy is 86.21 %, 85.82 %, 90.81 % by our method. Copyright © 2014 IFSA Publishing, S. L.



Keywords: Shape analysis, Fruit grading, Machine vision, Wavelet moment.

(ProQuest: ... denotes formulae omitted.) 1. Introduction Apple grading is one of the important processes in post harvest handling and marketing. The shape is an important indicator to assess its grade and it is also an important factor to improve its commodity value. Comparing with the traditional classification method by manual, automatic classification method based on machine vision, image processing and intelligent algorithms has pushed forward the progress of fruit grading in nearly two decades [1], However, due to the impact of natural and other complicating factors during the fruit growth, it is so difficult to uniformly describe the external shape and hard to define clearly like other general industrial products, so there is no perfect solution in fruit shape classification now [2]. At present, five common methods using machine vision technology are applied to describe fruit shape: geometry, wavelet multi-scale method, Fourier descriptors, active shape models and Zemike moments [3]. After extracting fruit shape characteristic parameters by this way, it is need to use multivariate statistical methods, support vector machines and neural networks etc. for mapping fruit Shape grade level. Xianfeng Li regarded geometrical configuration feature as one of the indicators of the multi-feature syncretism apple grading by extracting fruit shape index, geometry characteristic and round shape parameters and so on [4], Andrew put forward by using the long axis, short axis, shape factor and firmness for grape shape classification [5]. Majid Rashidi used roundness and ellipse features to distinguish normal and abnormal shapes of cantaloupe Kiwifruit [6-7]. Slamet Riyadi extracted the wavelet coefficients of papaya edge, then calculates three statistical properties (wavelet coefficients, variance and mean). Combination each other to form six characteristics as classification of papaya shape of normal and abnormal basis, and they obtained good results [8]. Abdullah M. Z [9] used Fourier descriptors to assess Carrabolla shape and multilayer neural network was used to classification and the accuracy is from 80 % to 89 %. Ingrid Paulus [10] evaluated six kinds of apple shape by using the top 12 harmonics of the Fourier transform and the coefficient of determination was 0.98. Literature used the top 15 components of the discrete Fourier transform to identify apple shapes and the classification accuracy was above 85 % [11]. Cai Jianrong proposed an apple shape classification method based on active shape models and the discriminate accuracy was 95 % [12]. During these methods, geometric parameter method was easier than others so that it was only suitable for certain types of fruit. Active shape model method required manual demarcating point so that it did not unfit for shape automatic classification. Fourier descriptors had the ability to reconstruct a complete shape, but it could only describe the overall shape of the fruit, it had no ability to describe the local details of the fruit shapes. Invariant moments, especially Zemike moments were used these years [13-15], because their orthogonal moments could describe shape information very well. But the calculation range of Zemike moments is the entire image space so that it could lead to the accumulation of errors and decreasing classification effects [16]. Therefore, this research presents an apple shape classification method based on wavelet moment. This method has translational stretching and rotational invariance which is necessary for the shape classification and due to the wavelet moments can provide the timedomain and frequency-domain window at the same time, the classification results are superior to the Fourier descriptors and Zemike moments method which are common used now.


2. Description of Image's Wavelet Moment Assuming f (x,y) is the gray-distribution function of the image. Its (p+q) order generalized moment Mpq under Cartesian coordinate system is defined as: ...

where <pPq(x,y) is the core function of the transform above. If <ppq(x,y)=xpyq, it was geometric moments of (p+q) order. In order to obtain a normalized image, the translational and retractable normalization method in literature [17] can be used. Moving the origin of coordinate to the center of the target by conversion and conversion.

...

...

fn(x,y) has invariance of translation and scaling.

Where ...

geometric moments off (x,y). a = ^ ß / , and ß is a predefined constant. fN (x,y) was transformed into the polar coordinates and was represented by fN(r,0), Mpq in polar coordinates is defined as: ...

If the two dimensional kernel function (i>pq(r, 0) is a variable separable function. <f>pq(r, 0)=gp(r)e',q9, where gp(r) is one-dimensional radial kernel function. e'iq0 is an angular component of transformed nucleus. The formula (2) can be rewritten as: ...(3) It can be proved that Characteristic value of mould \\Mpq\\ can remain the same after image rotated. Assuming ||M%|| and \\M2pq\\ are two eigenvalues of similar fruits respectively; the following relationship exists between them: ...(4) Assuming the presence of noise, then the above equation is rewritten as: ... (5) Because the two fruits are similar, Apq is relatively small. Since the invariant moment and Zemike moments are calculated in the whole image space, rjpq is relatively large. If rjpq is bigger than Apq, a classified error will occurred. If gp(r) is defined in the local space of the image, rjpq will decrease significantly, and then it would improve the classification accuracy. Wavelet transform can provide a window time-domain and frequencydomain in the meantime, this characteristic is very suitable to extract local feature of images. So you can consider that the wavelet function set as follows: ... (6) where gg R+ is the scale factor, and be R is the displacement factor. Formula (6) instead of gp(r) of equation (3) can obtain wavelet invariant moments of images. In digital image processing, a and b can only take discrete values, due to the limited of the image's size 0 < r < 1, then in our research, we choose ...

The wavelet functions' set is as follows: ... (7) So we can get global and local features of images with different m and n. Then it can be define wavelet invariant moments of the normalized image as: ...(8) In the formula (8) above, for a fixed r, stands for the qth feature of the normalized image fn(r, 0) in the phase-space [0, 2it\.

...

And using different scale factor m and displacement factor n, xpm.Áf) can throughout the radial space [0, 1], by this way fdr, 0) characteristics at different levels of scale provided by the wavelet invariants moment ||fPm,n,q|| can be used to describe the shape.

3. Experimental Results and Analysis However, it can be seen from the formula (8) that we get different wavelet moments from different kinds of wavelet functions .The main types of wavelet are spline wavelet, orthogonal wavelet, biorthogonal wavelet and so on. While the large amount of computation and reconstruction boundary error will accumulate in the use of B-spline wavelet transform, this will affect the classification results obviously. Coilfets wavelets possess regularity, biorthogonality and approximate symmetry, so we choose Coiflets wavelet as the basic function of formula (8).

For the fixed value m in formula (8), when we choose different translation parameters n, wavelet invariant moments reflect very local information of an image, which will be easily corrupted by noise [18]. So in this experiment, for a fixed m, we should get the sum of the different n which means we only study two parameters m and q. Then we have found a balance between the local features and global features. The combinations of different m and n have many characters, and it is quite difficult to choose the appropriate feature. We have tried a variety of combinations and carry out the following four categories as the basis of classification: ...(9) In following experiments, we investigated the plane geometry transformation invariance of the wavelet moment method. Likewise, we extract four wavelet moment characteristics from a set of images in Fig. 1, which listed in the Table 1.

It can be found that the wavelet eigenvalues after translating (picture e, f), rotating (image c, d) and stretching (image b) are a little different with the original image a. So the wavelet moment characteristics have good plane geometry invariance. In order to further verify the performance of the wavelet moment as a shape descriptor, we use 659 apple color images (size 640 x 48) as a sample. According to the laboratory 5 staffs who have many years of experience in agro-processing, 659 apple images are divided into three categories: normal fruit shape, mild deformity, and severe deformity in Fig. 1, Fig. 2 and Fig. 3.

Since cluster analysis classification is based on the level of similarity of the unclassified analysis model. Similar one is classified as a class, dissimilar one is typed as another. In the category, it's no need to study and train with training samples. C-means algorithm was commonly used in this experiment (because it is the three categories, so take c = 3), and the basic idea of this algorithm is to take a given class c and select c initial cluster centers.

According to the principle of the minimum distance, we distribute the mode into a certain class of c class, then it is need to constantly calculate the center of one class and adjust the categories of each model, eventually we should minimize the sum of square distance of each mode to its judgment categories. In order to compare it with the traditional Fourier descriptors and Zemike moments, in this experiment, we extracted the former 25 coefficients of the Fourier descriptors, 9 features of Zemike moments in literature ... and pattern characteristic vectors composed by 4 characters of Coif lets wavelet moment from 659 apple images, and then composed them into vectors of model feature. And then the C-means clustering algorithm was applied to cluster, the results shown in Fig. 4. From Fig. 4 (a), it can be seen that the results of feature cluster of Fourier descriptors are relatively poor. It is not effective to distinguish them with three mixed types. The cluster result of Zemike moments features in Fig. 4 (b) is much better, while it is likely to cause misclassification when the center of the green area closes to the red area. From Fig. 4 (c), it was observed that the cluster results of wavelet moment characteristics are best, the regional boundaries of the three categories are obvious and the distance between centers is lager.

In order to verify the actual results of the clustering classification method, we select three categories of typical 9 apple images (shown in Table 1) to make up a contrast set, which is used to determine the centers of each cluster corresponding to the shape category.

So we can get the hybrid matrix, the classification accuracy confusion matrix of Zemike Moments features and wavelet moment features (Fourier descriptors characteristic cluster ineffective, here is not to do further analysis), as shown in Table 1 and Table 2.

Table 1 shows that as far as is concerned Zemike moment characteristics, the classification accuracy of serious abnormal shape is on the low side of only 53.57, the classification accuracy of slight abnormal shape is only 70.89 %. The reason is that the calculation range of Zemike moments is the entire image space; the error will accumulate and result in the distribution of many slight abnormal shapes closing to the core of severe deformity. In Fig. 4 (b), the middle of the red area (slight abnormal shape) nearby the edge of the blue area (serious abnormal shape) is closer to the blue central region, and some distributions of serious abnormal shapes were closer to the core of the normal shape. So over 20 % of slight abnormal shapes were mistaken into serious abnormal shape, and more than 29 % of serious abnormal shapes were mistaken into normal fruit shape.

To the wavelet moment, when the sample is divided into three categories, the classification precision of normal shape and slight abnormal shape is more than 85 %, and the classification precision of serious abnormal shape was over 90 %, and none were divided into normal fruit shape. These results of classification and cluster are fully consistent, the blue area and the green area are far from each other (as shown in Fig. 4 (c).These results indicated that the classification features of the wavelet moment are more suitable for fruit grading, but the speed of this method is slower than Fourier descriptors, and how to increase the speed is the direction of future research. 4. Conclusion This research use the wavelet moments as classification features to classify the apple shape and it achieves satisfactory results. First, we normalize fruit image with standard moment so that the image has translation invariance and scale invariance. And then we extracted wavelet moment characteristics from the normalized image, which have rotation invariance. Cluster analysis is applied to classify fruit shape in the meantime. Coif lets wavelet possesses regularity, biorthogonality and approximate symmetry respectively, so we choose coif lets wavelet as the basic function of the wavelet moment feature extraction. The results show that this method performs better than traditional approaches such as Fourier descriptors and Zemike moments.

Acknowledgements The authors gratefully acknowledge the financial Support provided by the National Natural Science Foundation of China (Grant No. 61105035).

References [1] . C. Yud-Ren, C. Kuang-Lin, Moon S Kim, Machine vision technology for agricultural applications, Computer and Electronics in Agriculture, Vol. 36, Issue 2-3,2002, pp. 173-191.

[2] . D. P. Whitelock, G. H. Brusewitz, M. L. Stone, Apple shape and rolling orientation, Applied Engineering in Agriculture, Vol. 22, Issue 1, 2006, pp. 87-94.

[3] . L. KaiYan, W. Junhui, X. Lihong, Separation approach for shape grading of fruits using computer vision, Transactions of the Chinese Society of Agricultural Machinery, Vol. 36, Issue 6, 2005, pp. 71-74.

[4] . L. Xianfeng, Z. Weixin, H. Xiaopeng, K. Lingdong, Multi-feature Decision fusion method Based on D-S Evidence Theory for Apple Grading, Transactions of the Chinese Society of Agricultural Machinery, Vol. 42. Issue 6,2011, pp. 188-192.

[5] . P. W. Andrew, P. C. John, E. K. Douglas, Fruit shape analysis of Vitis Using digital Photography, Hort Science, Vol. 43, Issue 3, 2008, pp. 677-680.

[6] . R. Majid, S. Key van, Classification of fruit shape in Kiwifruit Applying the Analysis of outer Dimensions, International Journal of Agriculture & Biology, Vol. 9, Issue 5,2007, pp. 759-762.

[7] . R. Majid, S. Key van, Classification of fruit shape in cantaloupe using the analysis of geometrical attributes, World Journal of Agricultural Sciences, Vol. 3, Issue 6,2007, pp. 735-740.

[8] . R. Slamet, J. I. Asnor, M. M. Mohd, A. Hussain, Wavelet-based feature extraction technique for fruit shape classification, in Proceeding of the 5th International Symposium on Mechatronics and its Applications (ISMA'08), 2008, pp. 1-5.

[9] . M. Z. Abdullah, J. Mohamad-Saleh, A. S. FathinulSyahir, Discrimination and classification of fresh-cut starfruits using automated machine vision system, Journal of Food Engineering, Vol. 76, Issue 4, 2006, pp. 506-523.

[10] . P. Ingrid, S. Eddie, Shape characterization of new apple cultivare by Fourier expansion of digitized images, Journal of Agricultural Engineering Research, Vol. 72, Issue 2, 1999, pp. 113-118.

[11] . C. Leping, W. Zhiyuan, Error of the compensation fuzzyneural network fruit grader, Transactions of the Chinese Society of Agricultural Engineering, Vol. 24, Issue 12,2008, pp. 102-106.

[12] . C. Jianrong, X. Yueming, Identification and classification of apple shape based on active shape models, Transactions of the Chinese Society of Agricultural Engineering, Vol. 22, Issue 6, 2006, pp. 123-126.

[13] . A. Khotanzad, Y. H. Hong, Invariant image recognition by Zemike moments, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 12, Issue 5, 1990, pp. 489-497.

[14] . Y. Yi-bin, G. Jiang-Sheng, R. Xiu-Qin, Fruit Shape Classification Based on Zemike moments, Journal of Jiangsu University (Nature Science edition), Vol. 28, Issue 1,2007, pp. 1-3.

[15] . S. Yongsheng, Q. Jun, L. Gang, L. Zhaoxiang, G. Rui, Recognition and Shape Features Extraction of Apples Based on Machine Vision, Transactions of the Chinese Society of Agricultural Machinery, Vol. 40, Issue 8,2009, pp. 161-165.

[16] . G. Jun, N. Jinping, W. Huifeng, Z. Feng, Aircraft Recognition by Wavelet Moment Invariants, Journal of Xi'an Technological University, Vol. 28, Issue 2, 2008, pp. 107-111.

[17] . X. Guangzhi, F. Dayi, Y. Baiyu, Y. Baoxi, Image recognition algorithm based on wavelet moment invariants, Journal of Applied Optics, Vol. 29, Issue 1, 2008, pp. 5-8.

[18] . A. Zhiyong, C. Jiangtao, Z. Zhiyong, Image retrieval based on radon and wavelet transform, Journal of Infrared Millimeter Waves, Vol. 27, Issue 2, 2008, pp. 147-152.

* Jiangsheng Gui, Qing Zhang, Li Hao, Xiaoan Bao College of Information, Zhejiang Sci-Tech University, Hangzhou 310018, China * E-mail: [email protected] Received: 12 May 2014 /Accepted: 29 August 2014 /Published: 30 September 2014 (c) 2014 IFSA Publishing, S.L.

[ Back To TMCnet.com's Homepage ]