Top Navigation Bar

Article Request Page ASABE Journal Article

Research on Detection of Fertility of Group Hatching Eggs Based on Adaptive Image Segmentation

Zhihui Zhu1,*, Kai Yang1, Yuting He1


Published in Applied Engineering in Agriculture 38(2): 283-291 (doi: 10.13031/aea.14849). Copyright 2022 American Society of Agricultural and Biological Engineers.


1    College of Engineering, Huazhong Agricultural University, Wuhan, Hubei, China.

*    Correspondence: zzh@mail.hzau.edu.cn

Submitted for review on 14 September 2021 as manuscript number ITSC 14849; approved for publication as a Research Article and as part of the Artificial Intelligence Applied to Agricultural and Food Systems Collection by Associate Editor Dr. Yuzhen Lu and Community Editor Dr. Yiannis Ampatzidis of the Information Technology, Sensors, & Control Systems Community of ASABE on 16 February 2022.

Highlights

Abstract. For the incubation factory, it is of vital importance to detect infertile eggs and dead-embryo eggs in the industrial egg trays as early as possible. In this article, an activity detection computer vision system was proposed and evaluated. Due to the dense layout of eggs in industrial egg trays, the image segmentation task to separate each single egg becomes difficult. To this end, an adaptive image segmentation method for group eggs was proposed. Firstly, the binary image was obtained by the Canny operator using dynamic threshold and processed to reduce redundant information. Then ellipse fitting was employed to obtain the egg contour of the single egg. Moreover, the Red, Green, Blue (RGB) and Hue, Saturation, Intensity (HSI) histograms were selected for feature extraction. According to the analysis on color features and texture features of the images, 13 features [positions for peak values of R and I in histogram, peak values of G and I within histogram, averages of R and G, variances of R and G, contrast, roughness, inverse different moment (IDM), correlation and angular second moment (ASM)] were chosen as the criterion for detecting dead-embryo eggs. Meanwhile, 12 features (positions for peak values of R, G, H, and I in histogram, averages of R and G, slope and variance of G, contrast, roughness, IDM, and correlation) were selected for detecting infertile eggs. Lastly, the Support Vector Machine (SVM) model and Lease Squares Support Vector Machine (LS-SVM) model were built to distinguish infertile egg and dead-embryo egg, respectively. According to the comparison, the LS-SVM model reached higher accuracy in determining infertile egg and dead-embryo egg than the SVM model, with less time consumed. The LS-SVM model reached 100% accuracy in detection for infertile eggs on day 4 of incubation, as well as for dead-embryo eggs on day 10 of incubation. The result demonstrated that the proposed method can conduct the activity detection for group eggs both accurately and fast, which meets the commercial requirement for non-destructive detection in the hatchery industry.

Keywords.Adaptive image segmentation, Computer vision, Fertility, Group hatching eggs, LS-SVM, Non-destructive detection, SVM

Hatching an egg, which takes roughly 21 days, has strict requirements on the environment (Heitschmidt, 2005). During this time and energy consuming period, 85%~95% of hatching eggs can survive and hatch (USDA, 2016). Early detection and removal of infertile eggs and dead-embryo eggs can save incubation space, energy, and reduce economic loss, thus ensuring the incubation of live-embryo eggs.

In China, most poultry factories still use manual inspection for incubation egg detection. However, this method is very labor intensive and inefficient, with a high risk of misclassification on eggs due to human visual fatigue. Also, the development of a chicken embryo is influenced when it is placed outside the incubator for too long (Zhu et al., 2015). Currently, many scholars have achieved non-destructive detection of the egg’s activity (Bamelis et al., 2004). Cai et al. (2016) employed an infrared thermal imaging technique to discriminate infertile eggs, reaching 90.7% accuracy for infertile egg on day 4 of incubation. Zhu et al. (2012) studied the difference between fertile eggs and infertile eggs using near infrared spectrum and achieved 91.67% accuracy. Kimura et al. (2015) developed a set of near infrared spectrum detection equipment to collect transmitted spectrum of eggs on day 12, with 97% accuracy. However, a spectrum device usually has a high cost for agricultural application. Besides, it requires strict working conditions, which hinders the potential for the large-scale application (Zou et al., 2010). In the past few decades, computer vision technique was widely adopted in the poultry industry (Ying et al., 2000). Zou (2009) applied computer vision on the detection of the single incubation egg and achieved 100% accuracy for on day 6 of incubation. Jian et al. (2013) used computer vision and neural network for fertility detection, reaching 97.22%. Besides, Yu et al. (2004) and Hu and Liu (2014) employed computer vision for activity detection on eggs at the middle stage of incubation, reaching 98.3% and 97.73% accuracy, respectively. However, most computer vision methods aimed at single-egg detection, hence a multi-egg activity detection system is in urgent need. The objective of this study was to develop a computer vision method of activity detection (the detection of fertility and dead-embryo eggs) on group eggs at the incubation stage as early as possible.

Methodology

Experiment Materials

Jingfen No.1 white shell eggs from Yukou Poultry Ltd in Jingzhou city were chosen to provide experiment material—252 samples in total. Incubation temperature was 37.3°C to 38.2°C, humidity was 60% to 70%; each egg was turned-over every 2 h; egg tray was 6×7 in size; image collection started from the third day of incubation; incubation situation was recorded every day. The samples consisted of 200 fertile eggs (158 live-embryo eggs and 42 dead-embryo eggs) and 52 infertile eggs.

Image Collection

The equipment (the length, width, and height of 2.40, 0.48, and 0.90 m, respectively) is shown in figure 1a. The industrial camera (Basler Aca1600-20uc, Basler, Germany) was mounted at the upper part of the dark box, equipped with a 16 mm lens with a f1.4 aperture (Ricoh FL-CC1614A-2M lens, Tokyo, Japan). A LED of 1 W (color temperature is 3000 k) was selected as the warm light source. It was placed underneath the incubation eggs, whose light outlet was wrapped with a rubber band to prevent light leakage. To minimize the influence from external light source, image collection was conducted in a black box (the length, width, and height of 0.64, 0.55, and 1.00 m, respectively). The camera was connected to the computer via a USB cable. When the egg tray reached the specific position, the PLC (SIMATIC S7-200 SMART, Siemens, Germany) received a high-level signal and controlled the industrial camera to capture the image. Finally, the image of group eggs was transmitted to the personal computer (PC) via the USB cable. Also, the captured pictures were stored and processed in the PC (as shown in fig. 1b).

(a)(b)
Figure 1. Image acquisition. (a) Acquisition equipment; (b) image of group eggs.

Characteristics of Infertile Egg and Dead-embryo Egg

While eggs are under candling, infertile eggs manifest low light transmittance, and dead-embryo eggs appear to form blood rings (Ernst et al., 2004). In the early incubation stage, vessels filled with blood becomes visible (Das and Evans, 1992). With the passage of incubation time, fertile eggs appear to be less light-transmissive, as is shown in figure 2a-2c. Compared with figure 2d-2f, infertile eggs are more transmissive. Light transmittance for dead-embryo eggs are between fertile and infertile eggs, as shown in figure 3d-3f. Compared with figure 3a-3c, with incubation day progresses, dead-embryo eggs becomes more distinguishable from live-embryo eggs, but due to embryo deterioration and other factors, dead-embryo eggs acquires low-transmittance quality, which disguised its difference from live-embryo eggs.

Self-adaptive Group Eggs Image Segmentation

Computer vision is widely applied in egg non-destructive detection research (Zhou et al., 2015). One of the keys for such application is quick acquisition of egg edge. The pictures of 42 eggs were segmented from the original picture of group eggs. In fact, there are some inevitable factors, including the size difference of incubation eggs and the small jitter of the machine. Using fixed circle center of incubation eggs for segmentation tends to be inaccurate, which results in incomplete capture of information (Wang et al., 2012). Regarding this problem, a self-adaptive segmentation method for group eggs is needed.

(a)(b)(c)(d)(e)(f)
Figure 2. Image contrast between fertilized and infertile eggs. (a) 3 d fertilized egg; (b) 5 d fertilized egg; (c) 7 d fertilize egg; (d) 3 d infertile egg; (e) 5 d infertile egg; (f) 7 d infertile egg.
(a)(b)(c)(d)(e)(f)
Figure 3. Image contrast of dead and live embryo eggs. (a) 7 d live-embryo egg; (b) 12 d live-embryo egg; (c) 17 d live-embryo egg; (d) 7 d dead-embryo; (e) 12 d dead-embryo; (f) 17 d dead-embryo.

An image segmentation algorithm was implemented on Visual Studio 2013 (Visual Studio, 2014), using OpenCV2.4.10 (OpenCV, 2.4.10, 2014). Upper left, blow left, and below right were selected for egg circle center from the image to calculate the approximate circle centers of eggs. Within the image, radius of each egg was roughly 90 pixels in length. To capture the shape of an egg, firstly take each egg as a square region of interest (ROI) of 210×210 pixels (fig. 4a). Then transform the image into gray domain, and finally smoothen it to remove its noise. The egg is oval shaped; hence the ellipse fitting algorithm was employed to fit the contour of the egg (Duan et al., 2016). Traditional Canny operator capture the outline binary line together with redundant information in the image, which prevent complete acquisition of egg’s outline, as shown in figure 4b. Therefore, capturing the egg’s outline from binary image became the first step.

Egg Edge Detection

With binary outline captured using the Canny operator, egg edge is oval-shaped, whose centers are close to center of ROI. This characteristic can be exploited for egg edge detection.

     (a)         (b)
Figure 4. The contour binary graph obtained by Canny algorithm. (a) ROI image; (b) contour binary graph.

Firstly, find connected areas within the binary image in turn. Assume the Nth connected area is V, obtain the zero-order matrix M00 and one-order matrix M10, M01:

        (1)

        (2)

        (3)

The particle is:

        (4)

As shown in figure 5, take the first point C1(x1,y1) and the intermediate point C2(x2,y2) from connected area as common point, take ROI center O(105,105) and particle P1(xc,yc) to form ?1 and ?2. When length L from connected area P1 to O is less than 20 pixels, and ?1 and ?2 are both under 15°, then the connected area is the profile of egg, otherwise it’s redundant information.

(a)(b)
Figure 5. Recognition of egg edge contour. (a) Edge contour of egg; (b) redundant information.

Adaptive Canny Operator

Generally speaking, the thickness of the egg shell and the shell membrane of each egg are different. The thicker the shell and the membrane are, the lower the light transmittance will be. Moreover, the development of the eggs also has an impact on the light transmittance. Complicated physiological activity happens in the developing embryo of the egg, which makes the edge of the embryo cloudy during the incubation period. As a result, there is a decline of the light transmittance with the incubation stage, which has an influence on the binary contour obtained using the Canny operator. As shown in figures 6a, 6b, and 6d, with the increase of incubation days, the light transmittance of breeding eggs gradually decreased. When using the fixed threshold method, too much noise was produced in the image of day 5 and little effective information was retained in the image of day 18. From figures 6b and 6c, it is clear that the use of fixed threshold also caused too much noise and retained little effective information due to the factor of eggshell and growth speed.

(a)(b)(c)(d)
Figure 6. Canny edge detection with fixed threshold. (a) 5 day Canny edge; (b) 12 day Canny edge; (c) 12 day Canny edge; (d) 18 day Canny edge.

In light of the above, adaptation of stationary threshold for Canny operator is incapable of capturing the profile of eggs in all situations. The proposed adaptive Canny operator is mainly stated as:

  1. Initialize the highest threshold value as 255, and the lowest value as half of the highest value;
  2. Run Canny operation to capture binary outline image, detect the egg’s edge base on the binary image;
  3. If no egg edge is detected, decrease the highest threshold value, the lowest value is as half of highest, and back to step 2;
  4. Otherwise adopt least square ellipse to capture the complete outline of the egg.

Adaptive Group Egg Segmentation Workflow

In brief, the image segmentation process is shown in figure 7. At first, ROI is extracted, with the initial highest threshold as 255, and the lowest threshold as half of the highest, then the Canny operator is used to obtain binary image, and detect the egg’s edge; if the edge is not detected as defined, the threshold is decreased by 10, and the previous procedure is repeated; when the egg’s edge is detected (fig. 7g), fit the edge with the oval shape to obtain a complete edge in the optimized image, then use flood fill to produce a mask for segmentation. If the threshold is below zero and the egg’s edge still cannot be detected, then the circle was used to make a mask (fig. 7i). In order to completely eliminate the background, the radius of the circle mask should remain under the smallest egg’s radius. Therefore, the radius of mask was set at 80 pixels, centered at the ROI area.

Figure 7. Image segmentation flow chart. thre: threshold.

Characteristics Extraction

The extraction of characteristics is the key to the computer vision’s successful implementation (Fernandez et al., 2019). Characteristics of image includes color, texture, shape, and spatial relationships (Ma and Manjunath, 1999). Due to the fact that eggs were closely connected to each other and the eggs appeared to be very similar, analysis of color and texture should reveal more difference between eggs.

Support Vector Machine (SVM) has excellent performance when dealing with high-dimensional and small-size dataset (Saunders et al., 2002). Least Squares Support Vector Machine (LS-SVM) is a ramification of SVM, which possess a higher speed of solution, less demand for computing resource, and better adaptability for small-size dataset and non-linear problems (Huang et al., 2012). In this article, the SVM model and LS-SVM model are compared.

Results and Analysis

Characteristic Selection

First, 25 eggs, both live-embryo and dead-embryo, respectively, in their tenth day of incubation were randomly chosen. The images of live-embryo eggs and dead-embryo eggs were analyzed in terms of their color and texture.

Histogram Analysis

According to each RGB and HSI image histograms from eggs, as shown in figure 8, it is obvious that images of live-embryo egg and dead-embryo egg differed in values of R, G, and I. Therefore, the image’s R, G, and I peak values and positions were extracted and recorded.

Figure 8. Histogram analysis of dead- and live-embryo eggs.

From the perspective of peak values of R, G, and I within histogram, live-embryo eggs image showed significant lower positions than those of dead-embryo eggs (fig. 9). What’s more, live-embryo eggs image possessed higher maximum values of G and I, than those of dead-embryo eggs. However, value distribution of R among live- and dead-embryo eggs are chaotic, with two types of eggs sharing many overlaps. Therefore, positions for peak value of R and I and peak value of G and I within histogram are decided on as the criteria for distinguishing live and dead embryo eggs.

         
         
Figure 9. The peak value and location of histogram.

Color Matrix Analysis

Traditional image color histogram retrieval methods lose information about position of colors (He et al., 2012). Color matrix is another simple and effective technique to represent features of colors. Since color is mainly distributed in low-order matrices, using first-order matrix (average), second-order matrix (variance) and third-degree matrix (slope) to indicate color distribution is sufficient (Johnson and Baker, 2004).

Extract each image’s R, G, and I color matrix is shown in figure 10. Apparently, dead-embryo egg’s image has larger average value and variance than those of live-embryo eggs, and other numbers were non-discriminative. It has hence been decided that average and variance of R and G from egg image can be used as criteria to determine live- and dead-embryo eggs.

Texture Feature Analysis

Texture feature is a global characteristic that depicts surface texture of the object within the image or a section of the image. Haralick proposed 14 features based on gray-level co-occurrence matrix (GLCM). Ulaby discovered that only four features: contrast, correlation, Angular Second Moment (ASM), and inverse different moment (IDM), are non-correlated, meanwhile these four features are easy to compute and classify (Wu, 2011).

         
         
         
Figure 10. Color moment analysis of dead- and live-embryo eggs.

Extract each egg image’s contrast, IDM, correlation, and ASM information, is shown in figure 11. It is obvious that live-embryo egg’s contrast is universally smaller, and IDM, correlation, and ASM are higher than that of dead-embryo egg.

Figure 11. Texture feature analysis of dead- and live-embryo eggs based on GLCM.

Tamura texture based on human’s visual sensibility and psychological research, proposed six properties of texture: roughness, contrast, directionality, line-likeness, regularity, coarseness (Yang and Xu, 2004). Contrast was analyzed in the above; coarseness and contrast was correlated linearly with roughness. Therefore, roughness, directionality, line-likeness, and regularity and were extracted as shown in figure 12. Only roughness was distinctive between live- and dead-embryo eggs.

Figure 12. Texture feature analysis of dead- and live-embryo eggs based on Tamura.

In light of the above, 13 features were chosen as criterion for discrimination of dead-embryo eggs (table 1). Likewise, 25 fertile and infertile eggs in their fifth incubation day were randomly selected for feature analysis. Within images of infertile eggs, the positions for maximum values of R, G, H, and I in histogram, averages of R and G, slope and variance of G, contrast, roughness and IDM is higher than that of fertile eggs, and correlation is lower that of fertile eggs. Hence, 12 features were chosen as criterion for discrimination of infertile eggs.

Table 1. Classification feature.
Features
Dead embryo
eggs
Positions for peak values of R and I, peak values of
G and I, averages of R and G, variances of R and G,
contrast, roughness, IDM correlation, ASM
Infertile eggsPositions for maximum values of R, G, H and I,
averages of R and G, slope and variance of G,
contrast, roughness, IDM, correlation

Analysis of Feature Difference

Hotelling T2 test was used to analyze the statistically significant difference (p-value < 0.05) of 13 features of dead-embryo eggs. After the 13 features were extracted from machine vision images of dead-embryo eggs, it was confirmed that there was a significant difference (p-value < 0.05) between live- and dead-embryo eggs in terms of 13 features (table 2). Likewise, there was a significant difference (p-value < 0.05) between fertile eggs and infertile eggs in terms of 12 features. Therefore, the features were feasible for classification.

Table 2. Hotelling T2 test of features.
ValueF[a]Hypothesis
df[b]
Error
df[b]
Sig.[c]
Hotelling’s trace of
dead-embryo eggs
19.05852.77613.00036.0000.000
Hotelling’s trace
of infertile eggs
25.05577.25312.00037.0000.000

    [a]    The ratio of two mean squares. When the F value is large and the significance level is small (typically smaller than 0.05 or 0.01) the null hypothesis can be rejected.

    [b]    Degrees of freedom.

    [c]    Significance.

Model Construction and Validation

In the early stage of incubation, infertile eggs were detected. Twelve features of each image were extracted for infertile egg discrimination. In this examination, 200 fertile eggs and 52 infertile eggs were examined. The samples were then randomly divided into training set and test set, which were 3:1 in proportion. The sample set division is shown in the table 3.

Table 3. Sample set division.
SamplesFertile
Eggs
Infertile
Eggs
Live-embryo
Eggs
Dead-embryo
Eggs
Training set1493911933
Test set5113399
Sum2005215842

Support Vector Machine Model

Due to the advantage of fitting nonlinear mapping problem, the Radial Basis Function was selected as the kernel of SVM. The kernel function is decided on Radial Basis Function (RBF). Gird searching was employed to select the optimal parameters. For the models of Support Vector Machines with a Gaussian kernel function, the most important optimal parameters are gamma (‘g’) and regularization coefficient (‘c’). SVM models for infertile egg and dead-embryo egg were constructed respectively. As shown in table 4, correctness in determining fourth day infertile eggs reached 100%, and maintained since day four. Judging from table 5, the algorithm can distinguish dead-embryo eggs with 100% accuracy on 11 day of incubation, whereas correctness fell in later incubation stage, and solution took longer to finish.

Table 4. Support vector machines model for infertile eggs.
Incubation Day(s)34567
Correct fertile egg designation rate96.08%100%100%100%100%
Correct infertile egg designation rate92.31%100%100%100%100%
Comprehensive correct rate95.31%100%100%100%100%
Optimal parameters[a]c 3.5
g -2
c 2
g 0
c 1
g -4
c 0
g 0
c 3.5
g -0.5
Time consumed(s)3.632.802.322.142.08

    [a]    For the models of Support Vector Machines with a Gaussian kernel function, the optimal parameters consist of ‘c’ and ‘g’. ‘c’ is the regularization coefficient which controls overfitting of the model, and gamma (aka ‘g’) is the parameter which controls the degree of nonlinearity of the model.

Table 5. Support vector machines model for dead eggs.
Incubation Day(s)671011121718
Correct live-embryo egg designation rate97.44%94.87%100%100%100%97.44%92.31%
Correct dead-embryo egg designation rate88.89%77.78%88.89%100%100%100%100%
Comprehensive correct rate95.83%91.67%97.92%100%100%97.92%93.75%
Optimal parameters[a]c 6
g -10
c 0.5
g -7.5
c 0.5
g -7
c 0
g -10
c 6.5
g -10
c 0.5
g -7.5
c 0
g -10
Time consumed(s)7.816.525.745.926.135.965.78

    [a]    For the models of Support Vector Machines with a Gaussian kernel function, the optimal parameters consist of ‘c’ and ‘g’. ‘c’ is the regularization coefficient which controls overfitting of the model, and gamma (aka ‘g’) is the parameter which controls the degree of nonlinearity of the model.

Least Squares Support Vector Machine Model

Similar to the SVM model, RBF was determined for LS-SVM kernel function, and gird search was used for optimal parameter decision. For the models of Least Squares Support Vector Machines with a Gaussian kernel function, the most important optimal parameters are gam and sig. The LS-SVM models for infertile and dead-embryo eggs were built respectively. As shown in table 6, the model reached 100% in determining infertile eggs on 4 day of incubation, and maintained since then. From table 7, it can be seen that the model distinguished dead-embryo eggs with 100% accuracy on the tenth day, whereas the accuracy decreased at the late stage of incubation.

Regarding tables 4 to 7, the LS-SVM model was more capable of distinguishing infertile and dead-embryo eggs than the SVM model, with completely correct prediction in fourth day incubation infertile eggs, and in tenth day dead-embryo eggs. What’s more, the LS-SVM model was more time-efficient than the SVM model. In conclusion, the LS-SVM model was chosen for the detection of infertile and dead-embryo eggs.

Discussion

Considering that the demand for the industrial application, some specific designs were made to ensure detection automation and continuity. For example, a block was mounted on the conveyor to stop the egg trays at the same detection spot, so that the ROI of group eggs can be calculated automatically. After the images are captured, the block will be moved away and reset to wait for the next tray. Besides, the dark box can reduce the external interference and maintain the detection environment at a relatively consistent level. Once initially set by the operator, the detection system can work independently afterwards.

Table 6. Least squares support vector machines model for infertile eggs.
Incubation Day(s)34567
Correct fertile egg designation rate98.04%100%100%100%100%
Correct infertile egg designation rate84.62%100%100%100%100%
Comprehensive correct rate95.31%100%100%100%100%
Optimal parameters[a]gam 36
sig 7
gam 5
sig 8
gam 6
sig 4
gam 1
sig 3
gam 114
sig 12
Time consumed(s)0.600.600.650.640.65

    [a]    For the models of Least Squares Support Vector Machines, the optimal parameters consist of ‘gam’ and ‘sig’. ‘gam’ is the regularization coefficient while ‘sig’ is the parameter of the RBF kernel function.


Table 7. Least squares support vector machines model for dead eggs.
Incubation Day(s)671011121718
Correct live-embryo egg designation rate94.87%94.87%100%100%100%97.44%92.31%
Correct dead-embryo egg designation rate100%100%100%100%100%100%100%
Comprehensive correct rate95.83%95.83%100%100%100%97.92%93.75%
Optimal parameters[a]gam 4e+05
sig 1e+03
gam 125
sig 16
gam 4
sig 25
gam 99
sig 12
gam 52
sig 31
gam 1e+03
sig 1e+03
gam1
sig 4
Time consumed(s)0.500.430.460.400.420.430.40

    [a]    For the models of Least Squares Support Vector Machines, the optimal parameters consist of ‘gam’ and ‘sig’. ‘gam’ is the regularization coefficient while ‘sig’ is the parameter of the RBF kernel function.

According to the results, the LS-SVM model reached 100% accuracy in recognizing infertile eggs on day 4 of incubation. Usually, the blood vessels of fertile eggs begin to appear in the sight through candling on day 3 of incubation. On the other hand, infertile eggs have no blood vessels grown inside, leading to relatively higher light transmittance. Moreover, the development of fertile eggs highlights the growing difference between infertile eggs and fertile eggs. Therefore, the accuracy of LS-SVM model was able to reach 100% on day 4 to day 7 of incubation.

The LS-SVM model reached 100% accuracy in detecting dead-embryo eggs on day 10 of incubation. After, the accuracy began to fall at the late stage of incubation. We assumed that the drop was because of the transmittance decrease with the embryo deterioration. At the late stage of incubation, the embryo became fully developed and too dark to candle through. As the result, the segmentation of the individual egg turned out to be inaccurate and the performance of model was relatively poor. One possible solution is to increase the transmittance of light source with incubation period so that the influence of embryo development can be reduced to some degree.

In terms of the proposed researches most computer vision methods were employed to conduct static detection of single egg (Yu et al., 2004; Hu and Liu, 2014). used the Harris algorithm for noise elimination and reached 97.73% accuracy for activity detection at the middle stage of incubation. However, this method was only for individual egg detection. Wang et al. (2012) used a machine vision method for group egg activity detection and reached 95% accuracy on day 7 of incubation. In our research, the activity detection of group eggs was realized and the detection accuracy was improved to 100% accuracy on day 4 for infertile eggs and on day 10 for dead-embryo eggs, respectively. The result indicatedthat the fertility and viability of an egg could be detected at the early stage of incubation with high accuracy and low prediction time, so that the proposed method would be helpful for detecting and removing unqualified eggs timely.

Conclusion

To overcome the difficulty of individual egg segmentation from an image, an adaptive group eggs segmentation method was proposed. The method could segment the individual egg from group images of eggs placed in industrial trays. According to the analysis on color features and texture features of egg images, 13 features were chosen as the discrimination criterion for dead-embryo eggs. Meanwhile, 12 features were selected as the predictor for infertile eggs. Then, the SVM and LS-SVM models were constructed, respectively. It turned out that the LS-SVM model performed better in terms of detection accuracy and speed for discriminating infertile and dead-embryo eggs than the SVM model. The LS-SVM model reached 100% accuracy in distinguishing infertile eggs on day 4 of incubation, and dead-embryo eggs on day 10 of incubation. The result indicated the detection system can be up to the task of online detection for commercial usage.

Acknowledgements

This work was funded by the China Agriculture Research System of MOF and MARA (CARS-40-K24). The authors deeply appreciate the reviewers for their constructive comments and advices, which has greatly improved the quality of the article.

References

Bamelis, F., Kemps, B., Mertens, K., Tona, K., De Ketelaere, B., Decuypere, E., & De Baerdemaeker, J. (2004). Non-destructive measurements on eggs during incubation. Avian Poultry Biol. Rev., 15(3), 150-159.

Cai, J. R., Liu, H. L., Sun, L., Yuan, L. M., & Liu, M. L. (2016). Discrimination of hatching eggs activity based on thermal imaging. Food Ind., 37(1), 201-204. https://doi.org/10.14257/ijsh.2016.10.2.17

Das, K., & Evans, M. D. (1992). Detecting fertility of hatching eggs using machine vision II: Neural network classifiers. Trans. ASAE, 35(6), 2035-2041. https://doi.org/10.13031/2013.28832

Duan, Y. F., Wang, Q. H., & Li, X. M. (2016). High-throughput online detection method of egg size and shape based on convex hull algorithm. Trans. CSAE, 32(15), 282-288.

Ernst, R. A., Bradley, F. A., Abbott, U. K., & Craig, R. M. (2004). Egg candling and breakout analysis. Egg candling and breakout analysis. https://doi.org/10.3733/ucanr.8134

Fernandez-Lozano, C., Carballal, A., Machado, P., Santos-Del-Riego, A., & Romero, J. (2019). Visual complexity modelling based on image features fusion of multiple kernels. PeerJ, 7. https://doi.org/10.7717/peerj.7075

He, G. B., Dai, X. J., & Li, H. (2012). Color image retrieval algorithm based on the maximum similarity submatrix. Comput. Sci., 39(7), 282-286.

Heitschmidt, G. (2005). Detection of fertility and early development of hatching eggs with hyperspectral imaging.

Hu, J. G., & Liu, C.-L. (2014). Non-destructive detection of hatching eggs fertility based on image processing. J. Qingdao University Sci. Technol. (Natural Sci. Ed.), 35(2), 200-205.

Huang, G. B., Zhou, H., Ding, X., & Zhang, R. (2012). Extreme learning machine for regression and multiclass classification. IEEE Trans. Syst. Man Cybernetics Part B (Cybernetics), 42(2), 513-529. https://doi.org/10.1109/TSMCB.2011.2168604

Jian, Y., Xia, C., Peng, Z., & Li, X. (2013). Online capturing and identification system of the egg image before hatching. Appl. Mech. Materials, 427-429, 567-570. https://doi.org/10.4028/www.scientific.net/AMM.427-429.567

Johnson, A. P., & Baker, C. L. (2004). First- and second-order information in natural images: A filter-based approach to image statistics. J. Optical Soc. America A, 21(6), 913-925. https://doi.org/10.1364/JOSAA.21.000913

Kimura, K., Nakano, K., Ohashi, S., Takizawa, K., & Nakano, T. (2015). LED measurement for development of a non-destructive detector of unsuitable chicken eggs in influenza vaccine production. Biosyst. Eng., 134, 68-73. https://doi.org/10.1016/j.biosystemseng.2015.03.011

Ma, W.Y., & Manjunath, B. S. (1999). NeTra: A toolbox for navigating large image databases. Multimedia Syst., 7(3), 184-198. https://doi.org/10.1007/s005300050121

OpenCV, 2.4.10. (2014). Intel U.S. Retrieved from https://opencv.org/

Saunders, C., Stitson, M. O., & Weston, J. (2002). Support vector machine. Comput. Sci., 1(4), 1-28.

USDA. (2016). Chickens and eggs. Washington, DC: USDA.

Visual Studio, 2013. (2014). Community. Redmond, WA: Microsoft.

Wang, Q., Ma, M., Zhu, Z., Zhu, T., & Li, M. (2012). Non-destructive detection of hatching egg’s survival based on machine vision. J. Food Agric. Environ., 10(1), 578-581.

Wu, X. J. (2011). Research of image classification based on SVM. Nanjing University of Information Science & Technology.

Yang, B., & Xu, G. Y. (2004). Similarity measurement and retrieval of texture images. Acta Autom. Sin., 30(6), 991-998.

Ying, Y. B., Rao, X. Q., & Zhao, Y. (2000). Application of machine vision technique to quality automatic identification of agricultural products. Trans. CSAE, 16(3), 4-8.

Yu, Z. H., Ni, Z. H., & Li, H. J. (2004). Application of machine vision technique to detecting eggs quality and hatching eggs fertility. J. Inner Mongolia Agric. University, 25(3), 116-120.

Zhu, Z. H., Wang, Q. H., Wang, S. C., Dai, M. Y., & Ma, M. H. (2012). The detection of hatching eggs prior to incubation by the near infrared spectrum. Spectroscopy Spectral Analysis, 32(4), 962-965.

Zhou, P., Zhao, C.J., Zheng, W.G., Wang, J.H., Sun, Z.F., & Wen Y.X. (2010). Fast method of egg image edge detecting based on dichotomy. Editorial Office of Transactions of the Chinese Society of Agricultural Engineering, 26(1), 238-242.

Zhu, Z., Liu, T., & Ma, M. (2015). Hatching eggs nondestructive detection based on hyperspectral-imaging information and RVM. Trans. CSAE, 31(15), 285-292.

Zou, X. R. (2009). Detection of fertility of hatching eggs based on computer vison and acoustic impulse technique. Nanjing Agricultural University.

Zou, X. R., Pan, L. Q., Kang, T. U., & Liu, P. (2010). Research progresses in non-destructive measurements on incubation quality of eggs. Sci. Technol. Food Ind., 31(2), 342-347.