Acessibilidade / Reportar erro

Recognition and classification of White Wholes (WW) grade cashew kernel using artificial neural networks

Detectar e classificar castanhas de caju, tipo inteiro branco, através de rede neural artificial

ABSTRACT

A novel intelligent automated model to recognize and classify a cashew kernels using Artificial Neural Network (ANN). The model primarily intends to work on two phases. The phase one, built with a proposed method to extract features, which includes 16 morphological features and also 24 color features from the input cashew kernel images. In phase two, a Multilayer Perceptron ANN is being used to recognize and classify the given white wholes grades using back propagation learning algorithm. The proposed method achieves a classification accuracy of 88.93%. This study also reveals that the combination of morphological and color features outperforms rather using any one set of features separately to grade cashew kernels.

Keywords:
White Wholes (WW) grade cashew kernel images; feature extraction; artificial neural networks; classification

RESUMO

Analisa-se um novo modelo automatizado para detectar e classificar castanhas de caju por uma rede neural artificial. O modelo funciona em duas frases. Fase 1 é construída para detectar as características, as quais incluem 16 fatores morfológicos e 24 características de cor a partir de imagens da castanha do caju. Na Fase 2 emprega-se a rede neural artificial multicamada para detectar e classificar os graus inteiros brancos por algoritmo de propagação reversa. O método classifica com uma exatidão de 88,93%. Essa investigação também revela que a combinação das características morfológicas e de cor vai além de que quando se usa uma série de características separadas para classificar as castanhas de caju.

Palavras-chave:
imagens de castanhas de caju serie brancos inteiros; características de extração; rede neural artificial; classificação

Introduction

Cashew (Anarcardium Occidentale L.) has emerged as an important plantation crop of India and it plays a significant role in Indian economy. Cashew earned foreign exchange equivalent to 43,900 million rupees, from export of 1,32,000 MT of cashew kernels during the year 2011-12 (Saroj & Balasubramanian, 2013Saroj, P. L., & Balasubramanian, D. (2013). Cashew Industry in India-a sustainable road map. Indian Horticultue, 58(1), 9-15.). Cashew kernels are obtained from raw cashew nuts, the true seeds of the cashew tree. Cashew are most delicious considered to be among many other edible tree nuts. It is proved that cashew add taste virtually to anything i.e. Ice Creams, Sweets, Chocolates, and various Dishes (Kumar, Rao, & Desai, 2013Kumar, J. A., Rao, P. R., & Desai, A. R. (2013). Cashew kernel classification using machine learning approaches. Journal of the Indian Society of Agricultural Statistics, 67(1), 121-129.).

In India cashew farms and processing units are located in the states of Maharastra, Goa, Andhra Pradesh, Orissa, West Bengal, Karnataka, Kerala, Tamilnadu, Madhya Pradesh, and in the eastern regions. In factory, composite lots of raw cashew

nuts, after processing, yield the bulk of cashew kernels of varied size and weights, which in turn decide the marketability of the kernels under different grades. Grading of cashew kernels is a prerequisite to meet the requirements of domestic as well as international trades and marketing (Kumar et al., 2013Kumar, M., Bora, G., & Lin, D. (2013). Image processing technique to estimate geometric parameters and volume of selected dry beans. Journal of Food Measurement and Characterization, 7(2), 81-89.). Cashew kernels are graded depending on their size, shape and color standards specified by the Export Control and Inspection Act,

1963 (Cashew Export Promotion Council of India [CEPCI], 2013Cashew Export Promotion Council of India (CEPCI). (2013). Cashew kernels. Kollam, Kerala: Government of India. Retrieved from http://www.cepci.org
http://www.cepci.org ...
). There are as many as 26 cashew kernel grades available in the market ranging from white wholes to pieces of which WW-180, WW-210, WW-240 and WW-320 are the accepted grades in the global market. The important characteristics of the white wholes cashew kernels are as mentioned in the Table 1 (CEPCI, 2013Cashew Export Promotion Council of India (CEPCI). (2013). Cashew kernels. Kollam, Kerala: Government of India. Retrieved from http://www.cepci.org
http://www.cepci.org ...
). The current standards for cashew kernels grade are ambiguous, because of count per 454 g size description and general characteristic as mentioned in the Table 1.

Table 1
General characteristic of White Wholes cashew kernels.

A major problem in sorting or grading of cashew kernels is the use of harmful mechanical equipment or expensive color sorters; still, cashew kernels grading is carried out manually. Manual sorting or grading is based on traditional visual quality inspection performed by trained labours. The problem inherent in this system includes high labor costs, worker fatigue, inconsistency, variability, and scarcity of trained labor. Today, various kinds of cashew kernel grades are provided in the market with different qualities, due to the variability in quality decisions among the graders. Due to the scarcity of trained labor, mechanization at various stages of cashew processing is gaining importance in this country and abroad. This way of grading presents many quality problems and grading is the final opportunity for the quality control (Thakkar et al., 2011Thakkar, M., Bhatt, M., & Bhensdadia, C. K. (2011). Performance evaluation of classification techniques for computer vision based cashew grading system. International Journal of Computer Applications, 18(6), 9-12.). To ascertain the quality, the cashew kernel (white wholes) grade standards have been developed by considering the geometrical and color features.

Computer-based vision technology offers a high level of flexibility and repeatability at relatively low-cost with fairly high throughput with superior accuracy. Computer vision offers an alternative to visual physical inspection, and has been in numerous foods and agricultural commodity sorting or grading systems today. Moreover, this practice is objective, consistent, rapid and economical. Geometrical and color features are the primary information sources for foods and agricultural commodity (i.e. object) inspection, classification, and sorting or grading (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.). Computer vision systems have been effectively used to classify or to recognize quality parameters like color and size in several agricultural and food commodities including dry beans (Kumar, Bora, & Lin, 2013Kumar, M., Bora, G., & Lin, D. (2013). Image processing technique to estimate geometric parameters and volume of selected dry beans. Journal of Food Measurement and Characterization, 7(2), 81-89.), coffee (Soedibyo et al., 2010Soedibyo, D. W., Seminar, K. B., Ahmad, U., Subrata, I. D. M. (2010). The Development of Automatic Coffee Sorting System Based on Image Processing and Artificial Neural Network. Bogor: Asian Federation for Information Technology.), soya beans seeds (Namias et al., 2012Namias, R., Gallo, C., Craviotto, R. M., Arango, M. R., & Granitto, P. M. (2012). Automatic grading of green intensity in soybean seeds (p. 96-104). In 13th Argentine Symposium on Artificial Intelligence. Buenos Aires, ARG.), peanuts (Chen et al., 2011Chen, H., Wang, J., Yuan, Q., & Wan, P. (2011). Quality classification of peanuts based on image processing. Journal of Food, Agriculture and Environment, 9(3-4), 205-209.) and brazil-nuts (Castelo-Quispe et al., 2013Castelo-Quispe, S., Banda-Tapia, J. D., Lopez-Paredes, Ḿ. N., Barrios-Araniba, D., & Patino-Escarcin, R. (2013). Optimization of Brazil-nuts classification process through automation using color spaces in computer vision. International Journal of Computer Information Systems and Industrial Management Applications, 5(1), 623-630.) advancement in hardware and image processing makes computer vision a very popular technique for automatic cashew kernel quality inspection of parameters like geometrical and color.

At present, there are no automated systems for cashew kernel (white wholes) grade, to estimate standard quality parameters like color and geometric. Our primary objective of this study is to develop a cost-effective intelligent computer vision system to (i) To extract morphological (i.e. size and shape) and color (i.e. RGB and HCL) features from a cashew kernel image samples of white wholes grades (ii) To recognize and classify the cashew kernel of white wholes grade from an image samples using Multilayer Perceptron Neural Network.

Material and methods

The Methodology of this research involves several tasks such as Data acquisition, Image preprocessing and segmentation, Features extraction and selection, and classification and recognition task using Multilayer Perceptron Neural Network as shown in Figure 1.

Figure 1
Methodology of the research.

Image acquisition

Samples collection

We have collected the samples of cashew kernel of white wholes grades (i.e. WW-180, WW-210, WW-240 and WW-320) from the various cashew industries located nearby the Manipal, Karnataka. The industries are Achal Cashew Industry Mangalore (ACI), Tirumala Cashew Industry Karkal (TCI), Balaji Cashew Exports Jarkal (BCE), Sathysree Cashew Industry (SCI), Gayathri Cashew Industry Karkal (GCI) and Mahalasa Cashew Exports Hiriyedka (MCE). The mentioned cashew industries were supplying cashew kernels to Domestic as well as international market. The industries follows using Cepci standards (CEPCI, 2013) to grade the cashew kernels manually by skilled labours.

Image acquisition system

The Figure 2 shows an experimental set-up of image acquisition system, used to capture an image and added to database by using two webcams (i) Ball and SmartPC, each of 12M pixels still image resolution), i.e iBall used to capture top view of the cashew kernel and (ii) SmartPC used to capture front view of the cashew kernel, in a color matching cabinet with a proper control of lighting intensity under Artificial Daylight Fluorescent Lamps (D-65) light source. The distance between webcams and each cashew kernel sample with moisture content in the range of 3.5 - 5%, was fixed (10 cm) to regret the effect of the distance on saved images. In order to reduce the influence of surrounding light, a black rubber sheet is used in image acquisition system. We were used Image Acquisition Toolbox (Matlab, 2012Matlab (2012). The MathWorks, Inc., Natick, Massachusetts, United States), to capture the cashew kernel samples by using an image acquisition system. Images format was 24 bit color JPEG with resolution 640 x 480 pixels. The Image database size of white wholes grades cashew kernel are tabulated in Table 2.

Figure 2
Image acquisition system.

Table 2
Image Database size (in no's) of white wholes grades cashew kernel.

Image pre-processing and segmentation

Image processing Toolbox in the Matlab (2012Matlab (2012). The MathWorks, Inc., Natick, Massachusetts, United States) is invoked as an image analysis and a processing software to extract the features from the image.

i) Image preprocessing: The median filter has been applied on the acquired image to eliminate noise, which has crept in during the digitization/acquisition process. The median filter replaces the value of a pixel by the median value of the sampling space, which consists of a 5 × 5 centered window on the considered pixel. The use of median filter facilitates the identification of an optimal threshold for the image during segmentation.

ii) Segmentation: This subdivides an image into meaningful non-overlapping region that is used for further analysis. It is assumed that the regions obtained correspond to the physical parts or objects of a scene (3-D) represented by the image (2-D). Image representation involves representing the segmented image as a boundary or a region. Boundary representation is suitable for analysis of morphological (i.e. size and shape) features. In this context, segmenting an image consists of separating the cashew kernel from background of the image. The segmentation carried out by using Otsu's thresholding algorithm. The Otsu's algorithm maximizes the variance between the object and background classes. Pixels that have the values less than the global threshold are classified as cashew kernel and the others are classified as background (resulting in a binary image).

Feature extraction and selection

In this study, morphological and color features were extracted from all the training and testing data sets of cashew kernel images of white wholes grade.

Morphological (i.e. Size and Shape) features of a cashew kernel

Calculation of the length and width is much more complex than that of area and perimeter (Mendoza et al., 2006Mendoza, F., Dejmek, P., & Aguilera, J. M. (2006). Calibrated color measurements of agricultural foods using image analysis. Post Biology and Technology, 41: 285-295.) especially for food objects, which generally have very irregular shapes. Nevertheless, some measurements for length and width have been developed by researchers and are used in the food industry. The measurements most commonly used are Feret's diameter, by calculating the major axis and the minor axis (Zheng et al., 2006Zheng, C., Sun, D. W., & Zheng, L. (2006). Recent developments and applications of image features for food quality evaluation and inspection-a review. Trends in Food Science & Technology, 17(12), 642-655.) of an object.

Feret's diameter

Feret's Diameter is also called the caliper length. It is the longest distance between any two points in the boundary of the region of interest (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.; Castelo-Quispe et al., 2013Castelo-Quispe, S., Banda-Tapia, J. D., Lopez-Paredes, Ḿ. N., Barrios-Araniba, D., & Patino-Escarcin, R. (2013). Optimization of Brazil-nuts classification process through automation using color spaces in computer vision. International Journal of Computer Information Systems and Industrial Management Applications, 5(1), 623-630.) as shown in Figure 3a. All the cashew kernels of white wholes grade are looking like an elliptical shape (Mendoza, et al., 2006Mendoza, F., Dejmek, P., & Aguilera, J. M. (2006). Calibrated color measurements of agricultural foods using image analysis. Post Biology and Technology, 41: 285-295.; Ganganagowdar, & Siddaramappa, 2011Ganganagowdar, N. V., & Siddaramappa, H. K. (2011). Cashew kernels classification using color features. International Journal of Machine Intelligence, 3(2), 52-57.). So we considered the major axis as actual length (L) and minor axis as actual width (W) as well as thickness (T) of cashew kernel as shown in Figure 3b, c and d (Balasubramanian, 2001Balasubramanian, D. (2001). Physical properties of raw Cashew nut. Journal of Agricultural Engineering and Research, 78(3), 291-297.).

Figure 3
Illustrates the Feret's diameter along with measurement of cashew kernel.

Size

Geometry (i.e. Size) related features deals with the extraction of quantitative information from the previously segmented image regions (Amaral et al., 2009Amaral, L. A. , Rocha, O., Goncalves, C., Ferreira, A., & Ferreira E. C. (2009). Application of Image analysis to the prediction of EBC barley kernel weight. Industrial Crops and Products, 30(3), 366-371.; Chen et al., 2010Chen, X., Xun, Y., Li, W., & Zhang, J. (2010). Combining discriminant analysis and neural networks for corn variety identification. Computers and Electronics in Agriculture, 71, 48-53.; Wiwart et al., 2012Wiwart, M., Suchowilska, E., Lajszner, W., & Graban, Ł. (2012). Identification of hybrids of spelt and wheat and their parental forms using shape and color descriptors. Computers and Electronics in Agriculture , 83, 68-76.). After getting the boundary of the selected region, properties such as area, perimeter, major and minor axis length etc., can be determined (Liu et al., 2005Liu, Z. Y., Cheng, F., Ying, Y. B., & Rao, X. Q. (2005). Identification of rice seed varieties using neural network. Journal of Zhejiang University. Science. B, 6(11), 1095-1100.).

a) The major axis length of the cashew kernel is the length (in pixels) of the major axis of the ellipse that has the same normalized second central moments as the region, while the minor axis length is the length (in pixels) of the minor axis of the ellipse that has the same normalized second central moments as the region. However, the property of major and minor axis length are only supported for a 2-D image input. The major and minor axis length can represent the actual length (L) and width (W) as well as thickness (T) of a cashew kernel.

b) The area (A) of a region is defined as the actual number of pixels contained within its boundary.

c) The perimeter (P) is the contour length of the boundary.

d) Equivalent Diameter (Equation 1): It is the diameter of a circle with the same area as the cashew kernel region.

e)The Aspect ratio is computed by Equation 2

f) Convex area (C): It is the number of pixels in the smallest convex polygon that can contain the cashew kernel region.

g) Solidity(S): The proportion of the pixels in the cashew kernel region are also in the convex hull and computed as Equation 3:

h) Extent (Ex): The proportion of the pixels in the bounding box which are also in the cashew kernel region.

i) Eccentricity(E): the eccentricity of the ellipse that has the same second-moments as the cashew kernel region. The eccentricity is the ratio of the distance between the foci of the ellipse and its major axis length. The value is between 0 and 1.

j) Roundness (R )= This is given by Equation 4:

k) Compactness (CO): The compactness provides a measure of the object's (i.e. cashew kernel) roundness, according Equation 5.

Shape

From the values of major and minor axis length, and area shape factors were derived (Symons & Fulcher, 1988Symons, S. J., & Fulcher, R. G. (1988). Determination of wheat kernel morphological variation by digital image analysis, I Variation in eastern Canadian milling quality wheats. Journal of Cereal Science, 8(3), 211-218.), are as Equation 6, 7, 8 and 9.

Color

Color provides the basic information for human perception. Color is also elementary information that is stored in pixels to constitute a digital image. Hence color is considered to be one of the most prominent features for object measurements, image understanding and object description (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.).

In cashew Industry, color is one of the prominent quality traits of cashew kernels grading by trained labours. So color is playing important role in the cashew kernels grading process (Dhakshinamurthy & Kokila, 2013Dhakshinamurthy, B., & Kokila, J. R. L. (2013). Performance valuation high speed color sorter for cashew kernels. Acta Agrophysica, 20(4), 543-553.). In this research, we are making an attempt to use this color information primarily for analysis and grading of cashew kernels using digital image processing technique.

A color space is a method of representing each color in terms of combination of several numeric values. It is a method by which we can specify, create and visualize multiple color. Different color spaces are better for different applications (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.). In this approach, we have used different color spaces (i.e. RGB, and HCL), in order to obtain the following color features from a given cashew kernel image.

a) Luminance: Luminance describes the 'achromatic' component of an image. In general, Luminance represents the brightness of an image (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.).

b) Chrominance: Chrominance is the color information of an image, separately from the accompanying luminance. Chrominance is usually represented as two color-difference components (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.).

RGB color space

RGB color space is an additive color space based on RGB color model. A particular RGB color space is defined by three chromaticities of red, green, and blue additive primaries, and can produce any chromaticity that is the triangle defined by those primary colors. The image is represented in RGB color as a primary color model. The three-dimensional color spaces are normally discretised to 256 levels per axis, which gives over 1.67 million distinct colors (Du & Sun, 2005Du, C. J., & Sun, D. W. (2005). Comparison of three methods for classification of pizza topping using different color space transformations. Journal of Food Engineering , 68(3), 277-287.).

In this study, we have proposed that, (1) First we separate the R, G and B components from a given cashew kernel image. (2) From the R, G and B components, we were extracted the luminance-chrominance by using following Equation 10, 11 and 12.

(1) Luminance (Luma or L for short) is formed as a weighted sum of linear RGB components (International Telecommunication Union, 2002International Telecommunication Union. (2002). Recommendation ITU-R BT.709-5. Parameter values for the HDTV standards for production and international programme exchange. ITU Radiocommunication. Retrieved from https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-S!!PDF-E.pdf
https://www.itu.int/dms_pubrec/itu-r/rec...
).

(2) Chrominance (chroma or C for short): Chrominance is usually represented as two color-difference components (International Telecommunication Union, 2002International Telecommunication Union. (2002). Recommendation ITU-R BT.709-5. Parameter values for the HDTV standards for production and international programme exchange. ITU Radiocommunication. Retrieved from https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-S!!PDF-E.pdf
https://www.itu.int/dms_pubrec/itu-r/rec...
):

(3) Also we have measured the hue angle ( H 0 ) from the following Equation 13 (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.).

where:

F = (2*R-G-B)/(G-B)

(4) Finally, we have measured color distance metric by using following Equation 14 (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.).

HCL (Hue, Chrominance and Luminance) color space

In this, we investigates color pixel similarity analysis on a new perceptually uniform color space that we call HCL (Hue, Chroma and Luminance). Such a new color space exploits the advantages of each one of the color spaces: HSL and L*a*b* and discards their drawbacks.

We assume that the chroma and the hue of any color can be defined as a blend of the three chrominance elemental sensations: R-G (from red to green), G-B (from green to blue) and B-R (from blue to red). Based on this assumption and the Munsell color system with the three color attributes closed to human perceptions: hue (H), chroma (C) and luminance (L), we define below a mapping from RGB space to HCL space (Sarifuddin & Missaoui, 2005Sarifuddin, M., & Missaoui, R. (2005). A new perceptually uniform color space with associated color similarity measure for content-based image and video retrieval (p, 1-8). In Workshop on multimedia information retrieval. Retrieved from https://www.researchgate.net/profile/Sarifuddin_Madenda/publication/228906385_A_new_perceptually_uniform_color_space_with_associated_color_similarity_measure_for_content-based_image_and_video_retrieval/links/562a20a308ae04c2aeb1551a.pdf
https://www.researchgate.net/profile/Sar...
).

We recall that a color containing a lot of white is brighter than one with less white. A saturated color contains 0% of white and has a maximum value of chroma. An increasing value of white leads to a decreasing value of chroma and a less saturated color. Concretely, a color is saturated if Max (R, G, B) is equal to R, G, or B, and Min (R, G, B) = 0. The saturation of a color is null (i.e., chroma = 0) when Min (R, G, B) = Max (R, G, B). Therefore, we will use the expressions Max (R, G, B) and Min (R, G, B) to compute luminance L (Sarifuddin & Missaoui, 2005Sarifuddin, M., & Missaoui, R. (2005). A new perceptually uniform color space with associated color similarity measure for content-based image and video retrieval (p, 1-8). In Workshop on multimedia information retrieval. Retrieved from https://www.researchgate.net/profile/Sarifuddin_Madenda/publication/228906385_A_new_perceptually_uniform_color_space_with_associated_color_similarity_measure_for_content-based_image_and_video_retrieval/links/562a20a308ae04c2aeb1551a.pdf
https://www.researchgate.net/profile/Sar...
).

Color spaces YIQ, YUV, YCrCb, L*u*v* and L*a*b* express Y by Y = 0.299R + 0.587G + 0.114B, whereas color spaces like HSI, HSV, and HSL use Y = I = (R + G + B)/ 3, Y = L = Max (R, G, B) and Y = L = [Max (R, G, B) + Min (R, G, B)]/ 2 respectively.

We define luminance L as a linear combination of Max (R, G, B) and Min (R, G, B) as Equation 15:

where:

Q = eαγ is a parameter that allows a tuning of the variation of luminosity between a saturated hue (color) and a hue containing a great amount of white, with α = (Min (R, G, B)/ Max (R, G, B), 1/ Y0) and Y0 = 100.

γ is a correction factor whose value (= 3) coincides with the one used in L*a*b* space. It should be noted that when Min (R, G, B) = 0 and Max (R, G, B) varies between 0 and 255, luminance L takes a value between 0 (black) and 128. When Max (R, G, B) = 255 and in (R, G, B) varies between 0 and 255, luminance takes a value between 128 and 135 (Sarifuddin & Missaoui, 2005Sarifuddin, M., & Missaoui, R. (2005). A new perceptually uniform color space with associated color similarity measure for content-based image and video retrieval (p, 1-8). In Workshop on multimedia information retrieval. Retrieved from https://www.researchgate.net/profile/Sarifuddin_Madenda/publication/228906385_A_new_perceptually_uniform_color_space_with_associated_color_similarity_measure_for_content-based_image_and_video_retrieval/links/562a20a308ae04c2aeb1551a.pdf
https://www.researchgate.net/profile/Sar...
).

In a similar way, we define chroma C = Q.Cn, where Cn represents a mixture of three different combinations of R, G, and B components: red-green, green-blue and blue-red. (Sarifuddin & Missaoui, 2005Sarifuddin, M., & Missaoui, R. (2005). A new perceptually uniform color space with associated color similarity measure for content-based image and video retrieval (p, 1-8). In Workshop on multimedia information retrieval. Retrieved from https://www.researchgate.net/profile/Sarifuddin_Madenda/publication/228906385_A_new_perceptually_uniform_color_space_with_associated_color_similarity_measure_for_content-based_image_and_video_retrieval/links/562a20a308ae04c2aeb1551a.pdf
https://www.researchgate.net/profile/Sar...
), according Equation 16.

The hue value can be computed using the following Equation 17:

However, hue values (Equation 18) vary between −900 and +900 only. To allow hue values to vary in a larger interval going from −1800 to 1800:

Or Equation 19 and 20:

Statistical analysis

After features extraction, we have done a statistical analysis of cashew kernel image of white wholes grade using various measures like mean, variance and standard deviation. The color images are recognized by quantifying the distribution of color components throughout the image, change in the each color component with reference to average/ mean and difference between the highest and the lowest color values. This quantification is obtained by computing Mean, Variance, Standard Deviation and Range for a given color image. Since these features represent global characteristics for an image, we have adopted Mean, Variance, Standard Deviation and Range color features in this work. The Equation 21, 22, 23 and 24 are used to evaluate Mean, Variance, Standard Deviation and Range of the image samples (Savakar & Anami, 2009Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruits and flowers using machine vision. International Journal of Food Engineering , 5(4), 14-34.; Ganganagowdar, & Siddaramappa, 2014Ganganagowdar, N. V., & Siddaramappa, H. K. (2014). Computer Vision System to Estimate cashew kernel (White wholes) grade Geometric and Color parameters. Electronic Journal of Polish Agricultural Universities, 17(4), 1-28.).

Mean: The overall brightness of each color component of an image is measured using the mean. This is calculated by Equation 1 of each color component of an image (Savakar & Anami, 2009Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruits and flowers using machine vision. International Journal of Food Engineering , 5(4), 14-34.; Ganganagowdar, & Siddaramappa, 2014Ganganagowdar, N. V., & Siddaramappa, H. K. (2014). Computer Vision System to Estimate cashew kernel (White wholes) grade Geometric and Color parameters. Electronic Journal of Polish Agricultural Universities, 17(4), 1-28.).

Variance and Standard Deviation: The variance is a measure of how far perceived brightness is spread out of each color component in an image. The Standard Deviation is the average distance from the mean of the overall perceived brightness and contrast of each color component in a cashew kernel image (Savakar & Anami, 2009Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruits and flowers using machine vision. International Journal of Food Engineering , 5(4), 14-34.; Ganganagowdar, & Siddaramappa, 2014Ganganagowdar, N. V., & Siddaramappa, H. K. (2014). Computer Vision System to Estimate cashew kernel (White wholes) grade Geometric and Color parameters. Electronic Journal of Polish Agricultural Universities, 17(4), 1-28.).

Range: This gives us the range of maximum and minimum perceived brightness of each color component in an image (Savakar & Anami, 2009Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruits and flowers using machine vision. International Journal of Food Engineering , 5(4), 14-34.; Ganganagowdar, & Siddaramappa, 2014Ganganagowdar, N. V., & Siddaramappa, H. K. (2014). Computer Vision System to Estimate cashew kernel (White wholes) grade Geometric and Color parameters. Electronic Journal of Polish Agricultural Universities, 17(4), 1-28.).

The proposed methods

a) Algorithm 01: Determine the Morphological features of a cashew kernel (Amaral et al., 2009Amaral, L. A. , Rocha, O., Goncalves, C., Ferreira, A., & Ferreira E. C. (2009). Application of Image analysis to the prediction of EBC barley kernel weight. Industrial Crops and Products, 30(3), 366-371.; Chen et al., 2010Chen, X., Xun, Y., Li, W., & Zhang, J. (2010). Combining discriminant analysis and neural networks for corn variety identification. Computers and Electronics in Agriculture, 71, 48-53.; Wiwart et al., 2012Wiwart, M., Suchowilska, E., Lajszner, W., & Graban, Ł. (2012). Identification of hybrids of spelt and wheat and their parental forms using shape and color descriptors. Computers and Electronics in Agriculture , 83, 68-76.; Ganganagowdar et al., 2012Ganganagowdar, N. V., Shetty, D. K., & Siddaramappa, H. K. (2012). Computer Vision system for cashew kernel area estimation (p. 1-6). In Third International Conference on Computing Communication & Networking Technologies, Coimbatore, India: IEEE. doi: 10.1109/ICCCNT.2012.6395942
https://doi.org/10.1109/ICCCNT.2012.6395...
).

Input: Original 24-bit cashew kernel color image.

Output: 16 Morphological Features

Start

Step 1: Read the image of resolution 640 x 480 pixels.

Step 2: Crop and resize the image.

Step 3: Segment the color of image by using OTSU method.

Step 4: Convert RGB to grayscale image.

Step 5: Remove the noise from image using Median filter (Remove the noise).

Step 6: Binarize the image using Otsu Method.

Step 7: Find the Boundaries.

Step 8: Determine the Geometric properties like major-axis length (L), minor-axis length (W as well as T), Area (A), Perimeter (P), Equivalent diameter (Eq), Convex area (C), Solidity (S), Eccentricity (E), Extent (Ex), Aspect ratio (K), Roundness (R) and Compactness (Co) (Amaral et al., 2009Amaral, L. A. , Rocha, O., Goncalves, C., Ferreira, A., & Ferreira E. C. (2009). Application of Image analysis to the prediction of EBC barley kernel weight. Industrial Crops and Products, 30(3), 366-371.; Chen et al., 2010Chen, X., Xun, Y., Li, W., & Zhang, J. (2010). Combining discriminant analysis and neural networks for corn variety identification. Computers and Electronics in Agriculture, 71, 48-53.; Wiwart et al., 2012Wiwart, M., Suchowilska, E., Lajszner, W., & Graban, Ł. (2012). Identification of hybrids of spelt and wheat and their parental forms using shape and color descriptors. Computers and Electronics in Agriculture , 83, 68-76.) of a cashew kernel of white wholes grade from a cashew kernel image using Equation 1, 2, 3, 4 and 5.

Step 9: Determine the Shape properties SF1, SF2, SF3 and SF4 (Amaral et al., 2009Amaral, L. A. , Rocha, O., Goncalves, C., Ferreira, A., & Ferreira E. C. (2009). Application of Image analysis to the prediction of EBC barley kernel weight. Industrial Crops and Products, 30(3), 366-371.; Chen et al., 2010Chen, X., Xun, Y., Li, W., & Zhang, J. (2010). Combining discriminant analysis and neural networks for corn variety identification. Computers and Electronics in Agriculture, 71, 48-53.; Wiwart et al., 2012Wiwart, M., Suchowilska, E., Lajszner, W., & Graban, Ł. (2012). Identification of hybrids of spelt and wheat and their parental forms using shape and color descriptors. Computers and Electronics in Agriculture , 83, 68-76.) of a cashew kernel of white wholes grade from a cashew kernel image using Equation 6, 7, 8 and 9.

Stop

We have extracted the 16 Morphological features by using algorithm 1 and all the features are listed in Table 3.

Table 3
Extracted morphological features of individual cashew kernel.

b) The following algorithm 02 involved in obtaining the 24 color features (Savakar & Anami, 2009Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruits and flowers using machine vision. International Journal of Food Engineering , 5(4), 14-34.; Ganganagowdar, & Siddaramappa, 2011Ganganagowdar, N. V., & Siddaramappa, H. K. (2011). Cashew kernels classification using color features. International Journal of Machine Intelligence, 3(2), 52-57.; Ganganagowdar, & Siddaramappa, 2014).

Algorithm 02: RGB and HCL Color features extraction from a cashew kernel image. Input: Original 24-bit cashew kernel color image.

Output: 24 color features.

Start

Step 1: Read the image of resolution 640 x 480 pixels.

Step 2: Crop and resize the image.

Step 3: Segment the color of image using OTSU method.

Step 4: Separate the RGB components from the image.

Step 5: Compute Mean, Variance, Standard deviation and Range for each RGB components, using the Equation 21, 22, 23 and 24.

Step 6: Compute Luminance, Chrominance, Hue angle(H) and Color distance metric (ΔERGB) for cashew kernel image from RGB components using the Equation 10, 11, 12, 13 and 14.

Step 7: Obtain the HCL components from RGB components using the Equation 15, 16, 17, 18 and 19.

Step 8: Compute Mean, Variance, Standard Deviation and Range from HCL components using the Equation 21, 22, 23 and 24.

Step 9: Compute Color distance metric (ΔEHCL) for cashew kernel image from HCL components using the Equation 20.

Stop

We have extracted 24 color features by using the algorithm 02 and all the features are listed in Table 4.

Features selection

Feature selection can be defined as a process that chooses a minimum subset of M features from the original set of N features. Feature selection reduces the dimensionality of feature space, removes redundant, irrelevant, or noisy data (Novaković et al., 2011Novaković, J., Strbac, P., & Bulatović, D. (2011). Toward optimal feature selection using ranking methods and classification algorithms. Yugoslav Journal of Operations Research, 21(1), 119-135.). In many classification problems, it is difficult to learn good classifiers before removing the unwanted features due to the huge size of the data.

Table 4
Extracted color features of individual cashew kernel.

Reducing the number of irrelevant/redundant features can drastically reduce the running time of the learning algorithms and yields a more generic classifier. This helps in getting a better insight into the underlying concept of a real-world classification problem. We have obtained features subset using Sequential Floating Forward Selection (SFFS) algorithm with classification rate (CCR) of minimum: 0.70 and maximum: 0.99, from both morphological and color features. The feature subsets obtained are (L, W, A, Eq, C, S, E, SF1) and (μR, rangeR, σB, rangeB, Cr, Cb, 𝐻 0 , ΔERGB, μH, σC, rangeC, rangeL, ΔEHCL).

Recognition and classification

In this, the MLP neural network with back propagation is established under Matlab (2012Matlab (2012). The MathWorks, Inc., Natick, Massachusetts, United States) environment to train the training set. The training and testing set are normalized using the formula xi = (xi - μx)/ σx, where xi is a feature (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.). There were 750 training data set and 150 test data set, for each white wholes grade and, set includes eight morphological features (L, W, A, Eq, C, S, E, SF1) and thirteen color features (μR, rangeR, σB, rangeB, Cr, Cb, 𝐻 0 , ΔERGB, μH, σC, rangeC, rangeL, ΔEHCL). The network structure consists of three layers. The number of nodes of input layer (Ni) is the number of input parameters, and therefore, the number of nodes are 21. We tested the four white wholes grades at the same time, and therefore, the number of nodes of the output layer (No) is 4. The number of nodes in the hidden layer (Nh) were calculated using the Equation Nh = Ni+ No (Sun, 2008).

Results and discussion

Morphological features

We have estimated morphological features of the white wholes grades cashew kernel such as length, width, equivalent diameter, area, convex area, eccentricity etc. in pixel counts using proposed algorithm 1 and the clustered column chart is used to compare average values across cashew kernel grades as shown in Figure 4. We observed that, there is a distinct differences between WW-180, WW-210, WW-240 and WW-320 cashew kernels grades in terms of length (186.5, 166.2, 162.3 and 147.7), width (101, 92.8, 90.4 and 83.8), equivalent diameter (124.4, 113.7, 111 and 103), area (12188.7, 10164.4, 9716.5 and 8356) and convex area (14688.7, 12035, 11488 and 9822.4).

Figure 4
The Clustered column chart for White wholes grades.

Color features

RGB

Features are relating to the color of the entire cashew kernel were extracted from the cashew kernel image. The white whole cashew kernel grade color was characterized by the means (μR, μG, μB), standard deviations (σR, σG, σB) and range of the red, green and blue color components We were measured the luminance and chrominance from cashew kernel image representing the amount of brightness and contrast (Sun, 2008Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.). Also we were extracted the hue angle (H°) from cashew kernel image. Features representing the amount of color and spatial distribution of particular white wholes grade were extracted from the cashew kernel image, using the algorithm 2 and summarized RGB color features are listed in Table 5. The average hue angle of particular white wholes grade ranged from green to blue are shown in Figure 5c. And also average color distance metric as well as average Cr and Cb are shown in Figure 5b and a. Some of the observations noted empirically are listed in Table 5.

Table 5
The RGB color space summary of white wholes grades cashew kernel.

Figure 5
Clustered column bar chart for white wholes cashew kernel grades.

HCL

The features are relating to HCL color coordinates: Hue (H), Chroma (C) and Luminance (L). The color features of the white whole cashew kernel grades was

measured by using the algorithm 2 and listed in the Table 6. From the color features set, we have observed that, some of features are contributing more. The features are hue (refer Table 6 and Figure 6a and b), chroma, (refer Table 6 and Figure 6c), luminance (refer Table 6 and Figure 6d) and color distance metric (ΔEHCL) (refer Table 6).

The average color feature of HCL features are as follows.

i) The Hue angle of WW cashew kernel grades (w-180, w-210, w-240, w-320) are (12°, 11°, 21°, 19°).

ii) The Luminance of WW cashew kernel grades (w-180, w-210, w-240, w-320) are (103, 99, 89, 102).

iii) The color difference metric values of WW cashew kernel grades (w-180, w-210, w-240, w-320) are (21.24, 21.14, 31.3, 21).

Figure 6
HCL components of white wholes grades cashew kernel.

Table 6
Summarized values of HCL color features.

Recognition and classification

The proposed method is implemented using Intel (R) Core (TM) i5-3230M Laptop with 4GB RAM and 2.60 GHz CPU. We applied a MLP neural network of learning rate:0.3, momentum:0.2, no of epochs: 500, Error: 0.001 and sigmoid activation function with 2 hidden layers. The input layer of the ANN has 21 neurons because the data set contains 21 parameters and the output layer of ANN has 4 neurons. We trained a network with total samples of random manner were 2480 (WW-180:615; WW-210:675; WW-240:630 and WW-320:560) and tested the four grades of white wholes (see Table 8 and 9). The MLP neural network model 21-25-25-4 were evaluated (see Table 7).

Table 7
Recognition accuracy of white wholes grades cashew kernel.

Table 8
Confusion matrix of trained the neural network model (21 - 25 - 25 - 4).

Table 9
Tested result of white wholes grades cashew kernel with neural network model (21 - 25 - 25 - 4).

Conclusion

Following conclusion were drawn from the study.

i) According to the characteristics of the images, extract morphological and color characteristic parameters as the recognition bases; the color characteristic parameters are more significant to the white wholes grades of cashew kernels.

ii) Recognizing and testing the four (WW-180, WW-210, WW-240 and WW-320) cashew kernels grades, and the results show that the accuracy

rate of comprehensive recognition reaches 88.93%, which indicates that the method is feasible and the study provides a theoretical and practical basis for follow-up studies.

Acknowledgements

The author would like to thank the Zonal Agricultural Research Station, Brahmavar, Udupi Taluka, Udupi District. Karnataka State and Directorate of Cashew Research Puttur, Mangalore, Karnataka for provided the information about cashew kernels grading.

References

  • Amaral, L. A. , Rocha, O., Goncalves, C., Ferreira, A., & Ferreira E. C. (2009). Application of Image analysis to the prediction of EBC barley kernel weight. Industrial Crops and Products, 30(3), 366-371.
  • Balasubramanian, D. (2001). Physical properties of raw Cashew nut. Journal of Agricultural Engineering and Research, 78(3), 291-297.
  • Cashew Export Promotion Council of India (CEPCI). (2013). Cashew kernels. Kollam, Kerala: Government of India. Retrieved from http://www.cepci.org
    » http://www.cepci.org
  • Castelo-Quispe, S., Banda-Tapia, J. D., Lopez-Paredes, Ḿ. N., Barrios-Araniba, D., & Patino-Escarcin, R. (2013). Optimization of Brazil-nuts classification process through automation using color spaces in computer vision. International Journal of Computer Information Systems and Industrial Management Applications, 5(1), 623-630.
  • Chen, H., Wang, J., Yuan, Q., & Wan, P. (2011). Quality classification of peanuts based on image processing. Journal of Food, Agriculture and Environment, 9(3-4), 205-209.
  • Chen, X., Xun, Y., Li, W., & Zhang, J. (2010). Combining discriminant analysis and neural networks for corn variety identification. Computers and Electronics in Agriculture, 71, 48-53.
  • Dhakshinamurthy, B., & Kokila, J. R. L. (2013). Performance valuation high speed color sorter for cashew kernels. Acta Agrophysica, 20(4), 543-553.
  • Du, C. J., & Sun, D. W. (2005). Comparison of three methods for classification of pizza topping using different color space transformations. Journal of Food Engineering , 68(3), 277-287.
  • Ganganagowdar, N. V., & Siddaramappa, H. K. (2011). Cashew kernels classification using color features. International Journal of Machine Intelligence, 3(2), 52-57.
  • Ganganagowdar, N. V., & Siddaramappa, H. K. (2014). Computer Vision System to Estimate cashew kernel (White wholes) grade Geometric and Color parameters. Electronic Journal of Polish Agricultural Universities, 17(4), 1-28.
  • Ganganagowdar, N. V., Shetty, D. K., & Siddaramappa, H. K. (2012). Computer Vision system for cashew kernel area estimation (p. 1-6). In Third International Conference on Computing Communication & Networking Technologies, Coimbatore, India: IEEE. doi: 10.1109/ICCCNT.2012.6395942
    » https://doi.org/10.1109/ICCCNT.2012.6395942
  • International Telecommunication Union. (2002). Recommendation ITU-R BT.709-5. Parameter values for the HDTV standards for production and international programme exchange. ITU Radiocommunication. Retrieved from https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-S!!PDF-E.pdf
    » https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-S!!PDF-E.pdf
  • Kumar, J. A., Rao, P. R., & Desai, A. R. (2013). Cashew kernel classification using machine learning approaches. Journal of the Indian Society of Agricultural Statistics, 67(1), 121-129.
  • Kumar, M., Bora, G., & Lin, D. (2013). Image processing technique to estimate geometric parameters and volume of selected dry beans. Journal of Food Measurement and Characterization, 7(2), 81-89.
  • Liu, Z. Y., Cheng, F., Ying, Y. B., & Rao, X. Q. (2005). Identification of rice seed varieties using neural network. Journal of Zhejiang University. Science. B, 6(11), 1095-1100.
  • Matlab (2012). The MathWorks, Inc., Natick, Massachusetts, United States
  • Mendoza, F., Dejmek, P., & Aguilera, J. M. (2006). Calibrated color measurements of agricultural foods using image analysis. Post Biology and Technology, 41: 285-295.
  • Namias, R., Gallo, C., Craviotto, R. M., Arango, M. R., & Granitto, P. M. (2012). Automatic grading of green intensity in soybean seeds (p. 96-104). In 13th Argentine Symposium on Artificial Intelligence. Buenos Aires, ARG.
  • Novaković, J., Strbac, P., & Bulatović, D. (2011). Toward optimal feature selection using ranking methods and classification algorithms. Yugoslav Journal of Operations Research, 21(1), 119-135.
  • Sarifuddin, M., & Missaoui, R. (2005). A new perceptually uniform color space with associated color similarity measure for content-based image and video retrieval (p, 1-8). In Workshop on multimedia information retrieval. Retrieved from https://www.researchgate.net/profile/Sarifuddin_Madenda/publication/228906385_A_new_perceptually_uniform_color_space_with_associated_color_similarity_measure_for_content-based_image_and_video_retrieval/links/562a20a308ae04c2aeb1551a.pdf
    » https://www.researchgate.net/profile/Sarifuddin_Madenda/publication/228906385_A_new_perceptually_uniform_color_space_with_associated_color_similarity_measure_for_content-based_image_and_video_retrieval/links/562a20a308ae04c2aeb1551a.pdf
  • Saroj, P. L., & Balasubramanian, D. (2013). Cashew Industry in India-a sustainable road map. Indian Horticultue, 58(1), 9-15.
  • Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruits and flowers using machine vision. International Journal of Food Engineering , 5(4), 14-34.
  • Soedibyo, D. W., Seminar, K. B., Ahmad, U., Subrata, I. D. M. (2010). The Development of Automatic Coffee Sorting System Based on Image Processing and Artificial Neural Network. Bogor: Asian Federation for Information Technology.
  • Sun, D. W. (2008). Computer vision technology for food quality evaluation. Food Science and Technology, International Series, 63-70.
  • Symons, S. J., & Fulcher, R. G. (1988). Determination of wheat kernel morphological variation by digital image analysis, I Variation in eastern Canadian milling quality wheats. Journal of Cereal Science, 8(3), 211-218.
  • Thakkar, M., Bhatt, M., & Bhensdadia, C. K. (2011). Performance evaluation of classification techniques for computer vision based cashew grading system. International Journal of Computer Applications, 18(6), 9-12.
  • Wiwart, M., Suchowilska, E., Lajszner, W., & Graban, Ł. (2012). Identification of hybrids of spelt and wheat and their parental forms using shape and color descriptors. Computers and Electronics in Agriculture , 83, 68-76.
  • Zheng, C., Sun, D. W., & Zheng, L. (2006). Recent developments and applications of image features for food quality evaluation and inspection-a review. Trends in Food Science & Technology, 17(12), 642-655.

Publication Dates

  • Publication in this collection
    June 2016

History

  • Received
    19 May 2015
  • Accepted
    24 Aug 2015
Editora da Universidade Estadual de Maringá - EDUEM Av. Colombo, 5790, bloco 40, 87020-900 - Maringá PR/ Brasil, Tel.: (55 44) 3011-4253, Fax: (55 44) 3011-1392 - Maringá - PR - Brazil
E-mail: actaagron@uem.br