Detecting Surface Cracks on Dates Using Color Imaging Technique

10
Food Sci. Technol. Res., 19 (5), xxx – xxx, 2013 Detecting Surface Cracks on Dates Using Color Imaging Technique S. Al-RAhbi 1 , A. MAnickAvAsAgAn 1 , R. Al-Y AhYAi 2 , L. khRiji 3 and P. AlAhAkoon 1 1 Department of Soils, Water and Agricultural Engineering, Sultan Qaboos University, PO 34, Al-Khoud, PC 123 Sultanate of Oman 2 Department of Crop Science, Sultan Qaboos University, PO 34, Al-Khoud, PC 123 Sultanate of Oman 3 Department Electrical and Computer Engineering, Sultan Qaboos University, PO 34, Al-Khoud, PC 123 Sultanate of Oman Received March 16, 2013; Accepted June 26, 2013 Surface or external qualities of fresh and dried fruits are the important factors in determining the consumer acceptability. An automated and objective method to detect the surface defects on fruits would be highly beneficial in handling and processing facilities. The objective of this study was to determine the efficiency of a computer vision system with RGB color camera to detect the surface cracks on dates. Three grades of dates (no-crack dates, low-crack dates and high-crack dates) were obtained from two commer- cial dates processing factories in Oman. After the confirmation of grade standards by a dates-quality- expert, the samples were imaged individually using a color camera (105 dates in each grade). Eleven features were extracted from each image and used in classification models. Red, hue and value intensities of three grades of dates were significantly different from each other. In a three classes model, the classifi- cation accuracy was 62%, 58% and 78% for high-crack, low-crack and no-crack dates, respectively using linear discriminant analysis (LDA). LDA yielded a classification accuracy of 88% and 75% for the dates with-crack and without-crack, respectively in a two classes model. In pairwise discrimination, the highest classification (96%) was achieved between high-crack and no-crack dates, and the lowest accuracy (59%) was between low-crack and high-crack dates. Keywords: image processing, dates, surface crack, color imaging *To whom correspondence should be addressed. E-mail: [email protected] Introduction Guaranteed quality assurance is required to improve the marketability of fresh and dried fruits in domestic and inter- national markets. In handling facilities, most of the surface qualities of fruits are determined by human graders. Manual inspection or grading of fruits is a highly subjective method, and the accuracy is determined by various factors such as lighting condition, experience and skill level of the graders, mental stress of the graders and so on. Image processing or computer vision technique is becoming popular for the objective measurement of various internal and external at- tributes of food products. In this method, the image of the object is acquired by a camera and analyzed by a computer and other devices in order to obtain useful information. Du and Sun (2006) mentioned that computer vision technique can help to improve the production efficiency and reduce the production cost. Date palm is one of the oldest plants in the world and its fruit is marked as subsistence and nutritious food in most of the desert areas especially GCC countries (Erskine et al., 2004). In Oman, the date palm trees represent about 82% of the total fruit crop and occupy around 49% of the total agricultural land (Al-Yahyai and Al-Khanjari, 2008). Oman produces an average of 268,011 tonnes per year and it is ranked as the eighth largest date producer in the world (FAO, 2011). Although the production is high, the annual export from Oman is less than 10,000 tones (Al-Rawahi et al. , 2005). This low export could be due to the poor quality of the processed and packaged dates (Al-Marshudi, 2002). Date quality is based on color, size and absence of defects or dam- ages (Ait-Oubahou and Yahia, 1999). According to CODEX standard, the allowance of defects in dates is ranging from 1 to 7% by count, depending on the type of the defect. In USA Standards for dates, the “absence of defects” criteria weighs 30 points in a 100 points quality score sheet (Kader and Hus- sein, 2009). ‘Crack’ is one type of surface defects which appear as

Transcript of Detecting Surface Cracks on Dates Using Color Imaging Technique

Food Sci. Technol. Res., 19 (5), xxx–xxx, 2013

Detecting Surface Cracks on Dates Using Color Imaging Technique

S. Al-RAhbi1, A. MAnickAvAsAgAn

1, R. Al-YAhYAi2, L. khRiji

3 and P. AlAhAkoon1

1 Department of Soils, Water and Agricultural Engineering, Sultan Qaboos University, PO 34, Al-Khoud, PC 123 Sultanate of Oman2 Department of Crop Science, Sultan Qaboos University, PO 34, Al-Khoud, PC 123 Sultanate of Oman3 Department Electrical and Computer Engineering, Sultan Qaboos University, PO 34, Al-Khoud, PC 123 Sultanate of Oman

Received March 16, 2013; Accepted June 26, 2013

Surface or external qualities of fresh and dried fruits are the important factors in determining the consumer acceptability. An automated and objective method to detect the surface defects on fruits would be highly beneficial in handling and processing facilities. The objective of this study was to determine the efficiency of a computer vision system with RGB color camera to detect the surface cracks on dates. Three grades of dates (no-crack dates, low-crack dates and high-crack dates) were obtained from two commer-cial dates processing factories in Oman. After the confirmation of grade standards by a dates-quality-expert, the samples were imaged individually using a color camera (105 dates in each grade). Eleven features were extracted from each image and used in classification models. Red, hue and value intensities of three grades of dates were significantly different from each other. In a three classes model, the classifi-cation accuracy was 62%, 58% and 78% for high-crack, low-crack and no-crack dates, respectively using linear discriminant analysis (LDA). LDA yielded a classification accuracy of 88% and 75% for the dates with-crack and without-crack, respectively in a two classes model. In pairwise discrimination, the highest classification (96%) was achieved between high-crack and no-crack dates, and the lowest accuracy (59%) was between low-crack and high-crack dates.

Keywords: image processing, dates, surface crack, color imaging

*To whom correspondence should be addressed.E-mail: [email protected]

IntroductionGuaranteed quality assurance is required to improve the

marketability of fresh and dried fruits in domestic and inter-national markets. In handling facilities, most of the surface qualities of fruits are determined by human graders. Manual inspection or grading of fruits is a highly subjective method, and the accuracy is determined by various factors such as lighting condition, experience and skill level of the graders, mental stress of the graders and so on. Image processing or computer vision technique is becoming popular for the objective measurement of various internal and external at-tributes of food products. In this method, the image of the object is acquired by a camera and analyzed by a computer and other devices in order to obtain useful information. Du and Sun (2006) mentioned that computer vision technique can help to improve the production efficiency and reduce the production cost.

Date palm is one of the oldest plants in the world and its fruit is marked as subsistence and nutritious food in most of the desert areas especially GCC countries (Erskine et al., 2004). In Oman, the date palm trees represent about 82% of the total fruit crop and occupy around 49% of the total agricultural land (Al-Yahyai and Al-Khanjari, 2008). Oman produces an average of 268,011 tonnes per year and it is ranked as the eighth largest date producer in the world (FAO, 2011). Although the production is high, the annual export from Oman is less than 10,000 tones (Al-Rawahi et al., 2005). This low export could be due to the poor quality of the processed and packaged dates (Al-Marshudi, 2002). Date quality is based on color, size and absence of defects or dam-ages (Ait-Oubahou and Yahia, 1999). According to CODEX standard, the allowance of defects in dates is ranging from 1 to 7% by count, depending on the type of the defect. In USA Standards for dates, the “absence of defects” criteria weighs 30 points in a 100 points quality score sheet (Kader and Hus-sein, 2009).

‘Crack’ is one type of surface defects which appear as

s. Al-RAhbi et al.

ate color image analysis was used by Lopez et al. (2010) to detect surface defects of oranges and mandarins with 94.2% classification accuracy. Blasco et al. (2007) tested the effect of NIR, ultraviolet and florescence details along with the vis-ible information for the detections of surface defects in citrus fruits. Addition of NIR information to color images improved the detection of anthracnose defect from 86% to 95%. Simi-larly detection efficiency of green mold was increased from 65% to 95% while adding florescence information to RGB information. The surface blemishes on oranges, peaches and apples were determined at an accuracy of 86% using RGB images by Blasco et al. (2003). NIR imaging technique was successfully used to detect the surface defects of rotating apple (Pink Lady variety) with 92% accuracy (Bennedsen et al., 2005). Although computer vision technique has been tested and used for various surface defects identification in fresh fruits, the research on dried fruits is limited.

Materials and MethodsSample collection ‘Khalas’ and ‘Naeem’ varieties of

dates are most commonly affected with cracks (Personal Communication with Mr. Yaqoub Al-Siabi, Owner and Man-ager of Samail Date Factory, Oman). As ‘Khalas’ variety is one of the most commercially produced dates, this variety was selected and tested in this study. Date samples of ‘Kha-las’ variety were collected from Samail Dates Factory in Al-Dakiliah Region and Bright Sun Dates Factory in Al-Batinah Region of Sultanate of Oman. The samples received from these two factories were mixed together. Three grades of dates (high-crack, low-crack and no-crack) were extracted from the conglomerated samples. The graded samples were confirmed by a date-quality- expert. A total of 315 dates (105 dates in each grade) were used for imaging and further analy-sis. Fig. 1 shows the images of date sample in each grade.

Image acquisition The images of the date samples were captured using a color camera (model: EOS 550D, Canon INC., Japan) with a resolution of 5184 × 3456 pixels. The camera was calibrated by customizing the white balance us-ing a gray card (model: Digital Gray Kard XL, DGK Color Tools, USA) with 18% reflectance (Valous et al., 2009; Pe-dreschi et al., 2006). The camera was located at 15 cm above the sample platform.

minute breaks in the cuticle and epidermal cells. These cracks form in transverse, longitudinal or irregular direc-tions around the fruit and their abundance and shape differ in various verities (Zaid, 2002). The highly cracked dates will have hard and dry skin which consequently will reduce the quality and the commercial value of the dates (Qanawi, 2005). Palevsky et al. (2004) reported that sometimes, the cracked dates are not even preferred by birds. The reasons for these cracks on dates may be due to the old world date mite (Qanawi, 2005) or wet weather (Zaid, 2002). Old world date mite or Goubar mite (Oligonychus afrasiaticus) causes the most significant damage to the date (Knihinicki and Flechtmann, 1999), because it cuts the skin and feeds from the fruit, causing a stiff surface with some cracks (Qanawi, 2005). The second probable reason for crack formation on dates is high humidity caused by wet weather coupled with rain (Zaid, 2002).

At present, in date processing industries and handling facilities the dates with cracks are identified and removed by manual inspection method, which is laborious, inconsistent, less efficient and expensive. Besides, there is no standard method to estimate the extent of spread of these cracks on dates, or their percentage cover.

Hence, there is a necessity to develop an objective meth-od to estimate the amount of cracks present on a date fruit, which could be used as a detection tool in handling, process-ing and packaging facilities.

Therefore, the objective of this study was to determine the efficiency of a computer vision system with RGB color camera to detect the surface cracks on dates.

Although computer vision techniques are used for de-termination of qualities such as varietal purity, color and maturity in dates (Thomas et al., 2012; Lee et al., 2008), no published work is available for detection of surface cracks. However, this technique has been used to discriminate sur-face defects in other fruits. Aleixos et al. (2002) used RGB and monochrome camera along with an infrared filter to identify surface defects in citrus. The developed system was able to correctly classify 93% of lemon samples, and 94% of mandarin samples. Blasco et al. (2009) identified 11 types of external defects on citrus fruit with a success accuracy of 86% using visible, florescent and NIR imaging. A multivari-

Fig. 1. Images of date samples.

2

Detecting Crack on Dates Using Color Imaging

percentage of crack area were calculated using 2 methods: a. threshold method b. HSV mask method.

a)Threshold method In this method a threshold value was used to separate the crack area from date surface. Five random images were selected from each grade (high-crack and low-crack), and converted into its HSV-format. Then, the intensity of the Value component for the crack region was measured using data cursor tool in Matlab. The obtained mean intensity of Value component for crack region was 0.45. Then this value was used as threshold value to separate the crack area from the surface of all the dates images. Finally, the crack area was calculated by counting the pixels covering the foreground area in the thresholded image. The operation-al procedures in this method are shown in Fig. 2.

Two fluorescent lights of 36W power (model: Dulux L, OSRAM, Italy) was used to illuminate the samples. The lights were maintained to be parallel to the sample platform. This orientation reduced the reflection of light on the sample surface without losing the needed details of cracks.

A cardboard box was used to cover the whole setup including the camera and the lights, to avoid any back scat-tering effect (Mendoza and Aguilera, 2004). The inner side of the box was covered with black paper to reduce the re-flectance (Mendoza and Aguilera, 2004) and the ceiling was covered with white paper to scatter the light and minimize the shadow effects (Al-Ohali, 2011). A white background was used to provide higher contrast between the background and the date sample. The camera was connected to the USB port of a computer (Hewlett-Packard, Pentium(R) Dual-Core CPU 2.30 GHz) which contained remote shooting software EOS Utility (version 2.8.1.0, Canon INC, Japan) through which digital images were acquired. The images were stored as JPEG format and each image contained one date sample. The sample was manually oriented so that the side with the highest cracked region was facing the camera.

Image analysis The acquired images were analyzed using Matlab software (version 7.6.0.324, Mathwork INC., USA). The object was segmented from the background us-ing Otsu threshold method. Since the color of the cracks was different from the color of the normal date skin, mainly color based features were extracted. The extracted features and their descriptions are given in Table 1. The HSV components were normalized (0 to 1) automatically while converting RGB to HSV format in Matlab.

Apart from color features, the crack area (number of pix-els occupied by cracks) and the percentage of crack area on the surface of dates would be beneficial in classifying dates according to the amount of cracks. Therefore crack area and

Table 1. Features extracted from the segmented date images.

Feature Description

Gray-Intensity mean intensity of grayscale imageRed-Intensity mean intensity of red componentGreen-Intensity mean intensity of green componentBlue-Intensity mean intensity of blue componentHue-Intensity mean intensity of hue component, which is

the dominant wavelength on the color (Solomon and Breckon, 2010)

Saturation-Intensity mean intensity of saturation component, which is the color purity (Solomon and Breckon, 2010)

Value-Intensity mean intensity of value component, which is the color brightness (Solomon and Breckon, 2010)

Crack_Area_threshold area extracted by thresholdCrack_Area_mask area extracted by combining HSV masksCrack_Area_threshold% percentage of the area extracted by thresh-

old over the total area of the object (dates)Crack_Area_mask% percentage of the area extracted by com-

bining HSV masks over the total area of the object (dates)

Fig. 2. Calculating crack area using threshold method.

3

s. Al-RAhbi et al.

Fig. 3. Calculating crack area using HSV masks method.

b)HSV mask method In this method, intensity range of Hue, Saturation and Value components were used to separate the crack area from date surface. Five random images were selected from each grade (high-crack and low-crack) and converted into its HSV-format. Then, the intensity range of Hue, Saturation and Value components for the crack region was measured using data cursor tool in Matlab. The obtained values for Hue, Saturation and Value components were 0.03 − 0.07, 0.49 − 0.60 and 0.45 − 0.65, respectively. These val-ues were used as mask to separate the crack area from the surface of all the dates images in each component. Then, the three masks were combined with “&” logical operator and used to separate the final crack area. Finally, the crack area was calculated by counting the pixels covering the fore-ground area of the yielded mask. The operational procedures

in this method are shown in Fig. 3.In both methods, the percentage crack area was calcu-

lated as:

Percentage crack area = (number of pixels occupied by cracks / total number of pixels occupied by the date sample) × 100

Classification model Linear Discriminant Analysis (LDA) was used as classification model using SPSS software (version 20, IBM). Two types of classification models were used in this study:a) Linear Discriminant Analysis (LDA): In this analysis, all

the extracted features were used for the classification.b) Stepwise LDA: In stepwise analysis, only selected fea-

tures (based on their contribution to classification) were used for the classification.

4

Detecting Crack on Dates Using Color Imaging

the delaminated section on date’s surface had similar color intensity with cracks and therefore reported as crack area in threshold images (Fig. 5). In some date samples, the nature of date surface was glossy, which made it highly reflective and giving rise to brighter areas similar to cracks. Table 3 explains the crack area and percentage of cracks on dates. Although the crack area percentage in no-crack dates was expected to be zero, it was calculated as 8.24% due to edge and delamination effects.

HSV mask method This approach eliminated some of the problems such as edges, high reflection areas, faced in threshold method. However, the skin delamination was still considered as cracks in this method (Figs. 6 and 7). The crack area percentage for the no-crack dates has been reduced to 2.62 because of the elimination of the edge and high reflection effects. Fig. 8 explains the interference of delamination with cracks in no-crack dates. The crack area calculated using mask method was 0.2% and 15.5%, for the no-crack dates without and with delamination, respectively. Thus, the skin delamination was the most difficult challenge in detecting cracks area.

For the both procedures, the classification accuracy was ob-tained by a leave-one-out cross validation method (Manicka-vasagan et al., 2008).

Results and DiscussionFeature extractiona)Color features The extracted color features of three

grades of dates are shown in Table 2. The red, hue and value intensities of three grades were significantly different from each other. But there is no difference in gray and green in-tensities of low-crack and no-crack dates. The saturation in-tensity of high-crack and low-crack dates was similar. There was no difference in Blue-Intensity between three grades of dates.

b)Crack area featuresThreshold method The representative images of date

samples in each grade after applying threshold algorithm are shown in Fig. 4. In all images, the effect of edge was also treated as the crack area. While attempting to eliminate this edge effect using average filter, many crack area details were eliminated. In addition to the edge effect, the color of

Table 2. Color features of three grades of dates (n = 105 in each grade).

FeatureGrade

high-crack low-crack no-crack

Gray-Intensity 77.01a* ± 12.24** 73.17b ± 11.25 70.67b ± 13.79Red-Intensity 101.95a ± 15.55 98.22b ± 15.13 93.77c ± 17.31Green-Intensity 68.26a ± 11.85 64.00b ± 10.65 61.75b ± 13.62Blue-Intensity 55.56a ± 6.83 54.19a ± 6.57 55.98a ± 11.68Hue-Intensity 0.18a ± 0.10 0.23b ± 0.14 0.38c ± 0.17Saturation-Intensity 0.44a ± 0.05 0.45a ± 0.06 0.42b ± 0.06Value-Intensity 0.40a ±0.06 0.39b ± 0.06 0.37c ± 0.07

* values with same letters in a row are not significantly different (α = 0.05).** standard deviation.

Fig. 4. Crack area extracted from images of three grades using threshold method.

5

s. Al-RAhbi et al.

Fig. 5. Challenges in recognizing cracks area while using threshold method.

Fig. 6. Crack area extracted from images of three grades using HSV mask method.

Table 3. Crack area on three grades of dates (n = 105 in each grade).

FeatureGrade

high-crack low-crack no-crack

Crack_Area_threshold 675807a* ± 228092** 464912b ± 178090 258669c ± 106853Crack_Area_mask 296906a ± 140824 191983b ± 121203 83143c ± 80670Crack_Area_threshold% 16.25a ± 4.83 12.37b ± 4.18 8.24c ± 3.16Crack_Area_mask% 7.09a ± 3.05 5.09b ± 3.02 2.62c ± 2.33

*values with same letters in a row are not significantly different (α = 0.05).**standard deviation.

6

Detecting Crack on Dates Using Color Imaging

Fig. 7. Challenges in recognizing cracks area while using HSV mask method.

Fig. 8. Cracks area extracted by HSV mask method in dates without crack.

Classification models The extracted features were used to discriminant the date images using three different classifi-cation approaches:i) Three classes model (high-crack, low-crack and no-crack)ii) Two classes model (with-crack and without-crack)iii) Pairwise classification

i) Three classes model The contribution of each feature in the classification of dates based on surface cracks is given in Table 4. The lowest value of Wilks’ lambda indicates the

lowest error and the highest contribution of the feature in classification and vice versa (Hupse and Karssemeijer, 2010). The features directly related to crack area contributed more in classification (top 4) than color intensities. Among R, G, B color values, Green component ranked top in term of contri-bution to classification. This may be depending on the nature of defect and variety of dates. For example, Wulfsohn et al. (1989) reported that Green component was the most effec-tive color component in detecting defective dates in Zahidi variety and Red component in Majhul variety.

7

s. Al-RAhbi et al.

class (75.2%). Images of dates without-crack but with de-lamination might have been misclassified as dates with-crack.

The stepwise LDA performed in five steps and Crack_Area_threshold, Hue-Intensity, Saturation-Intensity, Crack_Area_threshold% and Green-Intensity were entered into the analysis. The used features in the stepwise classification of the two approaches were the same, but Green Intensity was

The classification results obtained from the LDA and Stepwise LDA with leave-one-out validation method are presented in Table 5.The maximum misclassification was from high-crack to low-crack (34 to 36%) and the minimum misclassification was from no-crack to high-crack (0 to 1%). The overall classification accuracy of LDA was 66%.

The stepwise LDA took four steps and one feature was added in each step. Crack_Area_threshold, Hue-Intensity, Satu-ration-Intensity and Crack_Area_threshold% were entered in the stepwise analysis. While using the Stepwise LDA, the over-all classification accuracy has slightly improved to 67.3%.

ii) Two classes model In this approach, the images of high-crack and low-crack dates were mixed together and treated as dates with-crack. The cracked dates were discrimi-nated against dates without-crack. The ranking of features based on contribution for classification in this approach is given in Table 6. In both approaches (3 classes model and 2 classes model), same features were ranked in the top 5 based on their contribution to classification. However the Wilks’ Lambda values were increased in the two classes model.

The classification accuracies in two classes model are pre-sented in Table 7. The overall classification accuracy yielded by LDA was 83.8%. The classification accuracy of with-crack class (88.1%) was higher than accuracy of without-crack

Table 6. Ranking of features on the basis of their level of contribution to classification in two classes model.

Rank Feature Wilks’ Lambda

1 Crack_Area_threshold 0.6432 Crack_Area_threshold% 0.7023 Crack_Area_mask 0.7274 Hue-Intensity 0.7395 Crack_Area_mask% 0.7626 Saturation-Intensity 0.9487 Value-Intensity 0.9678 Red-Intensity 0.9679 Green-Intensity 0.97210 Gray-Intensity 0.97311 Blue-Intensity 0.995

Table 7. Classification accuracies (%) of dates in two classes model.

From

To Overall%with-crack without-crack

LDA with-crack 88.1 11.9 83.8%without-crack 24.8 75.2

Stepwise LDA

with-crack 89.5 10.5 84.4%without-crack 25.7 74.3

Fig. 9. Classification accuracies during pairwise classification.

Table 4. Ranking of features on the basis of their level of contribution to classification in three classes model.

Rank Feature Wilks’ Lambda

1 Crack_Area_threshold 0.5202 Crack_Area_threshold% 0.6113 Crack_Area_mask 0.6404 Crack_Area_mask% 0.7025 Hue-Intensity 0.7186 Saturation-Intensity 0.9477 Green-Intensity 0.9528 Gray-Intensity 0.9589 Value -Intensity 0.95810 Red-Intensity 0.95811 Blue-Intensity 0.989

Table 5. Classification accuracies (%) of dates in three classes model.

From

ToOverall

high-crack low-crack no-crack

LDAhigh-crack 61.9 36.2 1.9

66.0low-crack 19.0 58.1 22.9no-crack 1.0 21.0 78.1

Stepwise LDA

high-crack 63.8 34.3 1.967.3low-crack 18.1 60.0 21.9

no-crack 0.0 21.9 78.1

8

Detecting Crack on Dates Using Color Imaging

Bennedsen, B.S., Peterson, D.L. and Tabb, A. (2005). Identifying defects in images of rotating apples. Comp. Electron. Agric., 48, 92 -102.

Blasco, J., Aleixos, N., Gómez, J. and Molto, E. (2009). Recogni-tion and classification of external skin damage in citrus fruits using multispectral data and morphological features. Biosystems Eng., 103, 137 -145.

Blasco, J., Aleixos, N., Gómez, J. and Molto, E. (2007). Citrus sorting by identification of the most common defects using multi-spectral computer vision. J. Food Eng., 83, 384-393.

Blasco, J., Aleixos, N. and Molto,E. (2003). Machine vision system for automatic quality grading of fruit. Biosystems Eng., 85, 415-423.

Du, C. and Sun, D. (2006). Learning techniques used in computer vision for food quality evaluation: a review. J. Food Eng., 72, 39-55.

Erskine, W., Moustafa, A.T., Osaman, A.E., Lashine, Z., Nejatian, A., Badawi, T. and Ragy, S. (2004). Date palm in the GCC Coun-tries of the arabian peninsula. Regional Workshop on Date palm Development in the Arabian Peninsula, Abu Dhabi, UAE. Avail-able at http://www.icarde.org/APRP/Datepalm/introduction/into-body.htm. Accessed on Feb 23, 2013.

FAO (Food and Agriculture Organization of the United Nations), (2011). Food & Agriculture Organization of the United Nation. Available at : http://www.faostat.fao.org. Accessed on December 20, 2012.

Hupse, R. and Karssemeijer, N. (2010). The effect of feature selec-tion methods on computer-aided detection of masses in mammo-grams. Phys. Med. Biol., 55, 2893-2904.

Kader, A.A. and Hussein, A.M. (2009). Harvesting and postharvest handling of dates, International Center for Agricultural Research in the Dry Area (ICARDA), Syria.

Kandi, S. (2010). Automatic defect detection and grading of single-color fruits using HSV (Hue, Saturation, Value) color space. J. Life Sci., 4, 32.

Knihinicki, D.K. and Flechtmann, C.H. (1999). A new species of spider mite, Oligonychus calicicola (Acari: Tetranychidae), dam-aging date fruit, Phoenix dactylifera L. (Arecaceae), in Australia. Aust. J. Entomol., 38, 176-178.

Lee, D., Archibald, J., Chang, Y. and Greco, R. (2008). Robust color space conversion and color distribution analysis techniques for date maturity evaluation. J. Food Eng., 88, 364-372.

Lopez G., Garcia, A., Blascob, J., Aleixosc, N. and Valientea, J. (2010). Automatic detection of skin defects in citrus fruits using a multivariate image analysis approach. Comp. Electron. Agric., 71, 189-197.

Manickavasagan, A., Sathya, G., Jayas, D.S. and White, N.D.G. (2008). Wheat class identification using monochrome images. J. Cereal Sci., 47, 518-527.

Mendoza, F. and Aguilera, J.M. (2004). Application of image analy-

added in the second approach. The overall classification ac-curacy of stepwise LDA was 84.4%.

iii) Pairwise classification In this approach, two grades were discriminated at a time and the classification accura-cies obtained are given in Fig. 9. The highest classification accuracy (95.7%) was obtained between high-crack and no-crack dates. The maximum misclassification (41.0%) was between high-crack and low-crack dates. Since the surface of the dates was not smooth and uniform, it provided obstacles while detecting the defects. Al-Ohali (2011) achieved 55 to 80% accuracy while sorting dates based on defects, flabbi-ness, size, shape and intensity due to limited visibility of the defects.

ConclusionIn this study, an RGB camera was used to make the

system less expensive and affordable for many commercial factories. Reasonable classification accuracy of 82% was obtained in two classes models with the developed system. However, for more accurate classification, the efficiency of other types of cameras such as near infrared or ultraviolet in detection of surface cracks on dates must be studied.

Acknowledgement 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).

ReferencesAit-Oubahou, A. and Yahia, E.M. (1999). Postharvest handling of

dates. Postharv. News Info., 10, 67N-74N.Al Ohali, Y. (2011). Computer vision based date fruit grading sys-

tem: Design and implementation. J. King Saud Univ. – Comp. Inf. Sci., 23, 29-36.

Aleixos, N., Blasco, J., Navarrón, F. and Moltó, E. (2002). Multi-spectral inspection of citrus in real-time using machine vision and digital signal processors. Comp. Electron. Agri., 33, 121 -137.

Al-Janobi, A.A. (2010). A prototype mechatronic system for inspec-tion of date fruits. Unpublished report. Department of Agricul-tural Engineering King Saud University, Saudi Arabia. Available athttp://collages.Ksu.edu.sa/papers/papers/003%20Mvip%20cd.pdf. accessed on March 2, 2013.

Al-Marshudi, A.S. (2002). Oman traditional date palms: Production and improvement of date palms in oman. Tropicultura, 20, 203-209.

Al-Rawahi, A.S., Kasapis, S. and Al-Bulushi, I.M. (2005). Devel-opment of a date confectionery: Part 1 Relating formulation to instrumental texture. Int. J. Food Prop., 8, 457-468.

Al-Yahyai, R. and Al-Khanjari, S. (2008). Biodiversity of date palm in the sultanate of oman. Afr. J. Agric. Res., 3, 389-395.

9

s. Al-RAhbi et al.

Thomas, G., Manickavasagan, A. and Al-Yahyai, R. (2012). Clas-sification of dates varieties and effect of motion blurring on stan-dardized moment features. Food Measure, 6, 21-26.

Valous, N.A., Mendoza, F., Sun, D.-W. and Allen, P. (2009). Colour calibration of a laboratory computer vision system for quality evaluation of pre-sliced hams. Meat Sci., 81, 132-141.

Wulfsohn, D., Sarig, Y. and Algazi, R.V. (1989). Preliminary in-vestigation to identify parameters for sorting of dates by image processing [Paper No. 89-6610]. ASAE (American Society for Agricultural Engineering).

Zaid, A. (2002). Date palm cultivation, FAO (Food and Agriculture Organization of the United Nations), Rome.

sis for classification of ripening bananas. J. Food Sci., 69, E471-E477.

Palevsky, E., Ucko, O., Peles, S., Yablonski, S. and Gerson, U. (2004). Evaluation of control measures for oligonychus afrasiati-cus infesting date palm cultivars in the Southern Arava Valley of Israel. Crop. Prot., 23, 387-392.

Pedreschi, F., Le³أn, J., Mery, D. and Moyano, P. (2006). Develop-ment of a computer vision system to measure the color of potato chips. Food Res. Int., 39, 1092-1098.

Qanawi, M. (2005). Mites and pests of the date palm in sultanate of oman (Arabic version)., Ministry of Agriculture, Sultanate of Oman.

10