ISSN ONLINE(2278-8875) PRINT (2320-3765)

All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

IDENTIFYING THE QUALITY OF TOMATOES IN IMAGE PROCESSING USING MATLAB

R.Kalaivani1, Dr.S. Muruganand2 and Dr.Azha.Periasamy2
  1. M.Phil Scholar, Dept. of Electronics and Instrumentation, Bharathiar University, Coimbatore, TN, India
  2. Assistant Professor, Dept. of Electronics and Instrumentation, Bharathiar University, Coimbatore, India
Related article at Pubmed, Scholar Google

Visit for more related articles at International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering

Abstract

The ability to identify the tomatoes based on quality in the food industry which is the most important technology in the realization of automatic tomato sorting machine in order to reduce the work of human and also time consuming. This work presents a hierarchical grading method applied to the tomatoes. In this work the identification of good and bad tomatoes is focused on the methods using MATLAB. First we extract certain features from the input tomato image, later using different method like thresholding, segmentation, k-means clustering and thus we get related databases. Comparing several trained databases, we get a specific range for the good and bad tomatoes. From the proposed range we can identify the good and bad tomatoes. Thus this paper analysis the good and bad tomatoes with a very high accuracy successfully using image processing.

Keywords

Image Acquisition, Pre-processing, Segmentation, feature extraction, feature training, feature matching.

INTRODUCTION

Tomato is grown for their edible fruit which has many vitamins and beneficial nutrients. Tomatoes, commonly consumed in daily diets, are a major source of antioxidants (sgherri et al.,2008). They are a seasonal crop and their availability is limited during certain seasons (Rodriguez-Lafuente et al.,2010).Tomatoes find numerous uses in both fresh and processed forms. Processed forms include ketch up, sauces, paste and juice. Export of these processed products of tomatoes yield more income for country. In order to get good quality of processed products the quality of tomatoes should be good. Moreover high labour cost for identifying good and bad tomatoes in industries is the main obstacle and also time consuming. Therefore it is very important to identify the quality of tomatoes for the purpose of its usage by an automatic sorting machine for various necessities in industries. To overcome this problem, image processing method in industries has become a major issue in recent years. Using MATLAB software as a tool in image processing, we can find the quality of tomatoes using various algorithms. Finally after collecting lot of trained data bases, we have proposed certain range. With these ranges we can identify the quality of tomatoes, whether it is good or bad.

PROPOSED METHODOLOGY

The stages in the proposed methodology are shown below.
image
The steps involved in identification of good and bad quality of tomatoes are image acquisition, pre-processing, segmentation, feature extraction, feature training and Feature matching. Finally the quality of tomato is identified.

IMAGE ACQUISITION

The image acquisition is done using a digital camera and it is loaded and saved using MIL software. MIL works with images captured from any type of colour or monochrome source. MIL supports the saving and loading of images. It supports file formats such as TIF (TIFF), JPG (JPEG), BMP (bitmap), as well as raw format. Here the input image got is an RGB image.

PRE –PROCESSING

Usually the images that are obtained during image acquisition may not be suitable straight for identification and classification purposes because of certain factors, such as noise, climatic conditions, and poor resolution of an images and unwanted background etc.We wish to adopt the established techniques and study their performance.
The steps involved in pre-processing are
A. Input image
B. Background subtraction
C. Converting RGB to gray
D. Converting gray to binary
E. Filtering
A. RGB IMAGE
RGB is one of the formats of colour images. Here the input image is represented with three matrices of sizes matching the image format. The three matrices in each image corresponds to one of the colours red, green and blue and also says that of how much of each of these colours a certain pixel should use. It is the input image from which the following steps are to be processed. Here fig1.1 shows the input images of good and bad tomatoes.
image
B.BACKGROUND SUBTRACTION
Background subtraction is a process of extracting foreground objects in a particular scene. A foreground object can be described as an object of attention which helps in reducing the amount of data to be processed. Here fig1.2 shows the image after background subtraction of good and bad tomatoes.
image
C. GRAY IMAGE:
Gray scale images have the only colour which is a shade of only gray in between. Monochromatic is another name of gray image, denoting the presence of only one (mono) colour (chrome). To convert any colour to a gray scale representation of its luminance, we must obtain the values of its red, green, and blue (RGB) primaries in linear intensity encoding, by gamma expansion. Here Fig1.3 shows the gray images of good and bad tomatoes.
image
E. FILTERING:
The purpose of smoothing is to reduce noise and improve the visual quality of the image. Often, smoothing is referred to as filtering. Here filtering is carried out by median filter since it is very useful in preserving edges.
F. MEDIAN FILTER:
The best known order-statistics filter is the median filter, which replaces the value of a pixel by the median of the gray levels in the neighborhood of that pixel
image
The original value of the pixel is included in the computation of the median. Median filters are quite popular because, for certain types of random noise they provide excellent noise reduction capabilities, with considerably less blurring than linear smoothing filters of similar size. The median value is not affected by the actual value of the noise cells. The Median filter is particularly good at removing isolated random noise, as in this example[4][5][6]. It also preserves edges and line features better than the Low Pass / Average filter, but does produce some blurring. Here Fig1.5 shows the filtered images of good and bad tomatoes using median filter.
image

SEGMENTATION

The purpose of image segmentation is to partition an image into meaningful regions with respect to a particular application.The segmentation is based on measurements taken from the image and might be grey level, colour, texture, depth or motion .Here edge-based segmentation is most suited.As edge detection is a fundamental step in image processing, it is necessary to point out the true edges to get the best results from the matching process. That is why it is important to choose edge detectors that fit best to the application. In this way canny edge detector is chosen.
A. CANNY EDGE DETECTOR:
Canny edge detection algorithm is also known as the optimal edge detector. Canny's intentions were to enhance the many edge detectors in the image.
1) The first criterion should have low error rate and filter out unwanted information while the useful information preserve.
2) The second criterion is to keep the lower variation as possible between the Original image and the processed image.
3) Third criterion removes multiple responses to an edge.
Based on these criteria, the canny edge detector first smoothes the image to eliminate noise. It then finds the image gradient to highlight regions with high spatial derivatives. The algorithm then tracks along these regions and suppresses any pixel that is not at the maximum using non-maximum suppression. The gradient array is now further reduced by hysteresis to remove streaking and thinning the edge.[7]. Here fig1.6 shows the edge detection of good and bad tomatoes using canny edge detector.
image

FEATURE EXTRACTION

Feature extraction is defined as grouping the input data into a set of features. The features extracted carefully will extract the relevant information from the input data in order to perform the feature matching using this reduced representation instead of the full size input. Here clustering process has been used to extract features form good and bad tomatoes.
A. CLUSTERING BASICS:
Clustering is the processes of grouping together similar objects the resulting groups are called clusters. Clustering algorithms group data points according to various criteria. Unlike most classification methods, clustering handles data that has no labels, or ignores the labels while clustering. Here fig 1.7 shows the clustering values of good and bad tomatoes.
B. CLUSTERING ALGORITHM:
K-Means Clustering Algorithm
image
image

FEATURE TRAINING

Feature training method includes collection of large number of trained features of clustered values of good and bad tomatoes. More number of collecting trained features gives more accuracy. In this method, the number of closest code vectors for each training vector is identified and is stored as the corresponding cluster density. The cluster densities for all training vectors are computed and are sorted in descending order. From the sorted list, the top M training vectors with higher cluster densities are identified and grouped as codebook. This codebook is saved and loaded in MATLAB for feature matching.

FEATURE MATCHING

Feature matching methods essentially consist of detecting features in images that can be matched with corresponding features in the other images from which a transformation model can be estimated. Feature matching is an important task in the area of image processing Here correlation method is used for feature matching.. Here the clustered values of good and bad tomatoes are taken more in number. With the extracted features each value are correlated with one another and we get a specific value for good and bad tomato. With these values we can identify good and bad tomatoes.

CONCLUSION

In this paper the identification of good and bad tomatoes based on quality in image processing using MATLAB is successfully done with 80% accuracy. The use of image processing for identifying the quality can be applied not only to tomatoes but also to other fruits such as oranges, apples, melons etc., and also vegetables with more accuracy. Thus, this will enable the technology to be applied in many products.

ACKNOWLEDGMENTS

Our thanks to the experts who have contributed towards development of the template, especially my Amma,Naina.

References

  1. A. K. Jain, “Fundamentals of Digital Image Processing” Prentice Hall of India, First Edition,1989.
  2. Rafael C.Gonzalez and Richard E. woods, “Digital Image Processing”, Pearson Education, Second Edition,2005.
  3. Delores M.Etter,”Introduction to Matlab”,2010.
  4. R. Yang, L. Lin, M. Gabbouj, J. Astola, and Y.Neuvo, “Optimal Weighted Median Filters Under Structural Constraints,” IEEE Trans. Signal Processing, Vol. 43, PP. 591-604, Mar 1995 .
  5. Pei-Eng Ng and Kai-Kuang Ma, “A Switching Median Filter with BDND for Extremely Corrupted Images”, IEEE Trans Image Processing, Vol. 15, No. 6, PP. 1506-1516 June 2006.
  6. Gajanand Gupta ,’’Algorithm for Image Processing Using Improved Median Filter and Comparison of Mean, Median and Improved Median Filter”, International Journal of Soft Computing and Engineering(IJSCE)ISSN:2231-2307,volume-1,Issue-5,November 2011.
  7. Sonam Saluja et al.,” A Study of Edge-Detection Methods”, International Journal of Advanced Research in Computer and Communication EngineeringVol. 2, Issue 1, January 2013.
  8. Ms.Chinki Chandhok et al.,” An Approach to Image Segmentation using K-means Clustering Algorithm”, International Journal of Information Technology (IJIT), Volume – 1, Issue – 1, August 2012.
  9. Gastelum-Barrios et al.,” Tomato quality evaluation with image processing: A review”, African Journal of agriculture Research vol.6(14),pp.3333-3339,18 july,2011 .
  10. Arman Arefi et al.,”Recognition and localization of ripen tomato based on machine vision”, Australian Journal of Crop Science,Ajcs 5 (10):1144-1149 (2010).