49 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 © Global Society of Scientific Research and Researchers http://asrjetsjournal.org/ Detection on the Fertility of Hatching Eggs Based on Heart Rate Threshold Lei Genga, YuZhou Hub, JiangTao Xic*, YanBei Liud a,b,dSchool of Electronic and Information Engineering, Tianjin Polytechnic University, Tianjin 300387, China cSchool of Electrical, Computer and Telecommunications Engineering, University of Wollongong, NSW 2522, Wollongong, Australia aEmail: genglei@tjpu.edu.cn bEmail: huyuzhou1234567@163.com cEmail: jiangtao@uow.edu.au dEmail: liuyanbei@tjpu.edu.cn Abstract The fertility detection and classification of hatching eggs is extremely significant in the production of Avian influenza vaccine. A novel method by setting rational heart rate threshold to solve the problem that it’s difficult to separate the dead eggs from the normal eggs during the incubation process is proposed in this paper, which is critical to ensure the quality of vaccine. The object of our research is the 9-day-later hatching eggs, which are divided into two types, namely fertile eggs and dead eggs. Firstly, we collect heartbeat signal of the 9-day-later hatching eggs by the method of PhotoPlethysmoGraphy(PPG). Secondly, in order to reduce noise interference, we design a butterworth high-pass filter to filter the collected signal and remove baseline drift. Finally, two classification algorithms based on heart rate threshold and frequency spectral amplitude threshold are designed to detect the fertility of hatching eggs from time domain and frequency domain respectively. The experimental results demonstrate that the method we proposed successfully achieved the goal of high detection accuracy of hatching eggs, which also indicate that our approach is feasible for classification of hatching eggs. Keywords: Hatching eggs; Fertility detection; Butterworth high-pass filter ; Heart rate threshold. ------------------------------------------------------------------------ * Corresponding author. http://asrjetsjournal.org/ American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 50 1. Introduction At present, there are many methods for prevention and treatment of avian flu, but vaccination against avian influenza remains the most important preventive measure. In the process of culturing avian influenza virus strains, it is necessary to periodically detect the fertility of hatching eggs that have been inoculated to avoid vaccine contamination caused by necrotic embryos, which is of great significance for ensuring the safety of vaccine production. Currently, the fertility detection of hatching eggs adopts the method of traditional manual candling by judging the blood vessel characteristics of embryos[1]. Nevertheless, this method is easy to be affected by subjective factors and have disadvantage of low detection accuracy. In addition, workers who work hard for a long period of time are prone to pick up falsely and miss. Recently, there are a large number of methods for studying the fertility detection of hatching eggs. In the 1940s, Romanoff and Cottrell proposed the use of bioelectrical to detect the fertility of hatching eggs. By designing a radio frequency circuit for measuring the electrical conductivity of hatching eggs and calculating the correlation between electrical conductivity and dielectric constant, the target of detection was achieved [2,3]. Akibumi and his colleagues proposed the use of infrared thermography to collect the surface temperature of hatching eggs to determine the fertility of egg embryos [4]. Bamelis and his colleagues measured the light transmission spectrum of eggs by selecting a suitable light-transmitting light source, and used the spectrum to detect the vascular development of egg embryos and detect the fertility [5]. In 1992, for the first time, machine vision technology was introduced by researchers to study the fertility of hatching eggs. Das and his colleagues built a machine vision system to collect backlit images of embryo eggs [6,7], and then obtained histogram of hatching eggs. The characteristic parameters are analyzed by sequential analysis method to analyze the characteristic parameter values and predict the eggs fertility. In 2014, Xu and his colleagues designed a non-destructive testing system for hatching eggs fertility detection based on machine vision[8]. In 2005, Smith and his colleagues designed a hyperspectral imaging system to study hatching eggs fertility [9]. This is the first time researchers have used hyperspectral imaging techniques to study the development of hatching eggs. In 2014, Liu and his colleagues developed a near-infrared hyperspectral imaging system [10], extracting texture information from the acquired hyperspectral image of the embryo egg, and detecting the fertility of the early embryo egg based on the extracted texture information. Schellpfeffer and Kolesari overcome the B-ultrasound and Doppler effects in ultrasound imaging by using ultrasound microbubble development technology, which has a significant effect in studying the cardiovascular development of egg embryos [11]. In 1997, Lewin R and his colleagues detected the fertility of hatching eggs by using a pulse oximetry sensor and designing a measurement circuit [12]. Lately, there are many methods studying the fertility detection of hatching eggs, but there still remains many problems. However, the fertility detection of hatching eggs has an extremely important position in the preparation process of avian influenza vaccine. Besides, there is an urgent need for stable and high-precision automated fertility detection program. As an important feature that can directly reflect the activity of animals, heartbeat signal has the advantages of simplicity, reality and objective. The embryo heart rate detection method studied by the predecessors is easy to introduce environmental noise. In addition, poor stability and physical damage to the egg embryo during the process of acquiring the embryonic heartbeat signal is also inevitable. These factors lead to the inability to use the American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 51 embryo heart rate technology to detect the fertility of hatching eggs automately. In order to solve these problems, we propose a method by analyzing heartbeat signal of hatching eggs based on heart rate threshold to detect the fertility of hatching eggs. The main contributions of this work are as follows: • We collect heartbeat signal of hatching eggs by the method of PhotoPlethysmoGraphy(PPG) and design a butterworth high-pass filter to filter the collected signal and remove baseline drift. • We consider heartbeat signal of hatching eggs as the effective feature to distinguish between fertile eggs and dead eggs and design time domin and frequency domain classification algorithm based on threshold of heartbeat signal respectively. 2. Methods In this section, we mainly introduce data preprocessing and classification algorithms based on heart rate threshold of hatching eggs heartbeat signal. For the purpose of avoding noise interference, we design a second-order butterworth high-pass filter. Besides, we develope two classification algorithms based on hear rate threshold. 2.1 Butterworth high-pass filter design In this paper, 500 data points were collected for each hatching egg. The normal heartbeat frequency of 9- day-later hatching eggs ranges from 1Hz to 4Hz [13]. For the collected data, the data is filtered by high- pass filter to remove the interference caused by baseline drift and other low-frequency noise, and the original signal can be restored to the maximum extent aimming to provide more accurate data for the subsequent classification work. We design a digital Butterworth high pass filter with specific technical indicators. Sampling frequency 62.5sF Hz= , Passband cut-off frequency: 5pf Hz= , Passband minimum attenuation: 1dBd < , Stopband cut-off frequency: 0.5sf Hz= , Stopband minimum attenuation: 20tA dB> . We choose bilinear transformation method to design digital filter, and use Butterworth function to realize frequency response of digital filter approximating frequency response of analog filter. Detailed design steps are as follows: • Determining the digital angular frequency: 2 / 2 / p p s s s s w f F w f F p p =  = (1) • Predistortion processing: 2 cot 2 2 cot 2 s s s p p s w T w T   Ω =       Ω =     (2) American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 52 • Determine the order N: ( ) 10 10lg (10 1) (10 1) 2lg / at s p N d  − −   = Ω Ω (3) • Normalization and denormalization: /s s= Ω (4) • Conversion from Low to High Pass: 1 1/s s= (5) • Filter digitization: 1 1 1 2 1 T zs z − − + = − (6) A second-order butterworth high-pass filter is obtained by programming. The frequency response curve is shown in Figure 1. It can be seen from the figure that in the range of 0~1Hz stopband, the signal decays quickly and the filter suppresses the signal effectively. In the range of 1.5~5Hz passband, the filter retention is better and the signal attenuation is smaller. The above analysis shows that the designed filter can meet the requirements of this paper. 0 5 10 15 20 25 30 Frequency (Hz) 0 50 100 150 200 Ph as e (d eg re es ) 0 5 10 15 20 25 30 Frequency (Hz) -60 -50 -40 -30 -20 -10 0 M ag nit ud e (d B) (a) Amplitude-frequency characteristic curve Figure 1: Butterworth high-pass filter design curve American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 53 2.2 Data filtering The collected heartbeat signal of hatching eggs is depicted in Figure 2, we can see that the difference of waveform between fertile egg and dead egg is not so obvious. Despite the waveform of fertile egg presents a periodic trend, the amplitude changes are not outstanding compared to dead egg. The noise introduced into signal and baseline drift could account for this reason, and consequently the filtering operation is necessary before processing data. Figure 3 shows the filtered heartbeat signal corresponding to the original heartbeat signal depicted in Figure 2. We take the last 350 stable data of the filtered signal as the sampling points. Apparently, the difference between fertile egg and dead egg on heartbeat signal waveform becomes more obvious, which is conducive to subsequent classification algorithms. Figure 2: The original waveform of collected heartbeat signal of hatching eggs Figure 3: The filtered waveform of collected heartbeat signal of hatching eggs 0 50 100 150 200 250 300 350 400 450 500 data point 0 0.5 1 N or m al iz ed in te ns ity /c d Fertile egg 0 50 100 150 200 250 300 350 400 450 500 data point 0 0.5 1 N or m al iz ed in te ns ity /c d Dead egg 0 50 100 150 200 250 300 350 data point 0 0.5 1 N or m al iz ed in te ns ity /c d Fertile egg 0 50 100 150 200 250 300 350 data point 0 0.5 1 N or m al iz ed in te ns ity /c d Dead egg American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 54 2.3 Method for detecting the fertility of hatching eggs We analyze and process the collected hatching eggs heartbeat signal data from the time domain and frequency domain perspectives. According to the difference of heartbeat frequency between fertile egg and dead egg, a method for detecting the fertility of hatching eggs based on heart rate threshold was proposed. The classification algorithm is designed from time domain and frequency domain to achieve the purpose of detecting the fertility of hatching eggs. 2.3.1 Time domain analysis of hatching egg fertility Time domain analysis of signals is the basis of signal analysis. As for the heartbeat signal of hatching eggs, since the heartbeat frequency is not fixed, it is in the range of 1~4Hz, so it can be treated as a periodic signal approximately. Period is the most common feature parameter in signal time domain analysis, so we choose it as characteristic parameters to distinguish fertile eggs and dead eggs. For periodic signals, the period can be determined by the time interval between two adjacent peaks. Figure 4 shows the height of the heartbeat signal of the normal embryo. We use the extremum method to find the heartbeat signal period of hatching eggs. Firstly, we extract all the maximum value points of the waveform signal, and then select the qualified time domain feature points among the maximum value points. For sequences ( )t n , the principle of using extremum method is: if ( ) ( 1)t n t n≥ + and ( ) ( 1)t n t n≥ − , so point ( , ( ))n t n is the extreme point of the sequence, ( )t n is corresponding extreme value. h Figure 4: The height of normal hatching egg heartbeat signal The extreme method is used to find the extreme points of the hatching egg heartbeat signal, and the result is shown in Figure 5. As can be seen from Figure 5, all the extreme points can be obtained from the hatching egg heartbeat signal by the extreme method. In addition, the extreme value of the dead egg signal is more than that of the fertile egg, and the frequency of occurrence is higher, but the distance between the extreme points is smaller. Also, the extreme value of the dead egg heartbeat signal is much smaller than that of the fertile egg. We design a time domain algorithm for classifying hatching egg heartbeat signals, the concrete steps are as follows: • Input heartbeat signal sequence ( )x n , the length is 500. • The designed high-pass filter is used to pre-process ( )x n , and then get the processed sequence ( )z m , American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 55 the length of sequence is 350. • Calculate peak set { }1 1 2 2( , ), ( , ),...( , )k kF x y x y x y= from ( )z m , Where kx represents the peak corresponds to the abscissa while ky is peak ordinates. • Make a difference to the abscissa of the set F , as shown in formula (7). 1,1l l lt x x l k−= − ≤ ≤ (7) Calculate the difference set T of the abscissa as the preliminary period set { }1 2, ,..., lT t t t= . • Set the period threshold range AT to eliminate outliers, compare the element lt in the set T with the value of AT . If it is greater than AT , it is recorded as 1, otherwise it is recorded as 0. • Count the number C of 1 in step (5) and set the threshold N of the heartbeat period, then compare C with N to get the category of the input signal. Figure 5: Maximum points distribution map of hatching egg heartbeat signal 2.3.2 Frequency domain analysis of hatching egg fertility In order to make full use of the information contained in the heartbeat signal of hatching eggs, it is necessary to further analyze the frequency structure of the signal in the frequency domain. The heartbeat signal of hatching eggs is an approximate periodic signal, which can be converted into frequency domain American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 56 by Fourier transform. The curve characteristics of specific frequency range can be analyzed in frequency domain, and then useful information for hatching eggs classification can be extracted. Unlike the partial feature of the signals which can only be extracted in time domain, the frequency spectrum of the heartbeat signals of hatching eggs can reflect the overall characteristics of the signal, which is beneficial for effectively distinguishing the fertile eggs from the dead eggs. In the frequency domain analysis of hatching egg heartbeat signal, the signal is filtered to remove noise interference, so that the frequency spectrum obtained can more intuitively and reflect the effective frequency composition of the signal. What’s more, for the filtered signal, window function can reduce the measurement error caused by frequency spectrum leakage. Among several common window functions, Hanning window is more suitable for analyzing narrow-band signals with strong noise interference due to its small frequency leakage and amplitude fluctuation, which is suitable for hatching egg heartbeat signals. Hanning window function is represented by ( )W n which is shown as follows: 1 2 ( 1)( ) 1 2 nW n N p −  = −      (8) Window calculation of the signal can reduce the frequency spectrum leakage to a certain extent, but it will attenuate part of the energy of the original signal, so the correction factor should be added to the final result. Figure 6 shows the frequency spectral comparison of heartbeat signals of hatching eggs before and after adding Hanning window function. (a) The frequency spectrum of fertile egg (b) The frequency spectrum of fertile egg after windowing 0 1 2 3 4 5 Frequency/Hz 0 200 400 600 800 Am pli tu de /cd 0 1 2 3 4 5 Frequency/Hz 0 100 200 300 400 Am pli tu de /cd 0 1 2 3 4 5 Frequency/Hz 0 50 100 150 Am pli tu de /cd 0 1 2 3 4 5 Frequency/Hz 0 10 20 30 40 50 Am pli tu de /cd Figure 6: Frequency spectrum contrast before and after windowing After adding window function to the heartbeat signal in time domain, the signal is converted from time American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 57 domain to frequency domain by Fourier transform, and the frequency response of the signal is obtained. If the heartbeat signal of hatching eggs is expressed as ( )y n and the discrete Fourier transform is ( )Y k , the Fourier transform formula of the heartbeat signal of hatching eggs is as follows: ( 1)( 1) 1 ( ) ( ) N j k N j Y k y j ω − − = = ∑ (9) Where N represents sampling points, k is the position of the frequency point after Fourier transform, then the frequency kF at point k is: ( 1)* /k sF n F N= − (10) Where sF is the sampling frequency. Subsequently, the first main peak point is extracted in the set frequency range. In Figure 7, the coordinate points in the frequency spectrum of fertile eggs are the first main peak of the extracted spectrum amplitude. The extracted frequency value is 3.393 Hz and the corresponding amplitude is 344.3 cd. Finally, the first peak F and the set peak threshold T are compared to get the signal category. 0 50 100 150 200 250 300 350 data point -4000 -2000 0 2000 4000 Am pl itu de /c d 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Frequency/Hz 0 100 200 300 400 Am pl itu de /c d X: 3.393 Y: 344.3 (a) The waveform of fertile egg Figure 7: Time domain waveform and frequency spectrum contrast of fertile egg American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 58 3. Experiment and results analysis Aiming at the time-domain and frequency-domain hatching egg heartbeat signal classification algorithm designed in this paper, experiments are designed to verify and evaluate the effectiveness of the algorithm. The data set used in the experiment is composed of sequence heartbeat signal of hatching eggs after high- pass filtering. The length of the sequence is 350, the sample size of the data set is 30000, and the proportion of positive samples and negative samples is 1:1. The experiment evaluates the performance of the algorithm by using different thresholds, and draws tables and curves to assist the description. 3.1 The experiments of time domain classification algorithm For normal hatching eggs, the heartbeat rate ranges from 1 to 4 Hz. When the number of heartbeat signal sequence is 350, the interval points of one periodic sequence corresponding to normal heartbeat signal range about [15,63]. Therefore, in the experiment, D1 takes 15, D2 takes 63. When the sample sequence length is 350, the corresponding sampling time Ts is 5.6s because the sampling rate is 62.5Hz. The number of heartbeat period corresponding to normal hatching eggs in Ts time ranged from [5.6,22.4]. In the experiment, the upper limit of period number T2 was 25, and the lower limit of period number T1 was taken as the actual period threshold. In the experiment, firstly, the input heartbeat signal of hatcing eggs is denoised by high-pass filtering. Then, the extreme point of the filtered signal is calculated as the peak point in the time domain. Next, the period interval is obtained by calculating the abscissa difference between the adjacent extreme points. Finaly, the period interval is compared with the set period interval range [D1, D2], and the statistical period number Tc is obtained. In addition, the Tc is compared with the actual threshold range of peirod number [T1, T2], the eligibility is 1, otherwise it is 0. The fertile eggs are defined as positive samples, and the dead eggs are defined as negative samples. In the test, the number of fertile eggs detected correctly in the samples is defined as TP, and the number of fertile eggs detected falsely is defined as FN. The number of dead eggs detected correctly in the sample is defined as TN, and the number of dead eggs detected as fertile eggs is defined as FP. We calculate Accuracy, Precision, Recall and F1 score according to formula (11): 2* *1 TP TNAccuracy TP TN FP FN TPPrecision TP FP TPRecall TP FN Precison RecallF Precison Recall + = + + +  = +   =  +   = + (11) Table 1 shows the Accuracy, precision P, recall R and F1 scores of the threshold T1 for different number of heartbeat signal period. From Table 1, it can be seen that the accuracy of time domain algorithm is American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 59 constantly changing with the change of threshold T1 of heartbeat periodic number. When T1 is 4, the error detection number of the algorithm is the least, the accuracy rate is the highest up to 98.11%, and the F1 score is the highest up to 98.10%. At this time, threshold T1 is the best threshold of the algorithm in the current data set. When T1 is 6, the algorithm predicts more actual positive samples in the positive samples, the accuracy is 99.82%. If we prefer to choose the actual positive samples, the threshold T1 should be 3. At this time, the recall rate of Recall reaches 98.28%, and the prediction accuracy of positive samples is high. Table 1: Performance comparison of time domain algorithms based on heart rate threshold T1 T1(Hz) Sample Distribu -tion Recognition result False detec -tion Accuracy (%) Precision (%) Recall (%) F1score (%) P N 3 P(15000) 14743 257 697 97.68 97.10 98.28 97.69 N(15000) 440 14560 4 P(15000) 14613 387 567 98.11 98.79 97.42 98.10 N(15000) 180 14820 5 P(15000 14446 554 613 97.96 99.60 96.30 97.92 N(15000) 59 14941 6 P(15000 14243 757 793 97.39 99.82 94.95 97.32 N(15000) 26 14974 Figure 8 is a scatter plot of Accuracy change when taking threshold T1 of different heartbeat signal period. It can be seen from the graph that when the threshold T1 is small, the period of positive samples falls in the range of T1~T2, while that of negative samples falls in the range of D1~D2, so the number of samples falls in the range of T1~T2 is small, which leads to higher overall accuracy. When T1 takes 4, the classification accuracy reaches the highest level which is up to 98.11%. Thereafter, with the increase of T1, some samples with lower beating frequency in positive samples were missed, the number of missed samples increased with the increase of T1, resulting in the decrease of accuracy. When T1 exceeded the set threshold, the accuracy would drop to zero. This is because the heartbeat frequency of normal hatching eggs would not exceed this upper limit under conventional cultivation conditions. American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 60 Figure 8: Scatter chart of Accuracy change with T1 in time domain 3.2 The experiments of frequency domain classification algorithm In the experiment, firstly, the collected heartbeat signal of hatching eggs is filtered by high-pass filter designed in this paper. Then the filtered signal is added with Hanning window. Finally, the signal is transformed from time domain to frequency domain by Fourier transform. In frequency domain, because the heartbeat signal frequency of normal hatching egg ranges from 1Hz to 4Hz, the first main peak is extracted from the frequency spectrum in this range, and the peak value is compared with the set threshold T of frequency spectrum amplitude. If the peak value is larger than T, it is recorded as 1 (including T), otherwise it is 0. The definition and calculation of experimental parameters are described in Section 3.1. Table 2 shows Accuracy, precision P, recall R and F1 scores under different frequency spectral amplitude threshold T ranges. Table 2 indicates that when the frequency amplitude T is 70, the accuracy reaches the highest up to 96.60%, and the comprehensive performance index F1 score is also the highest, reflecting the optimal threshold of the frequency domain algorithm. When evaluating the proportion of fertile eggs to the total positive samples, the threshold T should be 80, and the precision P is 95.14%. If we want to pay attention to the actual prediction of the performance of the algorithm, the threshold T should be 60, and the recall R reaches 99.41%. Figure 9 shows the change of Accuracy with different frequency spectral amplitude thresholds T. With the increase of T, Accuracy presents a curve state of first increasing and then decreasing. When T is 70, Accuracy reaches a maximum of 96.60%. When threshold T starts to take a smaller value, all positive samples are judged to be correct, while a large part of negative samples fall into the wrong category, which results in more wrong judgements and lower accuracy. When T increases to the maximum point, Accuracy decreases with the increase of T, because some American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 61 positive samples are misjudged as negative samples. Table 2: Performance comparison of frequency domain algorithms based on heartbeat signal frequency amplitude threshold T T(cd) Sample Distribu -tion Recognition result False detec -tion Accuracy (%) Precision (%) Recall (%) F1score (%) P N 60 P(15000) 14912 88 1126 96.25 93.50 99.41 96.36 N(15000) 1038 13962 70 P(15000) 14842 158 1020 96.60 94.51 98.95 96.68 N(15000) 862 14138 80 P(15000 14725 275 1027 96.57 95.14 98.17 96.63 N(15000) 752 14248 Threshold T Figure 9: Scatter chart of Accuracy change with T in frequency domain 3.3 Results analysis The experimental results show that the proposed time-domain and frequency-domain classification algorithm based on heart rate threshold performs well on the heartbeat sequence data set with the highest American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 62 classification accuracy of 98.11% in the time domain and 96.60% in the frequency domain. It can be seen that the time-domain and frequency-domain classification algorithms of hatching eggs based on heart rate threshold designed in this paper are feasible to a large extent. However, the threshold-based algorithm is sensitive to the features and threshold selection used. Owing to the different development of hatching eggs at different stages, the heartbeat signal intensity of hatching eggs is also different, causing the difference of different batches of data, thus, the algorithm needs to select multiple thresholds to meet the accuracy requirements. 4. Conclusion In this paper, we proposed a method detecting the fertility of hatching eggs based on heart rate threshold. Firstly, we collected the heartbeat signal of 9-day-later hatching eggs and designed a butterworth high-pass filter to preprocessed data. Then, we designed two classification algorithms, one is based on heart rate threshold in time domain and another is based on heart rate amplitude threshold in frequency domain. In the end, in order to verify the effectiveness of the proposed algorithm, we use the data set of hatching eggs heartbeat sequence after high-pass filtering to test the two algorithms respectively. Experimental results demonstrate that the algorithm we proposed in this paper is feasible to detect the fertility of hatching eggs with detection accuracy up to 98.11%. However, our algorithm is sensitive to the features and threshold selection used, thus, our next goal is to design a time-frequency domain algorithm that can dynamically adjust the hear rate threshold. References [1] Hoyle L. The multiplication of influenza viruses in the fertile egg[J]. Epidemiol. Infect., 1950, 48(3):277-297. [2] Romanoff A L, Cottrell C L. Fertility Study of Fresh Eggs by Radio Frequency Conductivity and Dielectric Effect[J]. Exp. Biol. Med., 1939, 42(1):298-301. [3] Romanoff A L, Frank K. High Frequency Conductivity and Dielectric Effect of Fresh Fertile and Infertile Hens'Eggs[J]. Exp. Biol. Med., 1941, 47(2):527-530. [4] Danno A, Miyazato M, IsHIGURO E. Quality evaluation of agricultural products by infrared imaging method[J]. Mem. Fac. Agr. Kagoshima Univ, 1980, 16: 157-164. [5] Bamelis F R, Tona K, De Baerdemaeker J G, et al. Detection of early embryonic development in chicken eggs using visible light transmission[J]. Br. Poult. Sci., 2002, 43(2):204-212. [6] Das K, Evans M D. Detecting Fertility of Hatching Eggs Using Machine Vision I. Histogram Characterization Method[J]. Trans ASAE, 1992, 35(4):1335-1341. [7] Das K, Evans M D. Detecting Fertility of Hatching Eggs Using Machine Vision II: Neural Network American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 53, No 1, pp 49-63 63 Classifiers[J]. Trans Asae., 1992, 35(6):2035-2041. [8] Xu Q, Cui F. Non-destructive detection on the fertility of injected SPF eggs in vaccine manufacture[C]. //Chinese Control and Decision Conference(CCDC), The 26th Chinese. IEEE, 2014: 1574-1579. [9] Smith D P, Mauldin J M, Lawrence K C, et al. Detection of fertility and early development of hatching eggs with hyperspectral imaging[C]. //Proc. 11th European Symposium on the Quality of Eggs and Egg Products Netherlands: World’s Poultry Science Association. 2005: 176-180. [10] Liu L, Ngadi M O. Detecting Fertility and Early Embryo Development of Chicken Eggs Using Near- Infrared Hyperspectral Imaging[J]. Food Bioprocess Technol., 2013, 6(9):2503-2513. [11] Schellpfeffer M A, Kolesari G L. Microbubble contrast imaging of the cardiovascular system of the chick embyro[J]. Ultrasound Med. Biol., 2012, 38(3):504-510. [12] hLewin R, Dörner M, Tönardt H. Pulse oximetry: a new way of determining the heart rate in chicken embryos[J]. Pflugers Arch., 1997, 434(5):639-641. [13] Moriya K, Pearson J T, Burggren W W, et al. Continuous measurements of instantaneous heart rate and its fluctuations before and after hatching in chickens[J]. J. Exp. Biol., 2000, 203(5): 895-903. 1. Introduction 2. Methods 2.1 Butterworth high-pass filter design 2.2 Data filtering 2.3 Method for detecting the fertility of hatching eggs 2.3.1 Time domain analysis of hatching egg fertility 2.3.2 Frequency domain analysis of hatching egg fertility 3. Experiment and results analysis 3.1 The experiments of time domain classification algorithm 3.2 The experiments of frequency domain classification algorithm 3.3 Results analysis 4. Conclusion References