Chicken eggs are a common ingredient in human food, used as an ingredient in almost every food culture worldwide. Judging the size, and therefore weight, of an egg is often important in many food recipes. This paper proposes an image processing algorithm for classifying eggs by size from an image displayed on an Android device. A coin of known size is used in the image as a reference object. The coin’s radius and the egg’s dimensions are automatically detected and measured using image processing techniques. Egg sizes are classified based on their features computed from the measured dimensions using a support vector machine (SVM) classifier. The experimental results show the measurement errors in egg dimensions were low at 3.1 % and the overall accuracy of size classification was 80.4% .CodeShoppy
Chicken eggs are known as a good and affordable source of protein and other nutrients, and, as such, are common ingredients in both savory and sweet dishes. Eggs are usually sold in the shops and markets graded according to size. Although any size of an egg may be used for most basic recipes, many recipes for baked dishes, such cookies and cakes, as well as icecream and custards, are prepared according to recipes in which it is important to maintain the proper proportion of liquid to dry ingredients and thus require certain volumes of eggs, which must take egg size as well as egg numbers into account. In Thailand, chicken eggs are sorted into 6 sizes according to per-egg weight ranges as shown in Table 1  . However, in the absence of that information, which would be the situation if the eggs had been purchased from a ‘local market’, the eggs would need to be graded ‘in the kitchen’ by some means, perhaps just a kitchen scale, before using them. A commonly available device that could also be used is in fact an Android-based smartphone utilizing an image processing algorithm. Eggs are also sold at different prices according to size, and a mobile app would be a useful tool for checking whether a seller is pricing to correct size.
In this paper, we present algorithms based on image processing and machine learning techniques to determine the size of a chicken egg from an egg image taken by an Android mobile device. While the constraint on this study was the need to refer to the domestic environment, the proposed techniques could be up-scaled and become useful in a large-scale industrial application. The simplicity of this approach, in terms of necessary lighting, egg positioning and other factors also makes t relevant as a possibly cheaper but still effective industrial application.
Many studies have been done on the automation of determining egg size and of identifying defective eggs, by using image analysis. Most of them have addressed defect detection , . For egg sorting and egg weighing systems, the technique proposed in  computes twelve features of an egg from the egg image and feeds this data to a Multi-Layer Perceptron (MLP) Network in order to predict the weight of the egg. In another study , only the width and the height of an egg measured by image processing techniques is used to predict the weight of the egg using the Adaptive Neuro-Fuzzy Inference System (ANFIS). A recent study  used regression analysis for the approximation of the relationship between egg weight and the egg geometric parameters of perimeter, area, major and minor axes, shape coefficients and volume. These studies on egg weighing systems are based on image processing techniques provided fairly high accuracy, however all of them are designed and tested in controlled laboratory or egg processing plant settings with fixed camera distances and controlled illuminations. There have been no studies on egg sorting nor egg weight prediction in uncontrolled settings such as normally illuminated markets or household lightings, using images taken from mobile devices.