System Overview A user can use our system by placing a sample egg on a sheet of white paper or any white or near white background. The egg must have a brown colored shell to provide sufficient contrast. Then, the user takes a photo of the egg with our app using the Android device’s camera. The app calculates the size of the egg and returns the result to the user. Since the mobile device can be positioned over the egg at an arbitrary distance when taking a photo, a dimension reference needs to be visible in the acquired image to provide a dimension reference for the egg. Our system is designed to use a coin as the reference object because coins are common, and have known sizes. Thus, the user places a coin alongside the egg and take a photo of both, side-by-side. Given that we are in Thailand, the system works with a One-Baht or a Five-Baht coin as a reference object. Our system also allows a customization of the reference coin size in order to use other coinage
The algorithm for classification includes two main parts, the coin image analysis, and the analysis. The main purpose of the coin image analysis is to find a coin in the acquired image and measure the dimensions of the coin in the image, which will vary depending on the distance from which the image was taken. This part consists of the coin detection, the coin image segmentation, the measurement of coin dimensions, and the pixel size computation. The result of this part is a dimension of a single pixel
This experiment was set to ensure that our segmentation and properties extraction algorithms are effective. We asked 5 people to use MATLAB’s image tool to measure 1) radii of coins 2) major axes of eggs, and 3) minor axes of eggs in all 425 images. These manually measured properties were set as ground truth data to be compared with properties automatically extracted by the system. The error results for the coin’s radius, and the egg’s axes are 5.9% and 3.1 % (2.8% for the major axis, and 3.4% for the minor axis). B. Classification experiment We manually measured and weighed all eggs with a vernier caliper and a digital kitchen scale, respectively. We manually calculated all features from the measured values and classifIed using an SVM classifIer, which yielded an accuracy of 83.7%. This accuracy proved that egg sizes (weight) can be determined from egg dimensions. This accuracy was also used as a ground truth for benchmarking our algorithm’s performance. We evaluated the performance of the system using all 425 images with 10-fold cross-validation. The experiment yielded the overall accuracy of 80.4% .CodeShoppy
We have developed egg size classifIcation algorithms based on image processing and the SVM classifIer. The robustness of this approach allows the system to work well in more naturalistic settings such as domestic environments. The experimental results showed that our segmentation techniques can extract relevant information with small errors, and our classifIcation technique can classify egg size with accuracy of 80.4%. Further work includes improving the fItting algorithm; instead of fItting an egg with an ellipse, an oval should give more accurate results. While the focus of this study was the classifIcation using an image taken with an Android device in the household or market environments, the proposed algorithms could be modifIed and applied in an automatic large-scale egg industrial application.