10 1109@tencon 2018 8650320

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

Development of Fertile Egg Detection and Incubation


System Using Image Processing and Automatic
Candling
Lean Karlo S. Tolentinoa,b,*, Emmanuel Justine G. Enricoa, Ralph Lawrence M. Listancoa,
Mark Anthony M. Ramireza, Ted Lorenz U. Renona, Mark Rikko B. Samsona
aElectronics Engineering Department, Technological University of the Philippines, Manila, Philippines

bCenter for Engineering Design, Fabrication, and Innovation, College of Engineering, Technological University of the Philippines,

Manila, Philippines
*leankarlo_tolentino@tup.edu.ph

Abstract— This paper presents the development of an technology advances more and more manual techniques turns
incubation system for autonomous temperature and humidity into automated processes. Commercial state-of-the-art
control using Arduino microcontroller interfaced and coded using hatcheries now have sensors that detect these certain parameters
LabView programming. The proposed system also includes and adjust it according to the optimal value so that there will be
important functions to hatch eggs which are candling through no discrepancy in the incubation process. Though technological
infertile egg identification using basic image acquisition, and egg advancements have riddled the field of incubation of eggs,
turning that employs crank-rocker mechanism and a hatching incubation may still run into several issues. The breeder needs to
chamber. It revolves around fusing all the elements of egg check these common incubation problems: temperature
incubation and turning it into one device. It functions
difference inside the incubator, as well as humidity, inadequate
autonomously without having to consistently check and adjust to
obtain optimal parameters. By using its monitoring features, the
ventilation, irregular turning of eggs and egg sanitation [4]. With
user can have real-time data of the day-to-day status of the this, an incubator must possess a reliable program and hardware
incubator’s parameters. The speed of its automatic candling system and an accurate reading from its sensor so as to function
program is 1.129 seconds while the performance of the incubator as an effective incubator to handle the eggs for 21 days straight
held an optimal temperature of 36º Celsius with humidity between without requiring any human intervention [5]. Also, candling of
40% and 60% with an optimal level of 50%. Lastly, the hatch rate eggs need to be done by hand because traditional candling is
percentage of the incubation using the proposed system is 69.44% done manually. Besides being a tedious job because the handler
while the percentage accuracy result for detecting fertile eggs is must individually check for development of an egg, the
91.43%. temperature changes of handling the egg outside the incubator
can also affect the mortality rate of the eggs [6]. There are many
Keywords—candling, image processing, incubation, fertile egg digital techniques [7-11] that differentiate good eggs for
detection, hatching, turning incubation and bad eggs that are not fit for it, though these
researches do not apply specifically for detecting fertile eggs but
I. INTRODUCTION these studies greatly influence viability for incubation. One
method “applied an adaptive threshold based on discontinuities
Artificial incubators have been popular throughout the
determination of the filtered images for detecting eggshell
modern world as well as in the past way back ancient times.
defects such as dirt and cracks” which used 120,640 by 480
Based on historical records, [1], citing [2] and [3], mentioned
images to train the machine vision system which had an accuracy
that in ancient Egypt, eggs were incubated inside buildings
of 99% [6]. Other studies include finding blood spots and
which are made up of mud bricks divided by rooms and heated
obtaining dirt severity to classify the eggs as infertile as this
by burning straw and charcoal. They control the temperature by
influences egg fertility, such is the case of M.H. Dehrouyeh et
opening vents and manholes for the heat to escape and have
al. They have obtained an accuracy of 90.66, 91.33, 80.33% on
openings for the smoke to exit. Humidity is induced by placing
finding blood spots of egg from intact, defected and low dirt
moistened jutes inside and eggs were manually turned twice per
eggshells respectively and 88% and 86% for dirt detection on
day. It was not until the 1749 that the first mechanical incubator
high dirt and low dirt in eggshells respectively [8]. “A near-
was invented by Reamur in Paris, France and the first incubator
infrared hyperspectral imaging system was created to spot
to be commercialized was the work of Hearson in 1881 [1].
fertility and embryo development. After imaging on each day,
Artificial egg incubators’ objective is to recreate a brooding developing embryos in randomly selected eggs were stopped by
hen’s environment so that the eggs would hatch into a healthy injecting sodium azide (NaN3 ).” All the eggs were classified into
chick. The parameters or factors that are needed to be controlled two: fertile and non-fertile eggs. This study is not like the others
by the incubator are temperature, humidity, ventilation and egg as accuracy degrades for day 1 and 2 of incubation. Results
turning. If all of these factors are regulated, this will provide the stated as day 0 accuracy is at 100%, 78.8% at day 1, 74.1% at
perfect environment for the development of the embryo. As day 2, 81.8% at day 3, and 84.1% at day 4. Results showed that

978-1-5386-5457-6/18/$31.00 ©2018 IEEE 0701


Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

texture information is more suitable to detect early embryo


development than detecting fertility before incubation [9]. All
these devices proved to be accurate and efficient in detecting
fertility of eggs. However, there is one problem. All of these
mentioned are separate devices that can only be functional if the
eggs are transferred from the incubator.
The impracticality of removing eggs from the incubator to
check growth development and fertility is tedious and is time
consuming if it is done on a large number of eggs. As a solution
to the problem, an egg candling mechanism inside an incubator
was incorporated and designed which in turn will reduce the time
invested in candling and will detect undeveloped eggs and
classifies it from the rest of developing eggs to avoid the
contamination of the incubator due to the phenomena of
“exploding eggs” and premature death of chicks due to
mishandling of eggs; and an effective system for temperature
and humidity control to produce the optimal incubator
parameters for the development of chicks. The quality of
embryonic eggs is affected by pre-incubation factors that Fig. 1. Block Diagram of the Proposed System
influence the egg hatchability, chick quality, bird survival and
chick growth performance [1]. The optimal temperature for the
incubation of eggs is 37º to 37.5 º C and relative humidity of B. Hardware Development
55% [12, 13]. Temperature and humidity sensors were used to Figure 2 below shows the dimension of the proposed
determine the condition of the incubator and automatically incubator and the placement of chambers where the biggest one
change for the appropriate condition for the egg [5]. This study is the incubation chamber the smaller ones on the left side is the
is limited only to different chicken egg breeds with white shelled laptop room and hatched chick room while the chamber farthest
eggs. For the candling function this study includes a camera that to the left is the circuit room. All image-processing hardware is
will capture an image during the 10th day of incubation to installed at the top of the incubation chamber
distinguish these eggs that were not developed to efficiently
remove these undeveloped eggs.
Poultry hatching businesses will benefit in this study as it
will help lessen the time and human contact by automating
candling process and remedies the improper way of controlling
the temperature and humidity inside the incubator which in turn
leads to unfertilized eggs. Through this study, the two major
500 mm
parameters: humidity and temperature will be accurately
monitored and controlled and candling of eggs which has been
manually done will be electronically achieved through the use of
1000 mm
a custom designed tray and a vision system that strategically uses
the LabView programming software to identify infertile and 450 mm
fertile eggs. Fig. 2. Physical Design of the Proposed Incubation System

II. METHODOLOGY C. Temperature and Humidity Correction System


A. Block Diagram The correction system as shown in Figure 3 for the
temperature fluctuations consists of the PTC heating element
Figure 1 shows the block diagram for the autonomous partnered by fan and the detection system is Arduino Nano with
incubator. The inputs in the system of this study are the DHT 11 sensor. Once the temperature drops below the threshold,
temperature and humidity sensors, the camera which will capture the detection system sends a signal to the correction system
the image of the egg during candling process and the power turning on the whole system and turns off if temperature exceeds
source. Automatic control of the incubator is achieved through threshold. The temperature sensor is installed at the far side of
the sensing of parameters by the DHT11 sensor installed therein. the tray directly in the line-of-sight of the fan distributing the
Then these data are processed by the microcontroller in which it heat.
decides whether it will switch the devices that will control these
parameters: humidity, temperature, and ventilation.

0702
Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

In designing a crank rocker mechanism, arm lengths a, b, c,


and d should be given and θ1 and θ2 should define the arm’s
initial position, t will be the output angle and since there will be
2 solutions it will be related to open and crossed positions of the
arms.

(a) PTC heating (c) Heating Chamber


element (b) Fan System
Setup

Fig. 3. Physical Design of the Proposed Incubation System

D. Egg-Turning Motor Control System Design (b) Stepper


The crank-rocker mechanism as shown in Figure 4 is a type (a) Modified Tray
Motor Joint (c) Motor
Cooling System
of four bar mechanism where one arm achieves full rotation Setup
while the other mechanism only “rocks” in its position. The
crank rocker design was a suitable design for achieving an angle Fig. 5. Egg-Turning System
exactly 45 degrees tilting for the tray. Also it was suitable for the
space requirement since the design does not need much space to The modified tray has LED strip lights below where eggs can
cover for installation inside the incubator. As shown in Figure 4 be illuminated without removing the eggs from the tray has been
and denoted by Equation 1, variables a and b will be the rotating installed. Egg turning mechanism that employs a crank-rocker
arm, c is the length of the joint from the rotating point of tray, inspired design turns the eggs 45 degrees both sides every 8
and d is the distance between the two rotating points; one for the hours per day. The timing program is uploaded in the Arduino
motor and one for the tray. Nano. The stepper motor is installed with a fan cooling system
In the design of the egg turning mechanism, the tray should partnered with heat sink to reduce the heat the motor is
oscillate 45 degrees in an upward and downward motion, so the experiencing. An egg turning system is needed in order for the
angles of extremities in which the R4 bar will make must be growing embryo to not bind into the membrane of the eggshell
considered. R4 must make a right angle from its initial position [14].
up to its maximum extension. The reason for this is because the
R4 bar in the actual design will be length of the tray. The tray E. Camera-Assisted Candling System
will be horizontally aligned with the 45-degree angle that R4 Figure 6 shows the program flow on how the software
makes from its initial position up to its maximum extension. As operates. First, the program reads the image then starts
the mechanism oscillates the tray will achieve the 45 degrees processing for color detection the program will decide based on
oscillation from the x-axis where the tray is aligned. the color of the eggs. If the eggs are still translucent after days of
incubation, the program will detect it otherwise it will not.
bei3  cei4  aei2  dei1  Z (1)
Read Image for
Camera

Color Location

Fig. 4. Crank-rocker Mechanism Yes Do the eggs


Locate the eggs have the dark
color?
The unknown variables for the equation are on the left side
and the known variables are on the right which would be No
represented as Z. Z bar is the conjugate equivalent of the first
equation. Display
Results

( ZZ  c 2  b 2 )  ( ZZ  c 2  b 2 ) 2  4c 2 ZZ
t (2)
2cZ Fig. 6. Image Processing Program Flowchart

0703
Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

The camera is installed directly at the top of the incubator


overlooking the tray. The camera should capture all the eggs in
the tray so in processing the image all could be color detected
and identified whether the egg is a porous egg with no semen or
a fertile egg. The programming software used for the processing
is LabView with NI Vision Assistant.

Fig. 9. Temperature and Humidity Level

(a) Modified Tray Setup with Eggs (b) Camera Snapshot of Tray
The incubator’s system functionality was tested and at the
same time data were gathered for validation if the incubator does
maintain the right level of humidity and executes the program
accurately. Temperature and humidity is gathered every 5
Fig. 7. Modified Tray Setup minutes for an hour to test if the incubator can maintain the
optimal temperature and humidity.
Since the distinction between clear (undeveloped) and
developing eggs is visible for human eyes, a color space should Figures 10 & 11 show the performance of incubator for 3
be used that will be closer to human operator performance. Thus, days of continuous usage. Data shows that the temperature was
color location was used. By having an image type of RGB (32- held on to optimal level (36 degrees) and humidity on its
bit) and Day 1 eggs as templates for the image processing, the acceptable level which is between 40% and 60% with 50% as
difference between the eggs can be determined. The steps of the the optimal level.
image processing are: 1) input the image of Day 1 eggs as a
template for the color location to be used. 2) Adjust the
minimum score of the color location setup between 600 to 800
and the color sensitivity to high sensitivity. The researchers used
a minimum of seven color location setups for the image
processing. The image of Day 1 eggs is critical for determining
the undeveloped eggs at Day 10 since the Day 1 eggs are porous
against Day 10 eggs that have a dark color. By inputting the Day
10 image through the NI Vision assistant program, the
undeveloped eggs will be determined.

Fig. 10. Temperature Endurance Test Readings of the Incubator for 3 Days

Fig. 8. Candling Program

F. Incubator Testing and Data Gathering


The incubator’s system functionality was tested and at the
same time data were gathered for validation if the incubator does
maintain the right level of humidity and executes the program
accurately. Fig. 11. Temperature Endurance Test Readings of the Incubator for 3 Days

0704
Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

III. RESULTS AND DISCUSSION B. Traditional and Automated Candling Accuracy


Figure 12 shows the darkening of eggs which indicates Comparison
growth of the embryo cultured in the egg while Figure 13 shows During the sensory comparison evaluation of the eggs in the
the difference in imagery of manually candled eggs and eggs proposed system by the breeder in the farm, the specialist
candled using the incubator’s built-in candling design. In order detected there are 7 eggs that are not suitable for incubation
to compensate for the lighting discrepancy of the incubator’s anymore. Four of the seven eggs (Egg #15, 16, 20 and 39) are
candling, the researchers used image manipulation to heighten porous eggs or infertile. These are infertile eggs which do not
the efficiency of image processing done on the eggs. The have semen in the first place while the remaining eggs are eggs
threshold in the color changing process which was set for the that encountered various incubation problems like cracked shell,
system is the difference of the dark areas of the eggs for day 1 etc. The camera-assisted candler detected 4 of these infertile
and day 10. The images captured during these days were feed as eggs but not the other undeveloped eggs. The value for sensory
training data using LabView image processing toolbox. Once a evaluation is 7 eggs detected and for automatic candling the
sample image was tested in the LabView developed program, value is 4 eggs detected. As traditional candling is very accurate
fertile and infertile eggs will be immediately determined. as it checks for every signs of death in the egg traditional
candling garnered 100% accuracy because 7 out of 7 eggs are
porous or infertile. Therefore candling accuracy for fertile eggs
using traditional method is 100% and for the automated method,
since 4 out of 7 eggs have been detected infertile, the subsequent
percentage accuracy result for detecting fertile eggs is 91.43%.
In which the result have been computed by subtracting the
percentage error of 3 out of 35 which is 8.57 % from 100%.
Figure 14 shows the color detection results made by the
Day 1
program in determining the fertility of eggs after the 10th day of
Day 10 Day 18 incubation. Figure 15a shows the 7 unfertilized eggs (boxed in
red0 which are detected using sensory evaluation. 4 eggs are
detected as unfertilized using the developed LabView program.
Fig. 12. Incubation Progress

(b) Actual position of eggs Fig. 14. Color Detection Program of Candling Software
(a) Reconstructed manually candled eggs

Fig. 13. Reconstructed manual candling versus actual tray candling

A. Traditional and Automated Candling Time Comparison


After 3 trials of manual candling, the average time it took for
one breeder to candle all 42 eggs was determined to be 396.667
seconds while the time it took for the candling program to
process the candling is only 1.129 seconds. By computing for the
percent difference, the resulting percentage will be in favor of
automatic candling. The automatic candling proved to be 35,034
% faster or 350.34 times faster than traditional candling. The
large difference in time is due to the program’s nature that it
detects all the eggs through one picture only while in manual
candling the eggs are individually assessed.

Fig. 15. Comparison of Detected Eggs by (a) Traditional Sensory Method and
(b) Proposed System. The Labview program automatically indicates the 4
unfertilized eggs in red squares.

0705
Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

C. Hatch Rate Extension Council of the Technological University of the


Figure 15 shows the newly hatched chicks from the Philippines. The University is highly acknowledged for the
incubation. They are placed in a warm cage immediately by the financial support. The authors would like to thank poultry
farm personnel/ caretaker to ensure their survival. owners, specialists, and consultants, Engr. Marvin Castro and
25 out of 42 eggs were hatched using the prototype Engr. Marlon Castro of Marlon’s Poultry Farm located at San
incubator which means 18 eggs did not hatch. In those 18 eggs Jose, Batangas, Philippines for the support and assistance in the
that did not hatch, 7 are detected infertile by traditional candling conduct of the study and to our colleagues and professors from
and the remaining 11 eggs are fertile but had pre-incubation the Electronics Engineering Department for the encouragement.
problems. Those 11 eggs have not fully developed during the
process of incubation. REFERENCES
The hatch rate percentage of the incubation is 69.44% as 25
[1] I. C. Boleli, V. S. Morita, J. B. Matos Jr, M. Thimotheo, and V. R.
out of 36 determined fertile eggs were successfully hatched. Almeida, “Poultry Egg Incubation: Integrating and Optimizing Production
Although all the variables in incubation have been considered, Efficiency,” Revista Brasileira de Ciência Avícola, vol. 18, no. SPE2, pp.
variables which are outside the scope of the study that is related 1-16, 2016.
to breeding have also a great influence in the disparity between [2] M. Paniago, “Artificial incubation of poultry eggs - 3,000 years of
history,” Hatchery Expertise Online, pp. 1-3, 2005. [Online]. Available:
the hatched and unhatched eggs. While the study achieved http://www.thepoultrysite.com/focus/contents/ceva/OnlineBulletins/ob_2
success in efficient incubation and enhanced monitoring of egg 005/Article-No2-Sept05.pdf. [Accessed: Mar. 1, 2018].
development, hatch rate is still influenced by the health history [3] W. Van der Sluis. “Egyptians hatch eggs the tradtional way,” World
of the flock, the rooster’s breeding ability and genetics. Poultry, vol. 27, no. 3, p. 18, 2011.
[4] A. M. King’Ori, “Review of the factors that influence egg fertility and
hatchability in poultry.” International Journal of Poultry Science, vol. 10,
no. 6, pp. 483-492, 2011.
[5] P. E. Okpagu and A. W. Nwosu, “Development and temperature control
of smart egg incubator system for various types of egg,” European
Journal of Engineering and Technology, vol. 4, no. 2, 2016.
[6] M. Hashemzadeh and N. Farajzadeh, “A Machine Vision System for
Detecting Fertile Eggs in the Incubation Industry,” International Journal
of Computational Intelligence Systems, vol. 9, no. 5, pp. 850-862, 2016.
[7] H. R. Pourreza, R. S. Pourreza, S. Fazeli, and B. Taghizadeh, “Automatic
detection of eggshell defects based on machine vision.” Journal of Animal
and Veterinary Advances, vol. 7, no. 10, pp. 1200-1203, 2008.
[8] M. H. Dehrouyeh, M. Omid, H. Ahmadi, S. S. Mohtasebi, and M. Jamzad,
“Grading and quality inspection of defected eggs using machine
vision,” International Journal of Advanced Science and Technology,
vol. 17, no. 4, pp. 23-30, 2010.
Fig. 16. Newly-Hatched Chicks
[9] L. Liu and M. O. Ngadi, “Detecting fertility and early embryo
development of chicken eggs using near-infrared hyperspectral
imaging,” Food and Bioprocess Technology, vol. 6, no. 9, pp. 2503-2513,
IV. CONCLUSION 2013.
Based on the testing conducted and data gathered, it can be [10] K. Das and M. D. Evans, “Detecting fertility of hatching eggs using
inferred that the proposed system is a viable choice or even a machine vision II: neural network classifiers.” Transactions of the ASAE,
vol. 35, no. 6. pp. 2035-2041, 1992.
replacement from traditional incubators for incubation as it
[11] B. Shan, “Fertility Detection of Middle-stage Hatching Egg in Vaccine
accurately and autonomously reads and maintains temperature Production Using Machine Vision,” 2010 Second International Workshop
and humidity, controls egg turning and reduces time and effort on Education Technology and Computer Science, Wuhan, 2010, pp. 95-
in candling the eggs as it hastens candling process using image 98.
processing and effortlessly monitor egg development due to [12] G. S. Archer, and A. L. Cartwright, “Incubating and Hatching
ingenious design of built-in candling apparatus inside the Eggs,” Texas A&M Agrlife Extension Service, pp. 1-13, 2012.
incubator. [13] T. A. Adegbulugbe, A. O. Atere, and O. G. Fasanmi, “Development of an
Automatic Electric Egg Incubator,” International Journal of Scientific &
Future work includes modification of the incubation heating Engineering Research, vol. 4, no. 9, pp. 914-918, 2013.
and ventilation system to improve the hatch rate of the eggs. [14] O. Elibol and J. Brake, “Effect of egg turning angle and frequency during
incubation on hatchability and incidence of unhatched broiler embryos
with head in the small end of the egg,” Poultry science, vol. 85, no. 8, pp.
ACKNOWLEDGMENT 1433-1437, 2006.
This study is supported by the University Research and
Development Services Office and the University Research and

0706

You might also like