You are on page 1of 7

Journal of Computational Innovations and Engineering Applications 4(2) 2020: 9–15

Development of an Automated Cows In-Heat


Detection and Monitoring System Using Image
Recognition with GSM Based Notification
System
Nilo M. Arago , August C. Thio-Ac, Miguel C. Apostol, Irwin James E. De Guzman,
Albert Eli D. Reyes, Kathleen G. Rodriguez, and Roi Aldrin B. Toring

Abstract—Precise estrus detection is a factor for specifically, the growth rate is 8.6 %. Meanwhile, Laos, and
the reproductive performance of cows. The primary Vietnam both have a 7.5 % growth rate. This is followed by
sign of estrus is the standing heat wherein a cow Indonesia with a growth rate of 3.5% and then, Myanmar
stands still for a few seconds while mating with other at 0.4%. The Philippines, however has a negative growth
cows. Visual monitoring is the most common method rate. The slaughter rate of the cattle was 4.88 % which is
used for detection of estrus that requires farmers’ relatively higher than the previous years [1]. In 2010, the
time and attention for high yield. In this study, an government imported cattle for breeding, which caused
estrus detection using image recognition is used to an increase in the growth of the population of the cattle
detect the standing heat. The system is comprised of from 2010 to 2015 [2]. The efficiency and determination
detection, identification, and notification system. Scale the optimum time for insemination of cattle is beneficial
Invariant Feature Transform (SIFT) is responsible to increase the pregnancy rate and consequently lead to
for the detection and identification of in-heat cows. economic growth resulting to less importation of cattle.
Using SIFT, the images of cows were registered in the The failure to detect estrus (heat) is considered as one of
database, these images were used for detection and the major factors for low fertility of cattle [3]. Hence,
identification of cows and an algorithm for feature for the dairy farmers, it is important to detect estrus in
overlapping were created to detect the standing heat. cattle.
When a standing heat is detected, it is recorded into Due to the insufficient detection of estrus, the
the computer and simultaneously the Global System reproduction growth in cattle decreases which subsequently
for Mobile Communications (GSM) module will send leads to the increase cost due to the artificial insemination.
an alert message. A cow in heat usually stands still to be mounted 20 to
55 times and each mount lasts 3 to 7 seconds. In using
Keywords: estrus, in-heat cows, standing heat, image
artificial insemination, the optimal time is 8 to 12 hours
recognition, artificial insemination
after the first standing heat. Therefore, an effective estrus
detection is very important to predict their heat condition
[3]. The average number of standing events ranges between
I. Introduction 6 to 9 per estrus to be consider in heat [4]. There are new

T he Philippine cattle industry is one of the least technologies developed to detect estrus better than visual
developed commodities in the past years [1]. The observation. There are past studies that have shown a
high slaughter rate causes the declining population of the concrete result of the efficiency and effectiveness of
cattle. The average growth rate of cattle population in the estrus detection. Using only visual monitoring is time-
Asian region is at 2.7%. In Indo-China and Cambodia, consuming and requires repetitive actions that need to be
done frequently [5].
Using an estrus detection for monitoring is not new for
Electronics Engineering Department, Technological the dairy farmers, but the dairy producers is interested to
University of the Philippines, Manila, Philippines (email: a modern, low cost, user-friendly and advance monitoring
nilo_arago@tup.edu.ph.com, august_thio-ac@tup.edu.ph, systems, hence this study. The main objective of this study
miguel.casis.apostol@gmail.com, irwinjamesdg@gmail. is to develop an estrus detection system for Philippine
com, albertelireyes@gmail.com, kathyrdrgz02@gmail.com, cows.
roialdrintoring@gmail.com)

Copyright © 2020 by De La Salle University


10 Journal of Computational Innovations and Engineering Applications Vol. 4 No. 2 (2020)

II. Technologies for Estrus Detection define a feature. These features are invariant in rotation,
scaling, and in changes of illumination.
A. Related Works Detection of space-scale extrema, localization of key
Chen and Lin used a Wireless Sensor Network (WSN) points, orientation assignment for each key points, and
to develop a system that recognizes standing-heat signal [6]. creating descriptors are the major steps in implementing
The system used a 3-axial accelerometer that recognizes SIFT. Fig. 1.shows an overview of the SIFT algorithm.
the movements of the cows. The accelerometer is placed
[6]. The on the systemcow’s used forefeet. a 3-axial
The authors accelerometer
utilized ZigBee that and
recognizes
[6]. [6].
The The received
system the
system movements
signal
used used strength
a 3-axial of the
a 3-axial cows.
indicator The
(RSSI)
accelerometer
accelerometer accelerometer
in achieving
that thatestrus
is placed
recognizes
recognizes on
detection.
the the cow’s
the movements
movements forefeet.
of theofcows. The
the cows. authors utilized
The accelerometer
The accelerometer ZigBee
and
is placed received
is placed
on theon signal
the cow’s
Floresca
cow’s strength
et al.
forefeet. forefeet.
[7]The indicator
The authors
presented
authors (RSSI)
autilized
monitoring in
utilized achieving
ZigBee ZigBeecalled
system
estrus
and received detection.
and received signalsignal
DISCOW to detect
strength strength and indicator
indicator observe (RSSI) (RSSI)
mounting in
in achieving achieving
activities of cows.
estrusestrus detection.
detection.The system uses QR codes
Floresca et al. [7] presented a monitoring system called patches, high definition cameras,
DISCOW and to
Floresca a [6].
personal
detect
et
The computer.
[7]and
al.presented
system used
presentedobserve aWhen
a 3-axial
mounting
monitoring the QR accelerometer
code called
activities
system is blocked
of
that
Floresca et al.recognizes
[7] a monitoring
the movements of thesystem cows. called
The accelerometer
cows.
DISCOW by the
The toiscow
system detect from
uses and mounting,
QR codes
observe the computer
patches,
mounting high will analyze
definition
activities the
DISCOW to detect placed
and on the
observe cow’s forefeet.
mounting The authors
activities of of
utilized ZigBee
cameras,
cows.cows. and
detection
The system
The system a
and
usespersonal
and uses
received signals
QR codes QR computer.
the
signalcodes camera
strength
patches, When
patches, to
high high
indicator the
capture QR
(RSSI)
definition code
image,
definition is
in achievinggiving
blocked
cameras,
cameras, and allby the
aand the
estrus cow
necessary
a personal
personal from
detection. information
computer. mounting,
computer. When about
Whenthethein-heat
QR computer
the QR
code cows. is will
code is
analyze
blocked
blocked by the the
byBycowdetection
utilizing
the frominfrared
cow
Floresca
and
from signals
[7]cameras,
et al. mounting,
mounting, the computer
the
presented
camera
Yuang,
the computer
a monitoring
towill
Lin, capture
and
system Peng
will [8]
called
image,
analyze
analyze giving
the developed
detection all athe
the detection
DISCOW system
and necessary
toand that
detect
signals signals
aims
and
the information
therecognize
to
observe
camera camera toabout
mounting to
estrus
capture in-heat
capturedetection
activities of
cows.
image,image,
giving atgivingall cows.
night theall
usingthe
The a
necessary necessary
system
non-contactuses information
information QR codes
video about about
patches,
monitoring
in-heat in-heat
high definition
system.
cameras, and a personal computer. When the QR code is
cows.cows. ByImage utilizing processing
blocked infrared will
by thecameras,
be usedmounting,
cow fromYuang,
to identify Lin,theand estrus-specific
Peng will
computer
[8] By behaviors
developed
utilizing a
analyze of dairy
system
the detection
infrared cows.
that
cameras, The
aims authors
and Yuang, to
signals recognize
the developed
Lin, camera
and to acapture
estrus
Peng video
By utilizing infrared cameras, Yuang, Lin, and Peng
detection imaging
[8] developed at image,
night technology
giving
using
a system all
a that
the uses
necessary
non-contact the length
information
video of the
about
monitoring cowsin-heat to
[8] developed a cows.
system that that aims aims to recognize
to recognize estrusestrus Fig. 1. Overview of SIFT Algorithm
system.
detection
detection Image
detect
at night at night processing
estrus.
usingusing A length will of be
a non-contact
a non-contact 2 used
cows to
shows
videovideo identify
specific
monitoring estrus-
monitoring mounting
specific behaviors Fig. 1. OverviewFig. 1.Fig. of SIFT Algorithm
1. Overview ofAlgorithm
SIFT Algorithm
system.
system. Image behavior
Image Byofutilizing
and
processing
processing dairy
then cows.
willa length
will
beinfraredbeof
used The 1.5authors
used
cameras,
to cows
to identify
identify Yuang,developed
will be
estrus- theand
estrus-
Lin, a Peng
basis of Overview
Scale-space extrema detection identifies key points that
of SIFT
video
specific
specific imaging
the
behaviors [8]technology
of developed
detected
behaviors dairy estrus.
of dairy
cows. that
acows.
The uses
system The the
authors length
thatauthors
developed ofrecognize
aims todeveloped the acowsaestrus
are invariant Scale-space
Scale-space to extrema
orientation
extrema detection
detection and scale identifies
identifies through keythe
key pointsusethatof
to
videovideodetect
imaging imaging detection
estrus.
In 2014,
technology A
technologyTsai at
that
night
length
and that
uses
using
of
Huanguses
the 2 a non-contact
cows
the introduced
[9]
length length
of shows
the
video
ofcowsthe monitoring
aspecific
cows
motion and Scale-space
difference-of-Gaussian
are
extrema detection
Fig. 1. Overview function
identifies
of SIFT (1). Algorithm
key points that
mounting system.and
behavior Image then processing will be cowsused to identify theestrus- are invariant areinvariantinvariantto orientationtotoorientation
orientation and scale and
and scale through
scale through
through the use the
the of use
use of of
to detect
to detect image
estrus. estrus.
analysis
A length
specific Abehaviors
length
methodof a2of length
of
for
cows
dairy
of
2automatic
cows 1.5
shows
cows. Theshows will
detection
specific
authors
be of
specific
developed estrus difference-of-Gaussian
adifference-of-Gaussian function (1).
basis
mountingof the detected
behavior andestrus. then a length of 1.5 cows will be the difference-of-Gaussian
Scale-space extrema detection function function (1). (1).
identifies key points that
mounting behavior and forvideo and then a length
monitoring
imaging mating
technology of 1.5 thatcows
behavior uses will of be
the alength theof A
cattle. theregion
cows 𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦, 𝜎𝜎𝜎𝜎) = to
are invariant �𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦, 𝑘𝑘𝑘𝑘𝜎𝜎𝜎𝜎) and
orientation − 𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥,
scale𝑦𝑦𝑦𝑦,through 𝜎𝜎𝜎𝜎)� ∗ 𝐼𝐼𝐼𝐼(𝑥𝑥𝑥𝑥, the 𝑦𝑦𝑦𝑦)
use of(1)
basisbasis
of the ofdetected
of the detected
to estrus.
interest detect
for estrus.
estrus.video
each
In 2014, Tsai and Huang [9] introduced a motion and A length frame ofis2analyzed cows shows where specific
high
mounting behavior and then a length of 1.5 cows will be the 𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥, 𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦,difference-of-Gaussian
𝜎𝜎𝜎𝜎) 𝑦𝑦𝑦𝑦,
=𝜎𝜎𝜎𝜎) = �𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥,
�𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦,function
𝑦𝑦𝑦𝑦, 𝑘𝑘𝑘𝑘𝜎𝜎𝜎𝜎) − 𝑘𝑘𝑘𝑘𝜎𝜎𝜎𝜎)
𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥,− (1).
𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥,
𝑦𝑦𝑦𝑦, 𝜎𝜎𝜎𝜎)�𝑦𝑦𝑦𝑦,∗𝜎𝜎𝜎𝜎)� 𝐼𝐼𝐼𝐼(𝑥𝑥𝑥𝑥,∗𝑦𝑦𝑦𝑦)
𝐼𝐼𝐼𝐼(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦)
(1) (1)
image In levels
analysis
2014, of
Tsaimotion
method and forthat
Huang hasestrus.
automatic[9] occurred.detection
introduced After aof analyzing
estrus
motion and
and video Key points are highly selected based on their stability
In 2014, Tsai and Huang [9] introduced a motion and
basis of the detected
for
image monitoring
frames,
analysis mating
foreground
method behavior
for segmentation
automatic of detection
a cattle.
then A
follows. region
of estrus of
It separates
and measures.
Key
𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦,To
Key
points pointsareget are
highlyaccurate
𝜎𝜎𝜎𝜎) = �𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦, 𝑘𝑘𝑘𝑘𝜎𝜎𝜎𝜎)key
highly selected selected point
− 𝐺𝐺𝐺𝐺(𝑥𝑥𝑥𝑥,
based
𝑦𝑦𝑦𝑦, 𝜎𝜎𝜎𝜎)�localization,
based ∗ 𝐼𝐼𝐼𝐼(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦) (1)
on their on their stability astability
second
image analysis method Infor 2014, automatic
Tsai the and detection
Huang [9] ofintroduced
estrus andaeach
motion and Key points areexpansion
highly selected based on (2). their stability
interest
for monitoringfor
the each
moving video
matingcow frame
from
behavior is analyzed
region
of of where
a cattle. interest highin
A region levels offrame. order
measures. Taylor-series To getare accurate is
key point implemented localization, a second
for monitoring mating behavior
image analysis method of afor cattle.
automatic A detection
region ofof estrus andmeasures. measures. To Key get accurate
points
To get accurate key selected
highly pointkey localization,
point basedlocalization, on theira stabilitysecond a second
of motion By that
fordetermining hasvideo occurred.the ischanges After analyzing
of lengths video
between frames,
interest
interest for each each
video frame
for monitoring frame is analyzed
analyzed
mating where
behavior where
ofhigh high
levels
a cattle. Athe
levels moving
region oforderorder Taylor-series Taylor-series
measures. Toexpansion expansion
get accurate iskey is
implemented
point implemented
localization, (2). (2).
a second
foreground
of motion objects, segmentation
that has following
the occurred. then After
of follows.
cows analyzing
and It separates
mounting video frames,
behaviorsthelevels are order Taylor-series expansion𝜕𝜕𝜕𝜕𝐷𝐷𝐷𝐷 is 1𝑇𝑇𝑇𝑇 is implemented 2
𝜕𝜕𝜕𝜕 𝐷𝐷𝐷𝐷 (2). (2).
of motion that has occurred.
interest for each After video analyzing
frame video
is analyzed frames,
where high order Taylor-series 𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥) = 𝐷𝐷𝐷𝐷expansion + implemented
𝑇𝑇𝑇𝑇
moving cow from the region of interest in each frame. By 𝑇𝑇𝑇𝑇 + 2𝑥𝑥𝑥𝑥 𝑥𝑥𝑥𝑥 (2)
foreground
foreground identified. segmentation
of motion that has
segmentation then follows. It separates the then follows.
occurred. After It separates
analyzing video theframes, 𝜕𝜕𝜕𝜕𝐷𝐷𝐷𝐷 𝑇𝑇𝑇𝑇 𝜕𝜕𝜕𝜕𝐷𝐷𝐷𝐷 1 𝜕𝜕𝜕𝜕 2 𝐷𝐷𝐷𝐷
1𝑇𝑇𝑇𝑇 𝑇𝑇𝑇𝑇 𝜕𝜕𝜕𝜕 𝐷𝐷𝐷𝐷𝑇𝑇𝑇𝑇2𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥
𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥 2 2
determining 𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥) = 𝐷𝐷𝐷𝐷 + + 𝑥𝑥𝑥𝑥 𝑥𝑥𝑥𝑥 (2)
movingmoving
cow cow fromthe thechanges
foreground
from the region
region ofofinterest
segmentation lengths
of interest in between
then
each follows.
in each
frame. theframe.
It moving
separates
By By the 𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥) = 𝐷𝐷𝐷𝐷 +
𝐷𝐷𝐷𝐷(𝑥𝑥𝑥𝑥) = 𝐷𝐷𝐷𝐷
+ 𝑥𝑥𝑥𝑥 1 2 𝑇𝑇𝑇𝑇 𝜕𝜕𝜕𝜕2 𝑥𝑥𝑥𝑥𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥
𝜕𝜕𝜕𝜕𝐷𝐷𝐷𝐷
+ 𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥
𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥 2 + 𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥
𝑥𝑥𝑥𝑥
𝐷𝐷𝐷𝐷 2 (2)
𝑥𝑥𝑥𝑥 (2)
objects,
determining
determining the following
moving
the changes cow of lengths
cows
from the
of lengthsandregionmounting
of
between thebehaviors
interest in each
the moving are
frame. By After the selection of 𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥key2points, 𝜕𝜕𝜕𝜕𝑥𝑥𝑥𝑥 it will be assigned in
2

identified. B.the changes


Feature of
Recognition
determining the changes usingbetween
ofScale-Invariant
lengths moving
between Feature
the moving a consistent orientation based on the properties of itsinlocal
objects,
objects, the Transformthe
following following of cows of cows and
and mounting mounting behaviors behaviors
mountingare
are After the After
After the
the
selection selection
selection of key ofof keykey points,
points, itit will
will be assigned in
objects, (SIFT)the following
Algorithm of cows and behaviors are After the selection of points,
key points, it will it willbebeassigned assigned in
identified.
identified. image
a
a consistent consistent
a consistent(3).
orientationBy using
orientation
orientation histogram
basedbased basedbased
on the on on of the the
properties orientation,
properties
properties descriptors
ofof its
its local
identified. a consistent orientation on the propertiesofofits its local
local
In computer vision, feature recognition refers to its image will
imageimage
(3).
imagebeBy (3).created.
(3).
(3). By
using Byusing
By Lastly,
using
histogram
using histogram
histogram
histogram features ofof of
of orientation, will orientation,be extracted
orientation,
orientation, descriptors
descriptors using
descriptors
B. Feature ability Recognition
to distinguish usinggeometric
Scale-Invariant featuresFeature from images and will will SIFT.
bewill will be created.
bebecreated.
created. created.
Lastly, Lastly,
Lastly,
Lastly, features features
features
features will willwill will
be bebeextractedbe extracted
extracted using
usingSIFT.
using
using
B. Transform
Featureclassify B. (SIFT)
Feature
them.
Recognition Algorithm
TheseRecognition
using include using Scale-Invariant
distinct
Scale-Invariant features
Feature Feature
such as eyes, SIFT. SIFT.
B. Feature Recognition using Scale-Invariant Feature SIFT.
Transform
TransformIn mouth,
computer
(SIFT)
Transform
(SIFT)
chin, vision,
and
Algorithm Algorithm(SIFT) Algorithm
feature
other facial recognition
structures,refers whichtosets its them 𝑚𝑚𝑚𝑚(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦)
𝑚𝑚𝑚𝑚(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦)
ability tocomputer
distinguish In computer
geometric vision, feature
features recognition
from images refers
and to its 𝑚𝑚𝑚𝑚(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦) + 1, 𝑦𝑦𝑦𝑦) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥 − 1, 𝑦𝑦𝑦𝑦))2 2 + (𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 + 1) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 2− 1))2
�(𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥
𝑚𝑚𝑚𝑚(𝑥𝑥𝑥𝑥,=𝑦𝑦𝑦𝑦) = �(𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥
In In apart
computer from
vision,
ability
other
vision,
to feature
objects.
feature
distinguish
Face
recognition
geometric
recognition
recognition refersrefers
features toalgorithms
fromitsto imagesits and and + 1, 𝑦𝑦𝑦𝑦) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥 − 1, 𝑦𝑦𝑦𝑦)) + (𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 + 1) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 − 1))
classify
ability
ability tothem.
biometrics
to distinguish These
distinguish
classify arethem.
geometricinclude
one of
geometric
Thesethedistinct
applications
features features
include features
from
distinct from
images such
offeatures
feature
images assuch
and eyes,
recognition
andas eyes,= �(𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥= �(𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥 + 1, 𝑦𝑦𝑦𝑦) + 1, − 𝑦𝑦𝑦𝑦)
𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥−−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥
1, 𝑦𝑦𝑦𝑦))− 1,2 𝑦𝑦𝑦𝑦)) 2 + (𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 + 1) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 −
+ (𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 + 1) −2𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 − 1))2 1))
2

mouth,
classify
classify them. chin,
them.
[10]. These and
These
mouth, other
include chin, facial
include and other
distinct structures,
distinct facial
features features which
structures,
such such sets
which
as eyes, as them
eyes,
sets them �𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦+1)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦−1)�
�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦+1)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦−1)�
2

apart
mouth, from chin, other
apart
and objects.
from
other other Face
facial recognition
objects. Face
structures, algorithms
recognition
which algorithms
sets and
them and
𝜃𝜃𝜃𝜃(𝑥𝑥𝑥𝑥,
𝜃𝜃𝜃𝜃(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦)
𝑦𝑦𝑦𝑦)==tan tan � � 2 2 � 22� (3)
(3)
mouth, chin, and In other
2004,facial Lowestructures, developedwhich Scale-invariant
sets them feature �𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦+1)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦−1)�
�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥+1,𝑦𝑦𝑦𝑦)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥−1,𝑦𝑦𝑦𝑦)�
�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥+1,𝑦𝑦𝑦𝑦)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥−1,𝑦𝑦𝑦𝑦)�
�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦+1)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦−1)�
𝜃𝜃𝜃𝜃(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦) = tan � � (3)
apartbiometrics are oneobjects.
of the applications ofalgorithms
feature recognition 𝜃𝜃𝜃𝜃(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦) = tan � 2 � 2 (3)
apart biometrics are one of the applications of feature recognition
from from other
transform other
objects.
[10]. (SIFT) Face[11], Face anrecognition
recognition algorithm algorithms
that and and
extracts a set of �𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥+1,𝑦𝑦𝑦𝑦)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥−1,𝑦𝑦𝑦𝑦)�
�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥+1,𝑦𝑦𝑦𝑦)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥−1,𝑦𝑦𝑦𝑦)�
[10].
biometrics
biometrics are oneareof one theofapplications
the applications of
of feature feature
recognitionrecognition
unique points from gray-level images. From a gray-level C. K-NearestNeighbor
C. K-Nearest Neighbor (KNN) (KNN)Machine Machine LearningLearning
[10]. [10]. image, a list
In of 2004, 2D points
Lowe developedwill be extracted.
Scale-invariant Each point
featureis Algorithm
In 2004,transform Lowe (SIFT) developed Scale-invariant feature a set of C. K-Nearest C. K-Nearest Algorithm Neighbor (KNN) Machine Learning
accompanied withan a vector[11], of anlow-level
algorithm descriptors
that extractsand TheNeighbork-nearest neighbors (KNN) Machine
(KNN) isLearning a machine learning
transform
In In 2004,
2004, (SIFT)
Lowe Lowe
unique [11],
points
developed algorithm
developed
from gray-level thatimages.
Scale-invariant
Scale-invariant extracts From
feature a feature
set of thus,
a gray-level Algorithm The
algorithmAlgorithm
k-nearest that is neighbors commonly used (KNN) in, is buta not machine limited learning
to,
unique
transform
transform points
(SIFT) (SIFT) from[11],
image,
[11], a gray-level
an list of 2D
an
algorithm algorithmimages.
points
thatwill that From
be extracts
extracts aa set
extracted. gray-level
Each
aof set of point is algorithmclassification
The that
k-nearest is commonly
problems.neighbors The (KNN) used
KNN in,
algorithm
is but
a not
machine works limitedby to,
learning
image, a list of 2D
accompanied points withwill a bevectorextracted.
of From
low-level Each point
descriptors is and The k-nearest neighbors (KNN) is a machine learning
unique
unique points from points from
gray-level gray-level images. a gray-level classification
algorithmstoring all problems.
available
thatcommonly is commonly cases The
and KNN
classifies
used algorithm
new
in, not available
but limitednot limited worksto, by
cases to,
accompanied thus,
with define
a vector a images.
feature.
of
From features
These
low-level
a gray-level
descriptors are invariantand inalgorithm by that aallmajorityis vote of its used in, but
k classifies
neighbors. Measuring the
image,
image, a list of 2Da list of 2D points
pointsscaling, will be will be
extracted.extracted. Each Each
point is point is storing
classification
classification available
problems. problems. cases
The and
The
KNN KNN algorithm new
algorithm available
works works
by casesby
thus, define rotation, and in changes of illumination. distance by a distance function will assign the case to a
accompanied
accompanied withawith a feature.
vectora vector These
of of features
low-level low-level are
descriptors invariant
descriptors and and in
storing by
storingalla available
class
majority
all
that available
is
votecases
cases
most and
common
of classifies its
and among
kclassifies
neighbors.
its new K newMeasuring
available
nearest available cases
neighbors
the
cases
thus,rotation,
thus,
definedefine scaling,
a feature. and
a feature.
Detection in changes
These These
of features offeatures
space-scale illumination.
are are invariant
invariant
extrema, in inof keyby adistance
localization bymajority a majority
[12]. by vote a distance of itsoffunction
vote kitsneighbors. will assign
k neighbors. Measuring the case
Measuring the tothe a
5.8 meters in width, 3.80 meters in height and 88.16 square
= �(𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥 + 1, 𝑦𝑦𝑦𝑦) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥 − 1, 𝑦𝑦𝑦𝑦))2 + (𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 + 1) − 𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦 − 1))2 meters in area. Four high definition cameras were placed on
2
top of the barn and are 3.85 meters apart. In Fig. 2, an
�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦+1)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥,𝑦𝑦𝑦𝑦−1)� equation was derived in determining the camera focal
𝜃𝜃𝜃𝜃(𝑥𝑥𝑥𝑥, 𝑦𝑦𝑦𝑦) = tan � 2� (3) length.
Development�𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥+1,𝑦𝑦𝑦𝑦)−𝐿𝐿𝐿𝐿(𝑥𝑥𝑥𝑥−1,𝑦𝑦𝑦𝑦)�
of an Automated Cows In-Heat Detection and Monitoring System Arago et al. 11

C. K-Nearest Neighbor (KNN) Machine Learning (5) the inp


C. K-Nearest Neighbor (KNN) Machine Learning B. Hardware Development
Algorithm
Algorithm The barn has the dimensions of 15.2 meters in length,
standing
The k-nearest neighbors (KNN) is a machine learning
algorithm that The k-nearest neighbors
is commonly used in, but (KNN)
not is a machine
limited to, learning 5.8 meters in width, 3.80 meters in height and 88.16 square
classification problems. The KNN algorithm works bylimited to,
algorithm that is commonly used in, but not meters in area. Four high definition cameras were placed The
classification
storing all available problems.
cases and classifies The
newKNN algorithm
available cases works by on top of the barn and are 3.85 meters apart. In Fig. 2, an
by a majority vote
storing all of its k cases
available neighbors. Measuring
and classifies the
new available cases equation was derived in determining the camera focal length. (6) 8.1 ope
Fig. 2. Simplified Ray Diagram
distance by by a distance
class that is by
a majorityfunction
most common
a distance
vote of itswill
amongwill
function
assign the
k neighbors.
its assign
K nearest
case to athe distance
Measuring
neighbors
the case to a class that is
generati
[12]. most common among its K nearest neighbors [12]. 𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ =
𝑆𝑆𝑆𝑆𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝑆𝑆𝑆𝑆𝐹𝐹𝐹𝐹𝑆𝑆𝑆𝑆 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐿𝐿𝐿𝐿 𝑥𝑥𝑥𝑥 𝑊𝑊𝑊𝑊𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝑊𝑊𝑊𝑊𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝐷𝐷𝐷𝐷𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆
𝐹𝐹𝐹𝐹𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐹𝐹𝐹𝐹𝑜𝑜𝑜𝑜 𝑉𝑉𝑉𝑉𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑉𝑉𝑉𝑉
(1) Unit (C
Euclidean distance (4), Manhattan distance (5), and
Euclidean distance (4), Manhattan distance (5), and
Minkowski distance are used for continuous functions (6), 4.8 𝑚𝑚𝑚𝑚𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥𝑥𝑥 3.8 𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿
Minkowski distance are used for continuous functions (6),
while Hamming whiledistance
Hamming is distance
used for iscategorical
used for categorical
variables variables
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ =
5.8 𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 The
[12]. [12]. D. METHODOLOGY 𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭 𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳 = 𝟑𝟑𝟑𝟑. 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 𝒎𝒎𝒎𝒎𝒎𝒎𝒎𝒎 frequen
The Ard
A. Data Gathering 3.6 𝑚𝑚𝑚𝑚𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥𝑥𝑥 3.8 𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿

(4) (4) 𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ =
3.85 𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 the noti
A total of 23 Holstein cows were registered 𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭𝑭 𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳 and
(5) monitored in the system starting November
the input device of the system. 2017. It detectsThe
= 𝟑𝟑𝟑𝟑. 𝟓𝟓𝟓𝟓𝟓𝟓𝟓𝟓 𝒎𝒎𝒎𝒎𝒎𝒎𝒎𝒎
the cows and C. Sof
(5) standing heat.
system was deployed, tested and evaluated in Dairy
The laptop used
T in this
S study ran
S on is S 64-bit Windows
Training and Research Institute of University of the
Fig. 2. Simplified 1Ray Diagram ABLE TANDARD ENSOR IZE

(6) (6) 8.1 operating system with an Intel Core i5 series 3rd
Philippines – Los Baños. generation (2.80Ghz) processor
Unit (CPU) along with a 4 GB RAM.
for the Central Processing

B. Hardware Development The GSM module used is the A6 mini with a working
D. METHODOLOGY frequency between 850-1900 MHz and an Arduino UNO.
III. Methodology
A. Data Gathering The barn has the dimensions Tof
a b l15.2
The Arduino UNO
e meters
1 was t a n d ain
Sconnected rtod length,
it asS the
e n scontroller
o r S iof
z e
the notification system.
A total of 235.8 meters cows inwerewidth,
registered3.80
and meters in height and 88.16 square
A. Data Gathering
Holstein Based on the computation, the focal length to be used
A total of 23 Holstein cows were2017.
registered
The and C. should The
monitored in
system monitored
meters
the system
in thetested
was deployed,
inandstarting
system area.
starting November
Fourin high
November
evaluated 2017.definition
Dairy The cameras
Software
Based
be
should that
Development
on
less
be less
the
than were
computation,
3.14
than 3.14
mm and
mmmm.
placed
the
3.55focal
mm. onsmaller
length
The to be used
and 3.55 mm. The smaller
focal video fe
length is available is 2.8
Trainingsystem
and was top
Research of
deployed, theand
tested
Institute ofbarn and
evaluated of are
in Dairy
University 3.85 meters
Training
the focalThe
length apart.
that
system is
was In isFig.
available
composed IP 2,
2.8ofmm. an laptop, and
cameras,
identify
was first
Philippines
and–Research
Los Baños.
Institute of University of the Philippines – Los
equation was derived in determining
Baños.Development
the GSM module.
The system the
wasThe camera
StarvisofVesper
composed focal
IP camera
IP cameras, laptop,serves
and the user
image a
B. Hardware the GSM module. The Starvis Vesper IP camera serves as
length.
The barn has the dimensions of 15.2 meters in length,
5.8 meters in width, 3.80 meters in height and 88.16 square
meters in area. Four high definition cameras were placed on
top of the barn and are 3.85 meters apart. In Fig. 2, an
equation was derived in determining the camera focal
length.

Fig. 2. Simplified Ray Diagram Fig. 2. Simplified Ray Diagram

Fig. 2. Simplified Ray Diagram


𝑆𝑆𝑆𝑆𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝑆𝑆𝑆𝑆𝐹𝐹𝐹𝐹𝑆𝑆𝑆𝑆 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐿𝐿𝐿𝐿 𝑥𝑥𝑥𝑥 𝑊𝑊𝑊𝑊𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝑊𝑊𝑊𝑊𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝐷𝐷𝐷𝐷𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ = (1)
𝐹𝐹𝐹𝐹𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐹𝐹𝐹𝐹𝑜𝑜𝑜𝑜 𝑉𝑉𝑉𝑉𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑉𝑉𝑉𝑉
𝑆𝑆𝑆𝑆𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝑆𝑆𝑆𝑆𝐹𝐹𝐹𝐹𝑆𝑆𝑆𝑆 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐿𝐿𝐿𝐿 𝑥𝑥𝑥𝑥 𝑊𝑊𝑊𝑊𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝑊𝑊𝑊𝑊𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝐷𝐷𝐷𝐷𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆
4.8 𝑚𝑚𝑚𝑚𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥𝑥𝑥 3.8 𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ =
5.8 𝑚𝑚𝑚𝑚𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ
𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿= (1)
𝐹𝐹𝐹𝐹𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 𝐹𝐹𝐹𝐹𝑜𝑜𝑜𝑜 𝑉𝑉𝑉𝑉𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑉𝑉𝑉𝑉
12 Journal of Computational Innovations and Engineering Applications Vol. 4 No. 2 (2020)

asthe
theinput
inputdevice
deviceofofthe
thesystem.
system.ItIt detects
detects the
the cows
cows and
and The camera of the system was used to capture live video
standing
standingheat.
heat. feed of cows in the barn. It was used to detect and identify
The laptop used in this study ran on is 64-bit Windows the cows inside the barn. The XAMPP application was first
The laptop used in this study ran on is 64-bit Windows
8.1 operating system with an Intel Core i5 series 3rd opened to give the access to the main GUI where the user
6) 8.1 operating system with an Intel Core i5 series 3rd
generation
generation(2.80Ghz)
(2.80Ghz) processor
processor for
for the
the Central
Central Processing
Processing must log in. Upon logging in, the cows top view image and
Unit
Unit(CPU)
(CPU)along
along with
with aa 44 GB
GB RAM.
RAM. its data information (like; date and time of registry, and
The GSM module used is the A6 mini with a working ID) will be inputted by the user in the Register New Cow
The GSM
frequency module
between used isMHz
850-1900 the A6andmini with a working
an Arduino UNO. Menu. Such image is also known as a Model that will be
frequency between 850-1900 MHz
The Arduino UNO was connected to it as the and an Arduino UNO.
controller of used for identifying, tracking and detecting the cows that
The Arduino UNO was connected to it as the controller of
the notification system. has been registered in the system. Each Cow that has
the notification system.
ered and been registered inside the barn will have its own identity
017. The C.C.Software
Software Development
Development in the system and will be named by the number imprinted
n Dairy on their back.
of the Using SIFT feature extraction, the cows will be
detected by their different assigned pattern on the system.
The number of Models in the registry will determine the
n length, accuracy of the detection. Afterward, the system will
16 square initialize the FLANN matcher that performs a K-Nearest
placed on Neighbor search. Consequently, the system will evaluate
ig. 2, an the features if it is a good match or not. The standing-heat
era focal
will be detected by the overlapping of two cows’ detection.
If the threshold reaches three to seven seconds, the system
will record the threshold and simultaneously alert the
caretaker of the barn using the GSM module that a cow is
set to be inseminated.
The GSM module will send a text message that a certain
cow had a standing heat. The data of the standing-heat will
then be stored in the database. A PDF file of the gathered
data containing information of the said standing-heat that
is stored on the database is ready to be printed out for
the user’s copy. A log file of all the standing heat image
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 captured is also generated as well as a tabulated data under
(1) the Cows Detected Menu. A Print All option is also provided
to allow the user to print out the said data in PDF file.
𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿

IV. Result and Discussion


𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 The traditional way of monitoring estrus or standing heat
in cows gives relatively high probability of not getting the
optimum time for artificial insemination. The use of Cow
In-heat Monitoring System has been implemented to be an
an alternative way in monitoring standing heat that is both
easy and precise.

A. Actual Testing Result for November 2017

The summary of the standing heat of test cows for the


month of November was shown in Figure 8.

Fig. 7. System Program Flow Program


Fig. 7. System ProcessFlow Process

The camera of the system was used to capture live


o be used
video feed of cows in the barn. It was used to detect and
e smaller
identify the cows inside the barn. The XAMPP application
was first opened to give the access to the main GUI where
Cow In-heat Monitoring System has been implemented to Fig. 10. Graphical Representation of Database Result for the month of
E. RESULT
be an an alternative way in AND DISCUSSION
monitoring standing heat that is December
both easy and precise.
The traditional way of monitoring estrus or standing
heatActual
in cows givesResult
relatively high probability Based on the graph shown, subjects 2149 and 2174
A. Testing for November 2017 of not getting have showed more than six (6) mountings, therefore subject
the optimum time for artificial insemination.
Development of an Automated Cows In-Heat Detection andThe use of Monitoring System Arago et 2129
al. was 13
CowTheIn-heat Monitoring System heat
has been 2149 and 2174 were considered in heat. Subject
summary of the standing of testimplemented
cows for theto Fig.considered
not 10. GraphicalinRepresentation
heat due to of Database
lack Result for
of number of the month of
mountings.
be an an
month alternative was
of November wayshown
in monitoring
in Figurestanding
8. heat that is December
both easy and precise.
Based
Based onon thethe graph
graph shown, subjects2149
shown, subjects 2149andand2174
2174
A. Actual Testing Result for November 2017 have showed more than six (6) mountings, therefore
have showed more than six (6) mountings, therefore subject subject
2149
2149 and
and 2174
2174 were consideredininheat.
were considered heat.Subject
Subject2129
2129waswas
The summary of the standing heat of test cows for the notconsidered
considered in heat due totolack ofofnumber of of
mountings.
month of November was shown in Figure 8. not in heat due lack number mountings.

Fig. 11. Example of detected standing heat


Fig. 8.8.Graphical
Fig. GraphicalRepresentation of Database
Representation Result forResult
of Database the month
forofthe month
November
of November Fig. 11 shows an example of detected standing heat
Based fom Figure 8, test cow # 2124 and 2128 have 13 where 2149 mounted 2174. The box indicates the
Basedheatshence
standing fom Figure 8, test cow
considered # 2124 and
as considered “in2128
heat.”have 13 overlapping of one subject to other.
standing heatshence considered as considered “in heat.” Fig. 11. Example of detected standing heat
Fig. 8. Graphical Representation of Database Result for the month of Fig. 11. Example of detected standing heat
November
Register Fig. 11 shows an example of detected standing heat
odel that Based fom Figure 8, test cow # 2124 and 2128 have 13 where 2149
Fig. 11 showsmounted 2174.
an example The box
of detected indicates
standing the
heat where
he cows standing heatshence considered as considered “in heat.” overlapping
2149 mountedof one subject
2174. The to other.
box indicates the overlapping of
Register
that has
odel one subject to other.
entitythat
in
the
inted cows
on
that has C.
C. Actual
ActualData
Data––January
January 11
11 & 19, 2018
& 19, 2018 Fig. 1
dentity in during the
rinted
will be on A graphical representation for the summary of standing
December
system. heat A graphical
from representation
the month of Januaryforwas
the shown
summary
in of standing
Fig. 12.
heat from the month of January was shown in Fig. 12. According
mine the 2116 and
emwillwillbe
more than
system.
-Nearest less than s
mine
evaluatethe
em will
ing-heat Fig. 9. Example of detected standing heat
Fig. 9. Example of detected standing heat
-Nearest
etection.
Fig. 9 shows an example of detected standing heat The
eevaluate
system
ding-heat where
Fig. 92128
showsFig.mounted
9. Example
an example2124.
of The
detected box
standing
of detected heat indicates
standing the
heat where Monitorin
alert the
overlapping
2128 of 2124.
one subject to other. Based No
aetection.
cow is Fig. 9 shows an example of detected standing heat of
mounted The box indicates the overlapping
e system one subject
B. Actual to other.
Testing – December recognitio
where 2128 mounted 2124. 7,The 2017box indicates the
alert the tracking, a
overlapping of one subject
The summary to other.heat from the month of
of standing
ea cow
that is
a breeding p
B.
B.Actual
ActualTesting
December was ––December
shown
Testing in Fig. 10.
December 7,
7, 2017
2017
tanding-
le of the The summary
The summary of standing
standing heat
heat from
fromthe
themonth
monthofof Throu
e that a December was utilize the
tanding-
standing- December was shown
shownininFig.
Fig.10.
10.
nted out user interf
le of the Fig. 12. Graphical Representation of Database Result for the month of module f
at image Fig. 12. Graphical Representation of Database Result for
standing- January cows; (2)
ta under
inted out the month of January the cows;
atisimage
also , Subjects 2116 and 2135 have showed more than six where it
aatainunder
PDF (6) number of mountings, therefore considered in heat. The
Subjects 2116 and 2135 have showed more than six (6) been dete
is also subjects 2062, 2097, 2010, 2106, 2116, 2118, 2157, 2149 automated
number
and 2163ofwere
mountings, therefore
not considered considered
in heat due to lackinof heat.
numberThe
a in PDF
subjects 2062, 2097, 2010, 2106, 2116, 2118, 2157, 2149
of mountings.
standing and 2163 were not considered in heat due to lack of number The
t getting of mountings. individual
estanding
use of Electronic
ented
ot gettingto Fig. 10. Graphical Representation of Database Result for the month of pillar of
at that of
e use is December
their guid
mented to Fig. 10.Graphical
Graphical Representation of Result
Database
for theResult
month offor the
Fig. 10. Representation of Database
Based on the graph shown, subjects 2149 and 2174 time man
at that is month
Decemberof December
have showed more than six (6) mountings, therefore subject Dairy Tr
2149Based
and 2174
on thewere considered
graph shown, in heat. Subject
subjects 2149 and2129 was
2174 University
s for the not considered in heat
have showed more thandue
six to
(6)lack of number
mountings, of mountings.
therefore subject
2149 and 2174 were considered in heat. Subject 2129 was
s for the
January user interface,
cows; (2) utilizeMySQL, and Python
IP cameras that the
to monitor usesmovements
the OpenCV of
Fig. 12. Graphical Representation of Database Result for the month ofmodule
the cows;for(3)thereceive
image notifications
recognition through
to detectGSM the module
in-heat
, Subjects 2116 and 2135 have showed more than six
January cows; (2)
where utilizeanIPalert
it sends cameras
messageto monitor
that anthe movements
in-heat cow has of
(6) number of mountings, therefore considered in heat. The the cows;
been (3) receive
detected; and (4) notifications
verify thethrough
actual GSMtests module
of the
, Subjects
subjects 2062, 2116
2097, and 2135
2010, have2116,
2106, showed
2118,more than2149
2157, six where it sends an alert100%
message that an 4in-heat
14 Journal
(6) number
and
of Computational
of mountings,
2163 were therefore
not considered
Innovations
in heatconsidered
and
due to lackinofheat.
Engineering
The
number
automated system
Applications with detectionVol.successNo. 2cow
rate.(2020)has
been detected; and (4) verify the actual tests of the
subjects
of 2062, 2097, 2010, 2106, 2116, 2118, 2157, 2149
mountings. automated systemACKNOWLEDGMENT
with 100% detection success rate.
and 2163 were not considered in heat due to lack of number
The proponents
Through this project, would like towere
the end-users thankabledifferent
to: (1)
of mountings. ACKNOWLEDGMENT
individuals that made this study successful.
utilize the software XAMPP for the web-based graphical To the
The proponents would
Electronics like to thank different
user interface,Engineering
MySQL, andDepartment
Python thatthat usesserves as their
the OpenCV
individuals
pillar for
of the
hopethat made
because this study successful.
of theirtoencouragements, To the
module image recognition detect the in-heatand cows;for
Electronics Engineering Department that serves as their
(2)their guidance
utilize that to
IP cameras helped
monitorthe the
proponents
movements to cope
of theupcows;
with
pillar management
of hope because of theirtheencouragements, and for
(3)time
receive notifications throughout
through GSM study.
module Thewhere
personnel
it sends of
their
Dairy guidance
Training that
andhelped the
Research proponents
Institute to cope
(DTRI) upof with
the
an alert message that an in-heat cow has been detected; and
time management throughout theBaños.study. The personnel of
(4)University
verify the of the Philippines
actual tests of the Los
automated system with 100%
Dairy Training and Research Institute (DTRI) of the
detection success rate.
University of the Philippines Los Baños.
REFERENCES
[1] Department of Science and Technology. (n.d.). Beef Cattle.
Fig.of
13.detected
Example of detectedheat
standing heat Retrieved from REFERENCES
AcknowledgmentRuminants Information Network:
Fig. 13. Example standing
[1] http://www.pcaarrd.dost.gov.ph/home/momentum/ruminants/index.p
Department of Science and Technology. (n.d.). Beef Cattle.
Fig. 13 Fig.
shows an example
13. Example of standing
of detected detectedheatstanding heat Thehp?option=com_content&task=view&id=173&Itemid=216
proponentsfrom
Retrieved would like to thank Information
Ruminants different individuals
Network:
Fig. 13
where shows
2163 an example
mounted of detected
2135. The boxstanding heat where
indicates the [2] Bureau of Agricultural Statistics. (2010-2015). Cattle Industry
http://www.pcaarrd.dost.gov.ph/home/momentum/ruminants/index.p
that made this study successful. To the Electronics
2163 mounted
Fig. 13 of
overlapping 2135.
shows The
an
one subject box
example indicates the overlapping
of detected
to other. standing heat of Performance Report. Quezon City: Philippine Statistics Authority.
hp?option=com_content&task=view&id=173&Itemid=216
Engineering
[2] Retrieved
Departmentfrom that serves(2010-2015).
as their pillar of hope
http://psa.gov.ph/content/cattle-industry-
where
one 2163
subject mounted 2135. The box indicates the
to other. Bureau of Agricultural Statistics. Cattle Industry
overlapping of one subject to other. because of their encouragements,
performance-report-1?page=1 and for their guidance
Performance Report. Quezon City: Philippine Statistics Authority. that
D. Summary of Detected Mountings helped the proponents
[3] O'Connor,
Retrieved M. L.from to Heat
(2016). cope up with
Detection andtime
TImingmanagement
of Insemination
http://psa.gov.ph/content/cattle-industry-
D. Summary of Detected
The summary Mountings
of detected standing heat starting from for Cattle. Retrieved
performance-report-1?page=1
throughout the study. The personnel from PennState Extension:
of Dairy Training
D. Summary
the month of Detected2017
of November Mountings
up to the month of February [3] http://extension.psu.edu/animals/dairy/health/repoduction/inseminati
O'Connor, M. L. (2016). Heat Detection and TIming of Insemination
The summary ofofdetected standing
standing heat starting from
from and Research
on/ec402 Institute (DTRI) from of the PennState
UniversityExtension:
of the
2018 The
was summary
shown in Fig. detected
14. heat starting for Cattle. Retrieved
the month of November 2017 up to the month
the month of November 2017 up to the month of February of February Philippines
[4] Dalton, Los
J. C.Baños.
(2012, September 24). Strategies for Success in Heat
http://extension.psu.edu/animals/dairy/health/repoduction/inseminati
2018
2018was
was shown Fig. 14.
shown in Fig. 14. Detection
on/ec402 and Artificial Insemination. Retrieved from
[4] eXtension.org:http://articles.extension.org/pages/65460/strategies-
Dalton, J. C. (2012, September 24). Strategies for Success in Heat
Detection and References
for-success-in-heat-detection-and-artificial-insemination
Artificial Insemination. Retrieved from
[5] Neves, R. (2011). Investigation of Automated Activity Monitoring
eXtension.org:http://articles.extension.org/pages/65460/strategies-
1. Systems
Department of Science
for Reproduction in Dairy and Cattle.Technology.
Journal of Dairy(n.d.).
for-success-in-heat-detection-and-artificial-insemination Science,
[5] 10-15.
Neves, Retrieved
R. (2011). from http://www.hachaklait.org.il/files/351204.pdf
Investigation of Automated
Beef Cattle. Retrieved from Ruminants Information Activity Monitoring
[6] Systems
Chen, C.-H., & Lin, H.-R.in(2015).
for Reproduction Estrus Journal
Dairy Cattle. Detection
of for Dairy
Dairy Cow
Science,
Network:
Using
10-15. Retrieved
http://www.pcaarrd.dost.gov.ph/home/
ZigBee-Basedfrom Sensor Networks.
http://www.hachaklait.org.il/files/351204.pdf
[7]
[6] momentum/ruminants/index.php?option=com_co
Anda,
Chen, K. M.,&Delos
C.-H., Reyes,(2015).
Lin, H.-R. J., Dinglasan, R. M., Floresca,
Estrus Detection for DairyF.M.,
Cow
Mendooza, V. R., Pacundan,
ntent&task=view&id=173&Itemid=216
Using ZigBee-Based J. M., Ramirez, G. M., & Torres, A.
Sensor Networks.
[7]2. K. (2014).
Anda,
Bureau K. M.,Development
of Delos
of aJ.,Computer-Based
Reyes,
Agricultural Dinglasan,
Statistics.
Monitoring
R. M., Floresca,System
(2010-2015). F.M.,
for Detection
Mendooza, and
V. R., Identification
Pacundan, J. M.,ofRamirez,
In-Heat G.Cows
M., Using High-
& Torres, A.
Cattle
Definition
K. Industry
DevelopmentPerformance
(2014).Cameras of a Computer-Based Report. Quezon
Monitoring System
[8] Yuang, C. J., andLin,Identification
Y., & Peng,of S.In-Heat(2017).Cows
Develop
Usinga High-
video
City:
for Philippine
Detection
monitoring
Statistics Authority.
system for dairy estrus detection at night. IEEE-
Retrieved
Definition Cameras
[8]
from http://psa.gov.ph/content/cattle-industry-
International
Yuang, C. J.,Conference
Lin, Y., & on Peng,
AppliedS. System
(2017). Innovation,
Develop a 1900-
video
Fig. 14 Summary of Detected Standing Heat 1903.
performance-report-1?page=1
monitoring system for dairy estrus detection at night. IEEE-
3. International
O’Connor,Conference on Applied
M. L. (2016). System Innovation,
Heat Detection 1900-
and TIming
Fig. 14. Summary
Fig.of14Detected
Summary Standing
of DetectedHeat.
Standing Heat 1903.
of Insemination for Cattle. Retrieved from PennState
Extension: http://extension.psu.edu/animals/dairy/
Fig. 14 shows all the cows that showed standing heat health/repoduction/insemination/ec402
during the actual testing happened on November 29, 2017, 4. Dalton, J. C. (2012, September 24). Strategies
December 7, 2017, January 11 and January 19, 2018. for Success in Heat Detection and Artificial
According to the table, subjects 2124, 2128, 2149, 2174, Insemination. Retrieved from eXtension.org:http://
2116 and 2135 were considered in-heat because these have articles.extension.org/pages/65460/strategies-
more than six (6) mountings. Subjects that have showed for-success-in-heat-detection-and-artificial-
less than six (6) standing heat were not considered in heat. insemination
5. Neves, R. (2011). Investigation of Automated
V. Conclusions Activity Monitoring Systems for Reproduction
in Dairy Cattle. Journal of Dairy Science, 10-
The Automated Cows In-Heat Detection and Monitoring 15. Retrieved from http://www.hachaklait.org.il/
System Using Image Recognition with GSM Based files/351204.pdf
Notification System whose core system is image recognition 6. Chen, C.-H., & Lin, H.-R. (2015). Estrus Detection
for estrus detection, focused on identification, tracking, and for Dairy Cow Using ZigBee-Based Sensor
detection of in-heat cows that is important for breeding Networks.
purposes.
Development of an Automated Cows In-Heat Detection and Monitoring System Arago et al. 15

7. Anda, K. M., Delos Reyes, J., Dinglasan, R. M.,


Floresca, F.M., Mendooza, V. R., Pacundan, J.
M., Ramirez, G. M., & Torres, A. K. (2014).
Development of a Computer-Based Monitoring
System for Detection and Identification of In-Heat
Cows Using High-Definition Cameras
8. Yuang, C. J., Lin, Y., & Peng, S. (2017). Develop a
video monitoring system for dairy estrus detection
at night. IEEE-International Conference on Applied
System Innovation, 1900-1903.
9. Tsai, D. M., & Huang, C. Y. (2014). A motion and
image analysis method for automatic detection of
estrus and mating behavior in cattle. Computers
and Electronics in Agriculture, 25-31.
10. Face First (2018). What is Feature Recognition?
Retrieved from https://www.facefirst.com/face-
recognition-glossary/what-is-feature-recognition/
11. Lowe, D. G. (2004). Distinctive Image Features
from Scale-Invariant Keypoints. Int. Journals in
Computer Vision.
12. Ray, S. (2015). Essentials of Machine Learning
Algorithms (with Python and R Codes). Retrieved
f r o m h t t p s : / / w w w. a n a l y t i c s v i d h y a . c o m /
blog/2017/09/common-machine-learning-algorithm

You might also like