Food Recognition Based On Hsv Colour Space Technique

Abstract

The computer vision procedures used to recognize an organic product depend on four fundamental highlights which portray the protest: power, color, shape and surface. In this paper for food recognition we used HSV color space to distinguish between the different colors of food. For classification Naïve Bayes classifier is used. It yield out the accuracy of 68%.

Keywords: food recognition, Naïve Bayes, HSV color space

Introduction

The computer vision procedures used to recognize an organic product depend on four fundamental highlights which portray the protest: power, color, shape and surface. Acknowledgment framework has risen as a 'terrific test' for computer vision, with the more drawn out term point of having the capacity to accomplish close human levels of acknowledgment for a huge number of classifications under a wide assortment of conditions. The natural product acknowledgment framework can be connected for instructive reason to improved adapting, particularly for little children and down disorder patients, of organic products design acknowledgment in view of the organic product acknowledgment result. It can be utilized as a part of market which influences the clients to label their buys utilizing programmed natural product acknowledgment in view of computer vision. Various difficulties must be overcome to empower the framework to perform programmed acknowledgment of the sort of natural product or vegetable utilizing the pictures from the camera. Numerous sort of organic products are liable to huge variety in color and surface, contingent upon how ready they are. For instance, Bananas extend from being consistently green, to yellow, to inconsistent and dark colored.

Color and surface are the essential character of normal pictures, and assumes an imperative part in visual recognition. Color has been an incredible help in recognizing objects for a long time. It is regularly helpful to streamline a monochrome issue by enhancing differentiation or partition. The procedure of color classification includes extraction of valuable data concerning the ghastly properties of question surfaces and finding the best match from an arrangement of known depictions or class models to actualize the acknowledgment errand. Surface is a standout amongst the most dynamic themes in machine insight and example investigation since the 1950s which tries to separate diverse examples of pictures by removing the reliance of power amongst pixels and their neighboring pixels or by getting the difference of force crosswise over pixels. As of late, unique highlights of color and surface are joined together for their applications in the food business.

Color features have been widely connected for apple quality assessment for the most part for deformity identification. For example, color features of every pixel in pictures acquired in three parts of RGB spaces could be effectively used to portion deserts on 'Jonagold' apples. Tomato is another food item in which color features are generally utilized, as color is a pointer of the development of tomatoes. The early utilization of color features in tomato quality assessment was for starters completed by Sarkar and Wolfe who utilized dim powers of pictures to classify green and red tomatoes. Texture features are found to contain helpful data for quality assessment of foods grown from the ground, e. g. , classification of review of apples after drying out with the precision of 95%, and forecast of sugar substance of oranges with a connection coefficient of 0. 83. In this project we used the Naïve Bayes classification for recognition ten type of food. Feature is extracted using the color based techniques.

The paper is structure as follows. The next section discusses the related work. The Section 3 gives the proposed methodology. Section 4 gives the Recognition results and Discussion. Finally Section 4 gives the Concluding remakes of the proposed method.

Related Work

In this paper the author used database of about 2635 fruits from 15 different classes. The recognition is done by the minimum distance classifier based upon the statistical and co-occurrence features derived from the Wavelet transformed sub- bands. In proposed methodology the one channel contain the luminance information and other two channels contain the chrominance information of each image in dataset. The hue is invariant under the orientation of an object with respect to the illumination and camera direction and hence more suited for object retrieval. Texture features are computed from the luminance channel ‘V’, and color features are computed from the chrominance channels ‘H’ and ‘S’.

Content Based Visual Information Retrieval (CBVIR) which is also known as Query by Image Content (QBIC) is one of the applications of computer vision techniques to the image retrieval problem.

Since information retrieval from an image had been introduced many years ago there is a wide range of technique in this area. But CBVIR consist of four basic steps.

  1. Pre-Processing.
  2. Feature Extraction.
  3. Feature Database creation, and then
  4. Matching the feature of the query image to the database.

In this work fruit recognition method is proposed where the three features (i. e. , color, shape and texture) have been analyzed to recognize a fruit using CBVIR method.

Color and shape are the other widely used visual features that can be used to identify fruit. HSV color model has been used to find the color feature and eclipse ratio is used for defining the shape.

Proposed Method

Food recognition Algorithm

  1. Reading the training dataset
  2. Pre-processing of dataseta. Segment the requirement area of food without any backgroundb. Resize the image in 640x640 c. Save in jpg format
  3. Feature selectiona. Colored image is converted into hue and saturation format.
  4. Feature selection will be done calculating the mean of hue imagec. Applying saturation filter to each of the images.
  5. Classification will be done by using multi model naïve Bayes classifier
  6. In the end test images are given to that classifier for identification.

Below is the flow graph of methodology.

The data of different food is gather from market, it comprise of ten different food like Apple, Capsicum, eggplant, kiwi, lemon, orange, Rockmelon, tomatoes, potatoes and watermelon. More than 100 images of each food is captured during different lighting, background and place.

After that pre-processing is done on those images. Each is cropped without any background and resized in 640x640 pixels. These all images are used training and testing. Below figure shows some food sample.

Color In case of graphic feature additional most significant feature is color. Color that is discovered by human beings bounded with three color stimuli: Red, Green and Blue. This color model is specified as RGB color model. These three colors are the primary color module of an image as observing these three distinct color module can modify the color result of an image.

RGB to HSV conversionHSV (Hue, Saturation and Value) characterizes a sort of color space. It is like the cutting edge RGB and CMYK models. The HSV color space has three parts: hue, saturation and value. Shine is once in a while substituted for 'Value' and afterward it is known as HSB. HSV is moreover known as the hex-cone color model.

The HSV color model can be considered as an alternate perspective of the RGB solid shape. Thus the values of HSV can be considered as a change from RGB utilizing geometric techniques. The slanting of the RGB solid shape from dark (the beginning) to white relates to the V pivot of the hexagon in the HSV model. For any arrangement of RGB values, V is equivalent to the greatest value in this set. The HSV point relating to the arrangement of RGB values lies on the hexagonal cross area at value V. The parameter S is at that point decided as the relative separation of this point from the V pivot. The parameter H is controlled by ascertaining the relative position of the point inside every sextant of the hexagon. The values of RGB are characterized in the range [0, 1], a similar value go as HSV. The value H is the proportion changed over from 0 to 360 degree. The section from RGB to HSV was made by a Change, not Shelf space. A few administrators were proposed for its Conversion. RGB Image to HSV conversion relation.

Naive Bayes classifier is a probabilistic classifier in view of the Bayes hypothesis, considering Naive (Strong) autonomy presumption. Naive Bayes classifiers expect that the impact of a variable incentive on a given class is autonomous of the estimations of another variable. This presumption is called class contingent autonomy. Naive Bayes can frequently perform more complex grouping techniques. It is especially suited when the dimensionality of the information sources is high. When we need more equipped yield, when contrasted with different strategies yield we can utilize Naive Bayes usage. Naive Bayes is utilized to make models with prescient capacities.

Results and Discussion

Features extracted from taking mean of each channel of each three channels of HSV. Then apply standard deviation filter to values of HSV images. After getting a feature vector set we apply naïve Bayes classification.

Then a set of random images are given to classifier to test the classifier accuracy. Following results are obtained. We also obtain the confusion matrix of this classification shown below. This classification gives 78% accuracy.

Conclusion and Future Work

Food recognition system prototype using image processing technique and Naïve Bayes classification in Matlab. The results are satisfying because more of food item are correctly identified by the classifier. And accuracy is also 78% of this system with error rate is approximately around 22%.

11 February 2020
close
Your Email

By clicking “Send”, you agree to our Terms of service and  Privacy statement. We will occasionally send you account related emails.

close thanks-icon
Thanks!

Your essay sample has been sent.

Order now
exit-popup-close
exit-popup-image
Still can’t find what you need?

Order custom paper and save your time
for priority classes!

Order paper now