You are on page 1of 26

FUZZY LOGIC BASED COMPUTER VISION SYSTEM FOR CLASSIFICATION OF WHOLE CASHEW KERNEL

Prepared By: Mayur Thakkar

OBJECTIVE

The aim of this research work is to develop an intelligent computer vision system using fuzzy logic, for the classification (grading) of the whole cashew kernel that can have potential to eliminate inefficient manual grading and inspection approach.

EXISTING GRADING APPROACHES

Existing methods to grade the whole cashew kernel are:


Manual Mechanical

PROPOSED GRADING SYSTEM


Computer Vision System
Computer Vision System is consists of: Two digital cameras Computer hardware Image processing and analysis software Fluorescent lamp.

SCOPE OF THE SYSTEM


The Cashew classification system will be able to: Reduce the processing cost Maintain product uniformity 24 hour processing Full control of grading operation

WHOLE CASHEW GRADING SPECIFICATION


Cashew grading standard have been designed by considering the color and the weight of the cashew kernel as important characteristic. Therefore, in this system color and morphological features (length, width, thickness) are considered as important features to classify the whole cashew kernels based on their grades.

CASHEW GRADING SPECIFICATION

COLOR BASED SPECIFICATION


Cashew Kernel Type
White Whole(W)
Scorched Whole(SW)

Color Characteristic
Cashew kernels shall be white in color and free from damage. Cashew kernels shall be light brown in color and free from damage. Cashew kernels shall be dark brown in color, it may show deep black spot and free from damage.

Dessert Whole(DW)

CASHEW GRADING SPECIFICATION

WHOLE CASHEW KERNEL

WHITE WHOLE
Fig. 1

SCORCHED WHOLE

DESSERT WHOLE

Color characteristics of the whole cashew kernel

CASHEW GRADING SPECIFICATION

WEIGHT BASED SPECIFICATION


Cashew Kernel Grade
W180 W210 W240 W280 W320 W400 W450 W500 Scorched whole cashew kernel SW180 SW210 SW240 SW280 SW320 SW400 SW450 SW500 Dessert whole cashew kernel DW No sepcification 170-180 200-210 220-240 260-280 300-320 350-400 400-450 450-450

Number of Kernels Per 454 gm.(pound)


170-180 200-210 220-240 260-280 300-320 350-400 400-450 450-450

White whole cashew kernel

PROPOSED SOLUTION

SYSTEM ARCHITECTURE
System Architecture of proposed System is as

shown below:

Fig. 2 System Architecture of Cashew Classification System

RGB Image Acquisition


PROPOSED SOLUTION

In this phase, two different RGB front and top view images of the each cashew kernel under investigation are acquired as shown below:

Fig. 3 RGB Front and Top View Images

Preprocessing
PROPOSED SOLUTION

Preprocessing phase smoothes the image using 3x3 average filter to handle the distortion.

Fig. 4 Preprocessing and Segmentation Process

Segmentation
PROPOSED SOLUTION

Because of the black background in the image, the histogram of this image is always bimodal as shown in Fig.6. Therefore threshold segmentation technique is used which differentiate the cashew kernel region from background and convert the gray scale image into the binary image as shown in Fig. 7.

Fig. 5 Bimodal Histogram

Fig. 6 Binary images of cashew kernel

Feature Extraction
PROPOSED SOLUTION
Color

Extraction:

Information

To extract color information, RGB image is converted to gray-scale image, then the average intensity of the pixels that belongs to the cashew part in the gray-scale image is determined and this intensity value will be used to classify the cashew kernel based on the color.

Feature Extraction
PROPOSED SOLUTION

Weight (Size) Information Extraction:


To estimate the weight of the cashew kernel, quantitative information of the morphological features like Length(L), Width(W) and Thickness(T) are considered important and extracted by dividing the cashew kernel region in the binary image, in n samples as shown in Fig.8 and taking average of these sample using equations as shown below.

(a)

(b)

(c)

Fig. 7 Morphological feature extraction of whole cashew kernel

Feature Extraction
PROPOSED SOLUTION

Weight Information Extraction:


(1) (2) (3) n

Length (L) = L1+L2+ . +Ln-1+Ln Width (W) = W1+W2+ . +Wn-1+Wn n Thickness (T) = T1+T2+ . +Tn-1+Tn n
Because

of the irregular shape of the cashew kernel, for better accuracy in the calculation of these features, sampling strategy has been employed.

Classification
PROPOSED SOLUTION

In order to decide the grade of the whole cashew kernel, in the proposed system two level of classification has been employed.
Color based Classification Weight based classification

Color Based Classification


PROPOSED SOLUTION

Based on the color information, cashew kernel is classified as whether it is white whole, scorched whole or dessert whole.

Weight Based Classification


PROPOSED SOLUTION

In second level of classification, Fuzzy Inference System (FIS) is designed to estimate the weight of the cashew kernel.

Fig. 8 Block Diagram of FIS

Weight Based Classification


PROPOSED SOLUTION
Fuzzy Inference System:
1. Fuzzification

Fig. 9 Fuzzification of Input and Output variables

Weight Based Classification


PROPOSED SOLUTION
Fuzzy Inference System:
2. Fuzzy Rules 3. Rule Aggregation 4. Defuzzification

Fig.10 Rule Aggregation and Defuzzification

Final Grading
PROPOSED SOLUTION
Finally, the grade of the

cashew is decided based on the result of these two classifications.


COLOR
White(W) Scorched(SW) DESSERT

WEIGHT
240 240 240

FINAL GRADE
W240 SW240 DW

CONCLUSION
Inspection

and grading of the whole cashew kernels using computer vision is an alternative to manual and mechanical method which has the potential to automate manual grading practices thus standardizing techniques and eliminating tedious human inspection tasks.

REFERENCES
*1+ Balasubramanian, D. (2001). Physical properties of raw cashew nut. Journal of agricultural Engineering Research, 78(3), 291-297. *2+ B.S. Ogunsina, A.I. Bamgboye (2007), Effects of pre-shelling treatment on the physical properties of cashew nut. *3+ Ghazanfari, A., Moghaddam. (1996). Machine vision classification of pistachio nuts using pattern recognition and neural network. [4] Seyed M.A.Razzavi, M.Maazaherinasab, F.Nickfar, H. Sanacefard, (2007) Physical properties and image analysis of wild pistachio nut. *5+ Brosnan, T., and Sun, D. W. (2004). Improving quality inspection of food products by computer vision, Journal of Food Engineering, 61, 3-16. *6+ A. Ghazanfari, J. Irudayaraj and A. Kusalik, 1996b. Grading pistachio nuts using a neural networks approach. *7+ K. Tanaka, An Introduction to Fuzzy Logic for Practical Applications.Springer, 1997. *8+ Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Prentice-Hall International, 2002. [9] MATLAB documentation on Image Processing Toolbox. www.mathworks.com. [10] Kerala State Cashew Development Corporation. www.cashewcorporation.com

Thank You

You might also like