Original papers
Cracked egg recognition based on machine vision

https://doi.org/10.1016/j.compag.2019.01.005Get rights and content

Highlights

  • A negative LOG operator can effectively enhance the surface cracks on eggs.

  • The Hysteresis thresholding can ensure the continuity of the crack of eggs.

  • Improved LFI index can distinguish the crack region from the mislabeled region.

  • Detection rate of 92.5% for cracked eggs was obtained from the verification test.

Abstract

Since the cracks on eggshell are difficult to be recognized due to the surrounding highlighted dark spots on the egg surface under back-light illumination, a new method to identify the cracks based on machine vision was proposed. After analyzing the characteristics of the cracks in the image of the egg under the back-light illumination, a negative LOG (Laplacian of Gaussian) operator was employed to effectively enhance the cracks in the egg image. Then the Hysteresis thresholding algorithm was adopted to acquire the proper thresholds, which eliminated the irrelevant dark spots in the binary egg image and ensured the continuity of the cracks. Finally, the improved LFI (Local Fitting Image) index was used to distinguish the crack region from the mislabeled region. The experimental results showed that the proposed method was effective in cases of complicated egg surface conditions, such as irregular dark spots and invisible micro-cracks, with cracked egg recognition rate of 92.5%.

Introduction

Eggs are fragile and easy to be damaged in the processes of production, transportation and other operations. Even if they are not broken, eggs with cracks are susceptible to bacterial invasion. Therefore, the cracked egg detection is an important part of the egg processing before eggs enter the market for consumption. Traditionally, skilled workers manually distinguished cracked egg one by one, which was a heavy, boring and unsanitary work.

In recent years, scientists and engineers attempted to find an automated detection method to reduce labor work, as well as enhance efficiency and accuracy. The most studied automatic crack detection methods can be classified into two categories viz. machine vision and acoustic analysis. Acoustic analysis (Ketelaere et al., 2000, Wen et al., 2002, Wang et al., 2004, Wang et al., 2015) has been proved to be an effective way to detect cracked eggs, but it is easily disturbed by its surrounding environment. Beyond that, machine vision based research on egg crack detection has made great progress. Pan et al. (2007) combined machine vision with BP (back propagation) neural networks to identify the cracked eggs non-destructively. Lawrence et al., 2008, Jones et al., 2010, Yoon et al., 2012 creatively developed a modified pressure system to detect micro-cracks on the egg surface. Any existing egg cracks in the standard atmosphere can be briefly open and visible when put into below the standard atmospheric pressure environment, without breaking the intact eggs. Peng et al. (2009) reported a method with the combination of multilevel wavelet transform, texture analysis and neural networks to detect damaged eggs. The detection accuracy for eggs with linear crack, mesh-like crack, point crack was 90%, 95% and 80%, respectively. Similarly, two-scale wavelet transform and PCA (principal component analysis) were performed by Wang (2014) to obtain three main features to identify cracked eggs. The accuracy was 96.67%, which can be increased by multi-resolution. Xiong et al. (2015) proposed a method of detecting egg cracks with AdaBoosting and SVM (support vector machine). Thirteen characteristic parameters was extracted from the binary egg image, and two main influential features of them were obtained by AdaBoosting as the input of SVM to build egg cracks recognition Model. Wu et al. (2016) proposed a new crack detection method that fused the gradient magnitude with confidence measure. Compared with the traditional edge detection operators, such method achieved better results. However, these methods remained in lab stage. It is difficult to apply them to the egg processing line, due to their complicated algorithm, high computing complexity and time consuming.

In order to highlight the cracks on egg surface, machine vision based research generally uses back-light illumination. The previous studies mainly focused on the cases with visible crack and less surrounding interference, which was not applicable to practical applications. Since eggs would be cleaned before entering the processing line, the egg surface would not be stained during crack detection. However, the back-light illumination also highlights the dark spots on the eggshell, which will make the crack detection difficult. This paper took commercially available chicken eggs as study objects, whose images were acquired under back-light illumination. The negative LOG (Laplacian of Gaussian) operator was used to highlight the possibly existing cracks on the egg surface. Then binary image was obtained by Hysteresis thresholding method. Finally the crack region was identified by the shape feature parameter of improved LFI (Local Fitting Image) index. The proposed method was verified by experiment with cracked egg identification rate of 92.5%.

Section snippets

Image acquiring system

The detection of external defects on egg requires collecting multiple side images of the same egg to acquire the whole surface information. The general practice is taking photos several times while rotating the target egg in the field of camera view, as shown in Fig. 1(a). The surface of one egg can be equally divided into three visual areas along its major axis, which means that the images of the three subareas can cover the whole surface of the egg and contain all the visual information on

Negative LOG-based crack enhancement

The LOG algorithm is similar to the mathematical model of visual physiology. So it has been widely used in image processing field. The LOG operator can suppress the image noise by Gaussian convolution filtering firstly and then use Laplace operator to detect the boundaries of the image. Since we just need to enhance the cracks, the negative LOG operator (Liu et al., 2015, Luo and Li, 2003) was employed.

LOG operator (Milan et al., 2011) is characterized by using the Gaussian filter convolution

Experimental results and analysis

Fig. 13 photographically demonstrated the primary procedures of the proposed egg crack identification algorithm based on machine vision. According to the algorithms described in Section 2, the basic steps of egg crack identification are as follows. After the fixed size segmentation, the original single egg image was acquired and enhanced by negative LOG operator. Then the optimal binary image was obtained by Hysteresis thresholding, followed by the retained strip-like edge elimination by a mask

Conclusions

A new method for eggshell crack detection based on machine vision was proposed to solve the problem that cracks on the egg surface are difficult to be recognized from the highlighted dark spots under back-light illumination. Based on the analysis of cracked egg images, the negative LOG operator was adopted to enhance cracks in the images followed by Hysteresis thresholding to obtain optimal binary image. Then the improved LFI index was used to distinguish the crack region and the non-crack

Acknowledgements

This study was supported by the National Science & Technology Pillar Program (2015BAD19B05). We gratefully acknowledge the financial support of Chinese Ministry of Science and Technology.

References (19)

  • D.R. Jones et al.

    Modified pressure imaging for egg crack detection and resulting egg quality

    Poult. Sci.

    (2010)
  • B. Gray et al.

    Learning OpenCV

    (2009)
  • B.D. Ketelaere et al.

    Eggshell crack detection based on acoustic resonance frequency analysis

    J. Agric. Eng. Res.

    (2000)
  • J.C. Liu et al.

    Causes of thin spots on eggshell

    China Poultry

    (2007)
  • J.L. Liu et al.

    Recognition of activity tracks in the snow with remote sensing based on difference of Gaussian filter

    Rem. Sens. Technol. Appl.

    (2015)
  • X.H. Luo et al.

    DOG model-based algorithm of line detection

    J. Comput.-Aided Des. Comput. Graphics

    (2003)
  • K.C. Lawrence et al.

    Imaging system with modified-pressure chamber for crack detection in shell eggs

    Sens. Instrum. Food Qual. Saf.

    (2008)
  • Z.L. Miao

    Study on Road Extraction From VHR Satellite Images Using Multiple Features. Master dissertation

    (2014)
  • S. Milan et al.

    Image Processing, Analysis and Machine Vision

    (2011)
There are more references available in the full text version of this article.

Cited by (41)

  • Eggshell crack detection using deep convolutional neural networks

    2022, Journal of Food Engineering
    Citation Excerpt :

    Other methods extracted wave signals (Sun et al., 2018) from the row and column matrix of images. Moreover, some used negative Laplacian of Gaussian, hysteresis thresholding and local fitting index (Guanjun et al., 2019) to detect cracks on the images of eggs. Another study (Chen et al., 2021) improved the detection of fine cracks by using a laser light source to illuminate the back of the egg.

  • Defective egg detection based on deep features and Bidirectional Long-Short-Term-Memory

    2021, Computers and Electronics in Agriculture
    Citation Excerpt :

    Currently, classification of eggs is traditionally done by hand on a one-by-one basis. In addition, the separation of defective eggs in egg processing plants by visual human inspection slows down the process, as well as being difficult and known for its high error rate (Guanjun, Mimi, Yi, Shibo, & Qinghua, 2019). The automatic identification of defective eggs is therefore important in order to improve and economize the egg production process.

  • Crack Detection Method for Preserved Eggs Based on Improved YOLO v5 for Online Inspection

    2024, Nongye Jixie Xuebao/Transactions of the Chinese Society for Agricultural Machinery
View all citing articles on Scopus
View full text