A Review on Computer Vision Technology for Monitoring Poultry Farm—Application, Hardware, and Software

The productivity and profitability of poultry farming are crucial to support its affordability issues in food security. Criteria in productivity measurement, including Feed Conversion Ratio (FCR) calculation, whereas economic management is essential for profitability. Hence, best management practices need to be implemented throughout the growth period for optimizing the poultry performance. This review provides a comprehensive overview of computer vision technology for poultry industry research. This review relies on the use of several online databases to identify key works in the area of computer vision in a poultry farm. We recommend our search by focusing on four keywords, ‘computer vision’ and ‘poultry’ or ‘chicken’ or ‘broiler’ that had been published between 2010 and early 2020 with open access provided by University Teknologi Malaysia only. All the selected papers were manually examined and sorted to determine their relevance to computer vision in a poultry farm. We focus on the latest developments by focusing on the hardware and software parts used to analyze the poultry data with some examples of various representative studies on poultry farming. Notably, hardware parts can be classified into camera types, lighting units and camera position, whereas software parts can be categorized into data acquisition and analysis software types as well as data processing and analysis methods that can be implemented into the software types. This paper concludes by highlighting the future works and key challenges that needed to be addressed to assure the quality of this technology prior to the successful implementation of the poultry industry.


I. INTRODUCTION
The term ''poultry'' encompasses a range of domesticated species, including chickens, turkeys, ducks, geese, game birds (e.g., quails and pheasants) and ratites (e.g., emus and ostriches) [1]. Poultry farming is the term used to identify the agro-agricultural sector directed at raising poultry for meat. Meanwhile broilers are chickens that are bred and raised specifically for meat production [1], [2].
All the necessary innovative technologies are imported in poultry farm consisting of high-quality feed and breeds, pharmaceuticals and biologicals to prevent disease, poultry The associate editor coordinating the review of this manuscript and approving it for publication was Varuna De Silva .
housing and production systems [3]. However, consumers issues arise regarding poultry farming are closely related to food security, mainly about availability to meet demand, accessibility, affordability and safe for consumption [4], [5].
In terms of affordability, it is related to the cost structure of broiler farming. The major cost component of poultry industry is broiler feed which comprises about 70% of the total production cost [6]. Thus, any increase of feed cost imposes significant impact to the profitability and viability of this farming industry. In order to ensure the affordability issue is optimized, two essential parameters including profitability and productivity need to be measured and maintained thoroughly. A profitability is a measurement of receipts minus costs and it is depending on the economic efficiency of VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ productivity. Meanwhile, FCR is a ratio of feed intake (feed usage) into live weight and provides a benchmark of management performance (productivity), as well as profitability of each given feed cost [7], [8]. Constantly, a productivity improvement will increase profit, through its effect on the way inputs are transformed into outputs and hence, more outputs (revenue) will be produced from the same inputs (same costs). FCR is the current benchmark used for poultry productivity by means lower FCR indicates improved animal performance and welfare, reduced impact on the environment, shows that broilers may have improved digestion or metabolism or nutrients and may utilize absorbed nutrients efficiently [9]. Current benchmark for FCR in Malaysia is 1.67, which is a competitive ratio in poultry industry [3]. The typical modern weight of an animal is about 2.5kg at day 39 with feed conversion ratio of 1.6 [3]. This could mean 1.6 kg of feed per kilogram of broiler body weight gain. The formula used to calculate FCR [10] is shown below: FCR = Feed intake (g)/Body weight (g) (1) The equation computes the total feed intake of the herd divided by the live weight measured at the broiler house to determine on-farm FCR [10]. Any factors that lead to an over-estimation or artificial increase in feed consumption, or estimated weight, will result in an unrealistic increase in FCR. The conversion of feed to live weight is a complex process and the cause of a low or high FCR is often multifactorial because small changes in FCR can have a substantial impact on overall performance efficiency [11]. The key to preventing FCR problems is to ensure that good management practices have been implemented throughout the growth period to optimize broiler performance.
The drive towards reduced FCR motivates farmers to monitor the performance better and understand the development of their animals. Over the past decades, a variety of classification and detection methods have been developed in poultry farming including acoustic resonance [12]- [16], robotics [17], remote sensing [18], Wireless Sensor Networks (WSNs) [19]- [26], and computer vision [27]- [65]. It should be noted that this review highlights on the computer vision component in poultry farming. Therefore, researches on other automation technologies without image sensing or computer vision are not discussed in depth.
A review on the application of computer vision in poultry farm has been published [66] and only focused on image analysis of the imaging technologies exists. Unlike our review, there is no in-depth discussion on the machine learning or deep learning techniques, no summary of the hardware and software used in computer vision systems. Table 1 lists all the comparisons between the previous review papers with our review. Based on Table 1, it can be seen that the previous review papers are more focused on the data processing and analysis methods in poultry farm instead of the hardware and software used in poultry farm. The contributions of this review paper can be listed as follows: 1) The applications of computer vision, as well as the hardware and software that have been used in poultry farm are critically reviewed. 2) The future potential and limitations of the implementation the computer vision techniques in poultry farm are also briefly discussed. 3) Comparisons of our review paper with previous reviews are achieved based on hardware and software parts, applications, challenges and future enhancements. 4) The goal of this review is to help readers understand and remind them of the shortcomings in poultry farming in the more advanced development of computer vision in recent years, so that they can consider the possible applications and trends of using the computer vision technique in poultry farming.
This review paper is organized as follows. Section II provides an overview of computer vision technology for poultry farm focusing on the representative studies. Section III explains the detail comparison of tools used in computer vision in poultry farm. Next, Section IV discusses thoroughly the challenges and future research needs. Finally, Section V concludes the paper.
Computer vision can be defined as interdisciplinary scientific field that deals with how computational models can be made to gain high-level understanding from digital images or videos to build autonomous system as the human visual system can do [87]. By combining machine learning or deep learning with computer vision have enabled computers to better understand what they see and as a result has bolstered developments in computer vision. To simplify the process of detection, pattern recognition and prediction, computer vision has been developed, which can automatically extract complex features that are not designed by human engineers and end-to-end by learning from multiple training data. Fig. 1 illustrates the computer vision in poultry farming comprehensively. Computer vision mainly composed of two components including the hardware and software part. The hardware part can be narrowed down into camera and the light source (Fig. 1a), meanwhile the software part is further classified into data acquisition and analysis software (Fig. 1b). Furthermore, data processing and analysis methods ( Fig. 1c and 1d) are the various algorithms applied in the data analysis software.  Generally, computer vision works in three basic steps: (1) acquiring an image, (2) processing the image, and (3) understanding the image. In order to obtain such a high-quality image, hardware plays a crucial part in this step. The choices of diverse cameras, additional lighting units, high specification computer or any mobile station do affect the image features achieved. Next, data acquisition software is needed to amass or store the images captured by the camera for the analysis step. The raw images are then processed using selective data pre-processing and segmentation algorithms. Finally, data analysis algorithms are adopted to evaluate the data images according to the study purposes. Both data VOLUME 9, 2021 processing and analysis methods could be conducted by using the data analysis software. The details of each part will be discussed further in next session

III. HARDWARE
In the poultry industry, the rapid development of computer vision is indistinguishable from the hardware aspect of computer vision. In general, a camera with a lens, a lighting unit, a motor-driven mobile station, and a computer packed with image acquisition and analysis software are traditional computer vision [53], as shown in Fig. 1. Commonly, camera and lighting units are operated at early stages of computer vision for image acquisition, while computer or any other analysis hardware are used throughout the analysis process to generate the desired findings. Table 2 summarizes the hardware used in computer vision for poultry farm. It can be seen that; the uses of each of hardware parts are distinct according to the research purposes.
This section of hardware parts can best be treated under three headings: (1) various type of cameras and lens, (2) lighting units, and (3) camera position in poultry farm.

A. CAMERA AND LENS
The camera is one of the core components of computer vision systems. There are various types of camera that have been used in poultry farm regardless of its purposes. The particular type of imaging methods massively used in poultry farm, including visible light camera [11], [27]- [29], [34]- [39], [41], [44], [51], infrared [34], [36], thermographic [36], depth [41], [48], [59], and hyperspectral camera [61], [62]. While an ordinary visible-light camera captures light across three wavelength bands in the visible spectrum, including red, green, and blue (RGB), infrared, thermographic, depth and hyperspectral imaging encompasses a wide variety of spectrums that go beyond RGB. The types of imaging methods used in poultry farm can be detailed as follows:

1) VISIBLE LIGHT DIGITAL CAMERA
A visible-light digital camera is a standard digital camera used for taking photos or videos in visible light [86]. It is very cost-effective solutions, particularly because they allow wide areas of the farm to be covered hence, a lower number of them would be necessary [36]. These benefits make most of researchers favored on this type of camera compared to other types of camera [11], [27], [28], [30], [34]- [39], [41], [44], [51]. Several studies have revealed that this type of camera is capable of capturing images for various purposes. For example, it is operated to detect the sick broilers [28], [41], monitoring broiler behavior and movement [11], [30], [34]- [39], [41], [44], and predict the live weight of broiler [27].
However, few major drawbacks of this camera are the lenses compatibility and resolution. The evidence of this drawback can be clearly seen in the case of detection of biomechanical analysis during feeding [11], [38]. For this type of experiment, the high-speed camera with a special lens (50mm/F 1.4) with high frame per second (fps) captured around 250-300fps is needed. This is due to the high speed of mandibulation which consists of a cycle of opening and closing beak during the feed grasping. In contrast, a standard digital camera is needed to detect sick broilers or welfare of the whole poultry house. For instance, author in [42] adopted an affordable Logitech webcam camera with 30fps to detect sick broilers. Surprisingly, they still can achieve a high accuracy rate for differentiating sick and healthy broilers. Therefore, it seems that in order to achieve the best quality of images for ease of further analyses, the choices of suitable camera are needed according to what research purpose is.
In addition, the low contrast between animals and bed as well as lack of results under low light intensity conditions make this type of camera not suitable in principle for the target application [36]. Hence, extra lighting units sometimes are needed to increase or maintain the light intensity in a poultry farm.

2) INFRARED (IR) IMAGING
IR imaging is brand new technology that is growing in popularity. The IR camera uses a technology that gathers and measure a beam of IR light waves through the radiant heat emitted from an object and then converts it to an image [87]. There are three regions in the IR electromagnetic spectrum defined as (1) near-IR (780-2,500 nm), (2) mid-IR (2500-25,000 nm), and (3) far-IR (25,000-1,000,000 nm) [88]. Previous studies evaluating IR camera observed on whether on poultry activity monitoring or tracking [34]- [36]. Similarly, IR camera is having shortcoming as visible light digital camera as it still needs enough light & contrast to create usable images [36]. Therefore, additional IR light is needed to overcome the limitation of contrast issue. Furthermore, it's been stated by [36] that IR light sources are non-invasive towards poultry eyes.

3) THERMOGRAPHIC CAMERA
The thermographic camera usually detects radiation in the long-infrared range of the electromagnetic spectrum, roughly 9,000 to 14,000 nanometers [89]. Image produced from that radiation is called thermograms. The amount of radiation emitted by an object increases with temperature, hence, thermography allows one to see variations in temperature. Thermal cameras measure the absolute temperature of the object. The advantage of this type of imaging is their ability to work in complete darkness. Their operation does not depend on the presence of light [36]. Hence, this camera provides better used of differentiating between the broiler body and the background images. When viewed through a thermal imaging camera, warm objects stand out well against the environment, day or night. This camera usually non-invasive, non-contact technology, and used no harmful radiation [89], [90]. However, the major drawbacks of thermographic cameras, are they are costly and cover a relatively small area [36]. In general, the typical poultry farm is around 100m long and 40m wide [36] hence, a large number of nodes are needed. It is therefore likely that each node must be low-cost for the resulting whole system to be affordable.

4) DEPTH CAMERA
Depth camera is a camera that employs structured of light or Time of Flight (ToF) techniques by judging the depth and distance of an object by measuring the round-trip time of light to measure distances within a complete scene with a single shot [91]. It can also effectively count the amount of time it takes for a reflected beam of light to return to the camera sensor. In addition, this type of camera uses only a small amount of processing power since it requires a direct process to extract the distance information out of the output signals of ToF sensor. Besides, this type of imaging is also ideal for low light and give a wide field of view [39]. Many researchers have utilized depth camera to measure the volume of targeted object. This is exemplified in the work undertaken by [41], [48], [59] to measure broiler weight, detect the sick broilers and estimate the egg's volume.
In addition, the depth images created can be used for features that relate to the three-dimensional (3D) features such as volume, width and height features as used in [48]. It can provide an extra benefit towards the final weight prediction. Interestingly, this technique obtained high accuracy (92.2%) between the predicted weight and reference weights. In contrast to Mortensen et al. [48], however, Okinda et al. [41] proved that the volume estimation can be accurate and efficient just by using two-dimensional (2D) features. It is also less complicated to pre-process the 2D images compared to 3D images.
Another problem with this camera is that it is limited to only indoor applications. [91], [92]. The structured light is easy to be affected by strong natural light outdoors such as sunlight, which results in the projected coded light becoming submerged and unusable [91]. Therefore, this type of camera can only be used in closed-poultry house system compared to opened-poultry house system.
Having a higher level of spectral gives better capability to see the unseen. Therefore, this type of imaging is suitable for a very detail and high-throughput online monitoring of poultry products. Flakovskaya and Gowen [69] have provided in-depth analysis of the HSI studies in poultry products. In their review, they identify five major studies of HSI have been published, including fecal matter, microbiological contamination, product quality, physical defects and food fraud and discussed methods of each study thoroughly.  The main limitation of HSI, however, is related to complexity and storage. The hyperspectral data can cause a very large computational load since it has multidimensional and high redundancy data [93]. Furthermore, this type of camera is usually high in price. Fig. 2 illustrates the various camera types discussed earlier and applications used across the electromagnetic spectrum. The camera types used in poultry farm usually occurs in visible light and infrared wavelength spectrum. Infrared wavelength spectra can be further narrowed down into Near-Infrared (NIR), Short wavelength Infrared (SWIR), Mid-wavelength Infrared (MWIR), Long wavelength Infrared (LWIR), and Far Infrared (FIR). The majority of cameras used in poultry farm occur in an infrared electromagnetic spectrum with different ranges. Depth camera and hyperspectral imaging usually detect radiation in between 0.35µm to 1.7µm range [ [96]- [98]. A thermographic camera detects radiation in Long wavelength Infrared (LWIR) between 9µm to 14µm [89].

B. LIGHTING UNITS
Another important core of a computer vision system is lighting unit. After being applied to the object to be detected, the light produced by the illumination device acts as a carrier for physical information and is then projected to the array of regions of the camera by the beam splitting element [50].
Light is a key aspect in creating a remarkable image. The quality of the image therefore directly affects the efficiency and reliability of the lighting unit. It determines not only the brightness or darkness of the environment, but also the tone, mood and the atmosphere. Hence, in order to obtain the best quality of images, it is crucial to control and manipulate light correctly to get a better texture, vibrancy of colours and luminosity on the objects. If the light intensity is low, it will create weak contrast, which the image contained a small difference in brightness between the objects and background areas. This phenomenon will lead to noises and make it more difficult for image analysis.
At present, there are two types of lighting units are widely used in computer vision in poultry farm such as halogen lamps [70] and Light-Emitting Diode (LED) [61]. Halogen lamps are inflatable incandescent lamps filled with halogen or halide gas [70]. In the wavelength range of visible light to infrared, the emitted light is a smooth, continuous continuum, with no sharp peaks [68]. It also has a luminous efficiency that is greater than conventional bulbs. Furthermore, the halogen frequency ensures constant lighting and a long life, four times the life of ordinary light bulbs.
Halogen lamps, however, often have major deficiencies, such as high heat output, changes in temperature that cause spectral peak shifts, and vibration sensitivity. Hence, many researchers are tending to implement the LED in researches on computer vision in a poultry farm. The advent of LED lighting has brought a new, and way better option, in illuminating house poultry [100].
LEDs have low energy, low heat output, robust and durable energy consumption. According to particular requirements, they may also be composed of various structures, such as the point source, line source, and source of ring light. The wavelength range of LEDs is limited, however. Halogen lamps with a large wavelength range are still irreplaceable at this stage.
When managing the effectiveness of lighting units to obtain the best image quality, it is also crucial to emphasize the effects of this lighting unit on the poultry. It has previously been observed that blue light has a calming effect on the poultry, while red reduces cannibalism and feather pecking [100]. To date, several studies have investigated on the effects of light on poultry health and welfare [100]- [102]. Since LED offer a great benefit towards efficient lighting, however, solving this problem is not uniquely and simply.
To determine the effects of light on behavior, welfare and performance of broiler, Riber [101] compared two different types of LEDs with different color temperatures, measured in Kelvin (K). The 4,100 K light is known as 'neutral-white' while 6,065 K is known as 'cold-white'. The 'cold-white' light contains more wavelengths from the blue part of the spectrum than the 'neutral-white' light. It has been observed that the broilers spent more time in the 'cold-white' light, and performed more relaxed behavior in the compartment.
In addition, 'cold-white' light also improved the final weight of broilers and the yield of muscle breast tenders without negative impacts on their measured parameters such as lameness and dermatitis.

C. CAMERA POSITION
When the specification and relative location of the camera is modified, it will have different impacts on the data collection of the same sample. Therefore, computer system in poultry farm generally has two acquisition mode, namely (i) top-view and (ii) side-view camera position.
Not all researchers show precautions to the position of the camera above the floor. This is important due to the image dimensions can vary with different position of broilers below the camera. However, the camera setup can overcome the impact of deviations caused by the different angles between the camera and the chicken [27].
Top-view camera imaging has been known as the least disturbing for animals and it produces the most useful data [35]. The majority of the researchers [27], [35], [38], [41], [48] used top-view camera positioning during the detection of broilers. The difference between the studies is the distance of the camera with the targeted broilers. Up to now, far too little attention has been paid to this issue and the ideal distance needed to achieve the best image quality remains unclear.
It has previously been observed that for measuring the broiler weight, Mollah et al. [27] emphasize that with the camera height of 1m above floor, covering an area of 1m 2 the weight of broilers may be estimated to get more accurate mean weight and weight distributions. Moreover, the results of this study indicate that it achieved high predictive value (R 2 = 0.99). Meanwhile, Amrei et al. [49] achieved lower value (R 2 = 0.98) with the camera height of 2m above floor. On the other hand, Kashiha et al. [35] and Fernández et al. [31] implemented camera 5m above floor, which cover an area of 70m 2 to monitor the welfare status of the whole broiler flock related to health and management problem.

IV. SOFTWARE
Software development has also played a key role in computer vision strategies, in addition to hardware. In particular, software for such applications includes data acquisition software and software for data analysis. Data acquisition software plays an important role to store and select the best quality images captured by the camera. Whereas, data analysis software is the tool used to conduct image analysis using a selected algorithm. According to Table 3, eYeNamic (Fancom BV) is the most used data acquisition software by researchers meanwhile, MATLAB (Mathworks, Inc.) is the most used data analysis software by researchers, as shown in Table 4. The section below describes in details about data acquisition and data analysis software as well as data processing and analysis method used in this two software.

A. DATA ACQUISITION SOFTWARE
The choice of applications for computer vision is primarily related to camera systems. Cameras from various manufacturers use various tools for acquiring image data, as shown in Table 3. In order to ensure the good quality of images, the image selection was performed on all images captured. The quality control was done manually by looping through all the images recorded. The single best image was selected for further analysis, rejecting the remaining images [72]. There are still a number of researchers who entered the data manually in data acquisition -screening in selecting the best images. eYeNamic (Fancom BV) [35], [43], [31], [103] is a system that automatically monitor behavior for broilers. All the images will be translated into an index of animal migration and activity inside the poultry house.
Analog Discovery [48] is a USB oscilloscope, logic analyzer and multi-functional instrument that allows users to measure, visualize, generate, record and control mixed signal circuits of all kinds. The analog and digital inputs and outputs can be connected to a circuit using simple wire probes; alternatively, the Analog Discovery BNC Adapter and BNC probes can be used to connect and utilize the inputs and outputs.
HOBO H8 Data Logger [11] is a data logger that measures and transmits the signal data (e.g., temperature and humidity) wirelessly to mobile devices via Bluetooth Low Energy (BLE) technology. Table 4, commonly used computer vision data analysis software mainly includes MATLAB. However, current researches are starting to focus on OpenCV, TensorFlow and Keras.

As shown in
MATLAB [11], [33], [36], [44], [58], [59], [61], [62] is an advanced software for commercial mathematics developed by Mathworks, Natick, MA, USA. MATLAB stands for ''matrix laboratory'' and is primarily used for interactive programming and scientific calculation. With an environmental interface, researchers can easily use computational analysis of matrix equations, visualization of scientific data, modelling and different dynamic simulations. For several scientific areas, it also offers a detailed solution. All aspects of computer vision and data processing for machine learning, including image pre-processing, development and calibration of quantitative and qualitative models, reduction of data dimensionality, and data visualization, can all be simulated using MATLAB.
OpenCV (Open-Source Computer Vision Library) [28], [39] is an open-source computer vision and machine learning software library, mainly developed to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products.
TensorFlow [28], [39] is an open-source platform that is mostly used in development of Deep Leaning models. Keras [28] on the other hand is a high-level of API that is built on top of TensorFlow. It is extremely user-friendly and comparatively easier than TensorFlow.
IDRISI 32 [27] is an object-oriented system mainly released for integrated Geographical Information System (GIS) and Image Processing software hence, it can offer both traditional GIS tools as well as advanced procedures for complex modeling and analysis. R is a free language and environment specifically for statistical computing and graphics. It compiles and runs on a wide variety of operating systems, including Windows, MacOS and UNIX platforms.

C. DATA PROCESSING AND ANALYSIS METHOD
The image analysis mainly includes image processing as well as model establishment and evaluation. Image processing consists of image pre-processing, image segmentation and feature extraction. Meanwhile, model establishment and evaluation consist of image classification or prediction. Fig. 3 illustrates a general workflow of image analysis in computer vision in a poultry farm. Generally, after the images captured by the camera, stored and selected by data acquisition software, then the images will undergo pre-processing step where the raw images are being prepared into a suitable presentation for the next step. The images then partitioned into multiple segments in image segmentation to be more meaningful and easier to analyze and interpret. The image features are then being extracted from the segmented images. Finally, the classification or regression task could be executed using selected modeling techniques to make decision or predictions towards the research purposes. All the image processing steps shown by Fig. 3 will be further discussed in the next section.

2) IMAGE SEGMENTATION
Image segmentation is the most difficult task mentioned by some of the researchers [42], [47], [48]. It is a process of forming connected objects with relatively homogeneous properties by grouping related pixels together or partitioning an image into multiple segments with similar attributes [42], [69], [82]. In practical implementations, the separation of poultry from a background image is inevitable. Failure in segmenting the image will decreases the robustness and precision of the final model. Therefore, to obtain meaningful segments, appropriate techniques are required. At present, common image segmentation techniques including Watershed algorithm [48], Ellipse model [42], Mean-shift clustering [52], and K -Means clustering [42].
Watershed algorithm is widely used in segmenting grayscale images as it is partitioning the image into segments by extracting their contours. As the image captured by [48] is the 3D depth image, thus, a height function is defined to obtain an artificial depth image with local minima at the object of interest. Then, a flooding technique [104] was implemented to increment flood regions surrounding the local minima until the region meets. After the regions was met, a watershed line separating these two regions is created. Gaussian kernel was used to prevent over segmentation of the image. In this methodology, the author in [48] preserves the local minima from the broiler bodies by using morphological opening with a circular structuring element. To differentiate the foreground and the background (e.g., the floor), any segment located less than 2 cm from the floor was discarded.
Mean-shift clustering is traditional density gradient estimation algorithm consist of non-parametric feature space. According to [52], Mean-shift algorithm has given significant contribution to ensuring the halal status based on slaughtering of Islamic way based on utilization of the algorithm by using U and V features in LUV (L stands for luminance, U and V represent chromaticity values of the color image) color space. However, this result needs to be verified with the largest database of poultry images using different parts of the body.
Ellipse model has been implemented in the poultry study related to poultry tracking [32], [34], [39] and early sick warning system [28], [42]. To estimate the target, this approach uses the current color feature prototype so that it can separate the poultry target into a new frame from the background. Zhuang et al. [42] explained that the lab (CIE l * a * b) space colors features are clearly visible and clustered compared to HSV (Hue, Saturation, Value) color space. After the color characteristics are collected, each pixel for which the Lab color characteristics are retained in the elliptical column is evaluated while the other pixels are removed. In order to examine each extracted poultry color feature and the proportions of different color features, a histogram model is then developed. Finally, using Bhattacharyya distance, the newly segmented outline is compared with the original. If the gap is too high, the outline will be omitted and with this can the poultry be more precisely segmented. However, problems arise as the segmentation of the edge is not optimal. If the feather colors are complex, the outcome could be worse [27]. A variation of the Ellipse model with K-Means clustering was then used by Zhuang et al. [42]. K -Means is an unsupervised VOLUME 9, 2021 method of clustering which uses K -means to represent data distribution. The combination of clustering and ellipse model K -means will compensate for the limitations of the edge segmentations, making the segmentation effects more precise.

3) FEATURE SELECTION AND EXTRACTION
After the images have been pre-processed and segmented, then the selected features of the images will be extracted out. An early work by [27] takes morphological features such as age, area, perimeter, and volume of the poultry. Age has been used as covariate variable in [27] to examine the relationship between manual body weight and the number of surface-area pixels in the image. [48] added on how the food, water supplies and circadian rhythm of the broilers were heavily controlled to obtain the optimal growth pattern and reached target weight at the end of the rearing period. That is why the age was added as a feature. Features such as area are mostly used to estimate the broiler body size. Area (A) was calculated by summing pixels within a contour which constitutes a broiler [29]. The perimeter or edge detection has been used with great success as a weight predictor for the broilers. Perimeter (P) was calculated by summing pixels that were different from one which constitute the contour [24]. The volume was used as 3D features in [34].
Two different approaches were used for estimating the volume: (1) numerical integration and (2) convex hull.
Recently, various features added to enhance the accuracy of the poultry detection and prediction. Eccentricity [48] is a deviation of a curve or orbit from the circularity. It is added as younger broilers tend to have a more elongated shape which may lead to high eccentricity while the older broilers have a rounder shape which may cause low eccentricity. As broilers grow, it will increase in both length and width. However, the length can be affected by broiler head movement when it walks and pecks and width can be affected by broiler flapping its wings, but width is less experienced than the bobbing of the head. Hence, the width was calculated according to the minor axis of the segmented broilers as broilers were in elongated shape. The back height was defined as the difference between the average depth value of the contour of the segmented broiler and the depth value on top of its back [48].
Concavity [42] also be added as feature as it can contribute to differentiate between healthy and sick broiler as well as calculate the broiler weight. The skeleton is massively used as feature for human pose estimation. Skeleton also could be used as a feature to distinguish between the healthy broilers and sick broilers.
Instead of body segmentation, head segmentation is crucial for poultry detection. Head segmentation features can be divided into eye location, beak, and pecking judgement. Eye location is a parameter used by [11] as it contributes to biomechanical attributed to the broiler behavior during feeding. Beak tips detection was done by applying an algorithm that starts a search for the beak tips from the bottom left of the binary image.

4) IMAGE CLASSIFICATION
Image classification is an important task in computer vision, as it is used to identify an object that appears in an image. This task consists of labelling input images with a probability for the presence of a particular visual object class. Furthermore, the ultimate aim of computer vision is to construct models of machine learning or deep learning that accurately approximate or distinguish the sample 's characteristics. A correlation between the precise measured properties of a sample and its spectral information was designed to create a machine learning and deep learning model. Two types are usually included in the samples used to construct the model: (i) the calibration or training set, and (ii) the validation or prediction set. The calibration collection applies primarily to some representative specimens and is used to determine the parameters of the model. Common machine learning and deep learning modeling methods include Support Vector Machine (SVM) [39], [41], [61], Artificial Neural Network (ANN) [2], [48], [61], [62], [105] and the Convolutional Neural Network (CNN) [28].
SVM is a supervised learning algorithm typically used in the study of statistical classification and regression, which simultaneously minimizes the empirical classification error and maximizes the geometric margin. It uses hyper plane to separate classes in data [61]. However, since linear decision boundaries are not sufficient for many tasks, SVM often use a kernel function that maps the features into a higher dimensional space in which more complex decision boundaries can be represented linearly. In [39], the algorithm inputs vectors into a high-dimensional feature space non-linearly and uses the theory of minimization of construction risk to find the maximum margin in the high-dimensional feature space so that the health status of the broiler chickens can be graded as 99.5% accuracy achieved. In addition, SVM with RBF kernel outperformed during health prediction in [40] with 97.5% and 97.8% accuracy respectively.
ANN is a supervised network and typically defined by four parameters: (1) interconnection pattern between different layers of neurons, (2) learning process for updating the weights of the interconnection pattern, (3) activation function that converts a neuron-weighed input to its output activation and (4) training strategy and ability of data processing. ANN function responses are determined by independent processing neuron units connected through a weighted network. ANN basically composed of three neuron layers known as input, hidden and output layers. ANN can be regarded as an alternative modeling approach to traditional statistics, particularly when considering highly unstable, noisy, incomplete, imprecise, and qualitative natures which coincide to the features of poultry activities [2]. This technique usually resulting in high accuracies during detection. For example, with the combination with Bayesian Network can result in 92.2% accuracy [48]. On the other hand, with Levenberg-Marquardt back-propagation type, this algorithm achieved 97.5% accuracy during evaluation of 150 egg samples [62].
CNN is one of the most representative deep learning algorithms in digital image processing. Author in [28] used CNN with a comparison between Single Shot MultiBox Detector (SSD) and Improved Feature Fusion Single Shot Multi-Box Detector (IFSSD). SSD has shown a good performance in location detection of broilers and obtain their health simultaneously, but has weak recognition ability towards small targets and cannot define many distant broilers. Meanwhile IFSSD is proved to classify ability of the health status more accurately as it can achieve 99.7% accuracy in detecting sick broilers, compared to SSD that achieved 98.7% accuracy.

V. KEY CHALLENGES AND FUTURE RESEARCH NEEDS
Although there is a considerable number of researches in poultry management, there are still several issues to be addressed. The main issue being focused is regarding productivity and profitability of a poultry farm. Many researchers have improved the method of measuring poultry welfare specially related to health, behavior, weight and growth.

A. KEY CHALLENGES IN POULTRY FARM
The section below describes the issues and challenges in poultry management, including the quality of raw data, precision of image segmentation and reliability of prediction or classification.

1) QUALITY OF RAW DATA
The first problem raised in data acquisition whereby the quality of the raw data being questioned. Challenges faced in ensuring the quality of raw data due to physical action that affected the changes on posture, orientation and the diversity in body dimension measurement especially the frequency of head position shifting. Besides, images could be poor due to dust bathing of hyperactive broilers to stretching out their wings. Image dimension also varies due to various locations of the chickens below the camera, feather level, lighting and the threshold values of the image as well as the distance between the position of the camera with the broilers [27], [48]. Due to that challenge, many researches tried to exclude the head and tail position during the feature extraction phase [48], [106]. This will lead to the underestimation of broiler body weight and behavior than the actual.

2) PRECISION OF IMAGE SEGMENTATION
The next problem is segmentation process and feature extraction. This is the most crucial part in image analysis to ensure the accuracies of the calculation. The differences of the broiler as an object with the background is crucial in image VOLUME 9, 2021 segmentation. It is more difficult if having multiple broilers to be segmented. Many researchers have tried to put a dark background [22] to minimize the noises during segmentation and some used external lighting units to overcome the contrast issues.

3) RELIABILITY OF PREDICTION
The third problem is the reliability of the method in providing adequate accuracy on any calculation of a poultry farm. There are various algorithms with different performance and accuracy of computer vision technology such as combination of k-means clustering with SVM that shown 99.469% of accuracy in determining the healthiness of broiler [42], and Watershed algorithm with Bayesian Artificial Neural Network with Relative Mean Error of 7.8% [34]. Besides, it is being proven that Deep learning has shown excellent results in the segmentation of difficult data by giving high precision on predicting the broiler's health by using a Convolutional Neural Network with 99.7%. Hence, further analyses and comparisons between the algorithms need to be taken to ensure it has strong recognition ability towards the overlapping small targets and obtain the focus simultaneously.

B. FUTURE RESEARCH NEEDS
As the technology continues to expand in the future, in order to achieve the versatility and coordination of technology, it is necessary to establish a large-scale dataset. On the other hand, in ensuring the accuracy and robustness in various complex situations in poultry farming, researchers should improve the accuracy of computer vision techniques in both hardware and software. The choice of camera type, light source, and position of mounting a camera are equally important to reduce the image distortion while preserving the image dimension and quality. In addition, maintaining the hardware usage during detection in a long time also one of the difficulties that researchers will need to overcome in the future. Next, it is very crucial to study more effective data processing and analysis methods to reduce the interference of useless data. Finally, with the rapid development of computer vision technology in poultry farming, this field will involve the integration of more disciplines, and the requirements for professionals in terms of quality and quantity will continue to increase.

VI. CONCLUSION
In this review article, a comprehensive review of the application of computer vision in poultry farm has been provided. We have presented the latest development of computer vision techniques using various representative studies with the highlight of hardware and software parts used in the systems. Various types of hardware and software elements have been discussed. We have illustrated all the components of computer vision in a poultry farm. The goal of this study is to help readers understand the more advanced development of computer vision in recent years and to inform them of the limitations of a poultry farm in order to recognize the possible applications and patterns of using a poultry farm computer vision technique. Thus, the review we present will stimulate new lines of inquiry that will contribute in improving the productivity and profitability of a poultry farm. She has been with UTM for more than 30 years and has vast experience in teaching and research. She is currently a Professor of Advanced Informatics with the Razak Faculty of Technology and Informatics, UTM. Her research area is focusing on artificial intelligence, blockchain, and IoT. She is currently teaching machine learning and system design for security for the postgraduate program. She is also leading few research grants in the related topics and had secured more than RM2 million of RandD funds. She has also published more than 100 academic articles in journals, proceedings, and books. She is also heading Cyber-Physical Systems Research Group. She is a member of the IEEE Computer Society, a registered Professional Technologist from the Malaysia Board of Technologists (MBOT), and a registered Graduate Engineer with the Board of Engineers Malaysia (BEM).
RUDZIDATUL AKMAM DZIYAUDDIN (Senior Member, IEEE) received the B.Eng. degree in electrical and electronic engineering from Universiti Sains Malaysia, and the Ph.D. degree from the University of Bristol, U.K. In 2012, she had an internship at Toshiba Research Europe Limited (TREL), U.K., for a year, and produced several patents related to intercell interference mitigation techniques. She is currently a Senior Lecturer with the RAZAK Faculty of Technology and Informatics, Universiti Teknologi Malaysia, Kuala Lumpur. Her research interests include radio resource management, energy efficiency, cross-layer design MAC, and smart sensors applications.
MOHAMAD ZULKEFLI ADAM received the Ph.D. degree from Loughborough University, U.K., in 2012, where the research of biometrics (pattern analysis of face recognition) has been pursued in the Department of Control and Electrical Engineering. He has consistently studied pattern analysis and understanding since his industrial practice in traffic control and surveillance system in the late 1990s, and continued with the master level of research in stereoscopic-based pattern analysis in vision system at Universiti Teknologi Malaysia, in the early 2000s. He has also completed his two-year post-doctoral program cum as a Visiting Research Fellow at King's College London in 2019, with the project of Smart Rural, the pattern analysis in the wider spectrum involving multidisciplinary approach with the aim of sustainable socio-economic research and development. He currently serves the Universiti Teknologi Malaysia as a Senior Lecturer for lecturing systems engineering, system testing and evaluation, and focuses research in the area of sustainable technological k-economic research and development.
AZIZUL AZIZAN (Member, IEEE) received the Ph.D. degree from the University of Surrey, in 2009, researching on 3.5G physical layer adaptation for satellite systems. He later joined the Malaysian Communication and Multimedia Commission for more than six years, overseeing spectrum and numbering policies and resource management. He is currently with the Razak Faculty of Technology and Informatics, Universiti Teknologi Malaysia, Kuala Lumpur, where his research areas include telecommunications, cyberphysical systems (incl. IoT), business intelligence, and engineering education. VOLUME 9, 2021