Computers and electronics in agriculture ELSEVIER
Computers and Electronics in Agriculture 15 (1996) 57-72
Determination of live weight of pigs from dimensions measured using image analysis Nabil Brand1 a,* , Erik Jtirgensen b ‘Danish b Danish
Institute Institute
Science, Department of Animal Health and Welfare, Research Center Foulum, l?O. Box 39, 8830 gele, Denmark Plant and Soil Science, Department of Biometry and Informatics, Research Center Foulum, PO. Box 39, 8830 rjele, Denmark
of Animal
of
Accepted1 January1996
Abstract
Determination of the live weight of pigs from dimensionsmeasuredusing an image analysissystemhasbeen studied in an experiment at the ResearchCenter Foulum, Tjele, Denmark. The experiment included 416 crossbredpigs and compared ad libitum versus restricted feeding. Each pig was weighed and video recorded (from above) five times during the growing period from 25 to approximately 100 kg. The main purpose of the experiment was to estimate the precision of live weight prediction using image analysis. Spline functions were used to expressthe relationship between the body area of the pig measuredby imageanalysisand the live weight of the pig for each of the three replicates of the experiment. Subsequently,a mixed modelwasusedto examinethe random effect of pigswithin blocks. The error expressedin terms of the standarddeviation of the residuals from the spline functions as percent of the mean was estimated as 8-9%, while it was estimatedas5-6% by the mixed model.The relationshipbetweenbody area and live weight wasalmost linear on a logarithmic scale,and the residualstandarddeviation wasconstant. The relationship differed between replicates, presumablydue to systematicerror in the measurementtechnique. Clear differencesin the sizeof the residualswere demonstratedfor pigsfrom different breed combinations,with DanishYorkshire having a higher weight than Danish Landrace at the samebody area. The feeding methodshad only minor influence on the relationship. Even though the precisionis fairly low, imageanalysistechniquesfor weight determination of pigsseemto be promising,becausethey can be usedwith relatively low price standard equipment, and they give possibilityof analysingnumerouspigsas well as of other surveillance purposesin the herd. However, further researchis needed into techniquesfor automatic imageanalysis,possiblyusinga three-dimensionalapproach,and into techniquesfor automaticcalibration of herd-/breed-specificarea-weight relationships. Keywords: Live weight; Body dimensions;Imageanalysis;Pig production
*Corresponding author.E-mail:
[email protected] 0168-1699/96/$15.00 0 1996ElsevierScienceB.V. All rightsreserved. SSDI
0168-1699(96)00003-8
58
A! Brandi,
E. J@xensen
i Computers
and
Electronics
in AgricuZfure
15 (1996)
57-72
1. Introduction In pig production, weighing of animals plays an important role in the control of factors which affect the output of the herd. These factors include space allowance and feed ration, when the pigs are fed on a restricted scale. In Danish pig production, the price per kilogram slaughter pig changes within narrow weight intervals, thus increasing the value of delivering pigs with the right slaughter weight. The weight of the pig is an important trait in monitoring production, e.g. to detect disease outbreaks. Methods for assessing the live weight of pigs are therefore important from several points of view. Usually, weighing is done manually - a process that often needs at least two stockmen, and takes 3-5 min per pig, for the heavy pigs. The procedure is stressful, and - from an ergonomic point of view - unsatisfactory. To obtain the highest precision of market weight, weighing should take place repeatedly in the period prior to slaughtering. So far, many attempts have been made to find an alternative to the manual weighing procedure. Primarily, two alternatives have been studied: (1) automatic electronic weighing systems in combination with automatic identification equipment, and (2) indirect weight determination from the dimension of the pig, either measured by tape, calipers or an image analysis system. 1.1. Automatic
weighing
Smith and Turner (1974) described a semi-automatic weighing system identifying animals with weights above a selected level either by spray marking or by letting them pass through automatic gates. They found that in such a semi-automatic handling and weighing unit for pigs one person was able to weigh 100 pigs per hour. Filby and Turner (1979) indicated that with automatic identification and suitable data processing equipment, live weight trends could be established automatically with greater reliability than in manual weighing, because of large diurnal variation in live weight. Turner (1981) studied automatic weighing systems for several species. The results with poultry and cattle were acceptable. With regard to pigs, special handling arrangements were needed to encourage pigs to enter the balance one at a time (Turner and Smith, 1975). In trials with automatic weighing systems, Turner et al. (1985) showed results with less variation in average growth rate compared with manual weighing. Slader and Gregory (1988) described an automatic system for supervising feed intake and weight in ad libitum fed pigs with electronic identification. The authors considered image analysis, but found that transponder systems were better, because they could be easily connected to the electronic weigher. Sanotra (1989) found that automatic weighing of chickens could be used for daily production monitoring. The shape of the growth curve would expose irregular growth. 1.2. Weight determination
from pig dimensions
The significant correlation between live weight and dimensions of the pig has led many authors to study the possibility of estimating body weight from the dimensions
N. Brandl,
E. J@~ensen
I Computers
and Electronics
in Agriculture
15 (1996)
57-72
59
of the pig. Phillips and Dawson (1936) studied methods’for obtaining measurements of swine to be used in classifying animals according to body type. Three methods for measurements were used: calipers and measuring tape; a livestock scaling instrument; and measurements obtained from photographs. The first method had the highest accuracy. Klatt and Glende (1975) found that the weight of the pig could be described as a quadratic function of body measurements. Petherick (1983) found that the area a pig occupies, and space allowance, depends on its live weight. She used a function in which pig area = K x WO.M, where K is a constant and W is live weight. Yeo and Smith (1977) tried to use girth measurement as a scale weighing of sows to control their feed intake. They concluded that the technique was not convenient or refined enough for widespread commercial application because the girth of the sows varies widely in the gestation period. Different measuring methods using tape or caliper measurements have been used by some pig producers to determine the live weight. Commercial products for the estimation of live weight from dimensions have been on the market for a long time. Lately, a Danish product has been marketed using semiautomatic electronic measurement equipment for determination of weight, measuring the relation between the length of the pig and its weight. These methods are not as time consuming as manual weighing, but the measurement still requires an immobilized pig. 1.3. Image analysis systems
The application of image analysis for managing pig herds has been studied by several authors. Van der Stuyft et al. (1991) reviewed the different areas of application, of which can be mentioned: measurements of activity (Van der Stuyft and Goedseels 1990; Nielsen, 1991); monitoring thermoregulatory behaviour of pigs in order to control the climate (Wouters et al., 1990); and weight determination (Schofield, 1990; Minagawa and Iechikawa, 1992). In order to apply image analysis for weight determination, it must be possible to determine the dimensions of the pigs automatically. Prediction functions should be established using the relationship between these dimensions and the live weight, and the precision of these predictions should be high enough to obtain valid information. Schofield et al. (1989) used pig dimensions measured by image analysis to estimate the pig’s weight. Prediction models for each dimension were compared. The conclusion was that the length between tail and scapula (shoulder) measured from above gave the best estimation. The effects of e.g. litter and breed were apparently not investigated. An automatic algorithm for detection of the outline of the pig was described by Schofield (1990). Under interactive operator control, the weight of each pig could be determined within 4~5% of the actual weight, if low-quality images were discarded. Minagawa and Iechikawa (1992) estimated the live weight of pigs, using an automatic image analysis system within ho.9 kg standard deviation of average. Tillett and Marchant (1990) described another model-based algorithm for identifying and classifying pig images seen from above. The algorithm is based on the expected outline of the pigs. Marchant and Schofield (1990) tested
60
N. Brandl,
E. J@ensen
/ Computers
and Electronics
in Agriculture
15 (1996)
57-72
a segmentation method using an algorithm based on the mechanics of an elastic loop (snake) to find continuous boundaries when edge data in the image suffer from noise. The results showed good boundary location in cases where more simple methods failed. The measurement of three-dimensional shape of pigs (length, width, and height) is also under investigation (Van der Stuyft and Goedseels, 1990) using structured lighting techniques. Work on the algorithms for shape detection has been tried on relatively few pigs, and the precision of the live weight prediction is thus estimated with a low error percentage. Furthermore, when predicting the live weight of the pig from its dimensions, several factors have to be taken into consideration, e.g., breed, age of the pig, and feeding method. Klatt and Glende (1975) mentioned that the age of the pigs must be taken into consideration when predicting their weight from dimensions. Delate and Babu (1990) underlined that the prediction model of weight depends on breed and growth rate. It is important to consider the effect of these factors when building prediction equations and estimating the precision of the method. 1.4. Purpose of investigation The primary purpose of the current experiment was to obtain an estimate of the precision of weight prediction from the dimensions of pigs in order to evaluate whether image analysis is an economically feasible method for weighing pigs. The experiment should also serve as foundation for comparing different prediction models, and was designed to evaluate the sensitivity of a prediction model to alterations in, for example, feeding method and breed. 2. Materials
and methods
2.1. Materials The experiment was conducted in blocks as shown in Table 1. Each block consisted of four pigs (derived from four litters), distributed randomly in four pens (one pig from each litter in each pen). Two of the four pigs were females and the two others castrated males. The four pens were used in a 2’ factorial experiment comparing the effect of feeding methods (ad libitum vs. restricted) and feed consistency (meal vs. rolled). The experiment was repeated three times, the two first replicates consisted of ten blocks each, while the last replicate consisted of six blocks. In total, the experiment included 416 pigs and, on average, each pig was weighed 5.5 times. A description and performance data for the pigs in the experiment are shown in Table 2. In half of the blocks, straw was used as bedding, while no bedding was used in the other half. The pigs started the experiment with a weight of approximately 25 kg, and were slaughtered when the last pig in the block reached 95 kg live weight. This procedure was disregarded in 20 blocks because of exceedingly slow growth of the last pig. During the growing period the pigs were weighed every third week. Half of the pigs were selected at random at every weighing session for control measurements taken manually using a measuring tape.
IV Brandl,
Table 1 Distribution
E. .@rgensen / Computers
and Electronics
in Agriculture
15 (1996)
57-72
61
of the pigs in each block
Treatment factor 2
Treatment factor 1 Ad libitum
Restricted
From litter Meal
Sex
Pen I 1
Pen 3 1
male female male female
1
f 4 Rolled
From litter
1 2 3 4
male female male female
2 3 4
Pen 2
Pen 4 I 2
male female male female
Sex
male female male female
3 4
Table 2 The general performance of the pigs in the experiment
Age at start of experiment, days Live weight at start of experiment, kg Age at slaughter, days Live weight at slaughter, kg Carcass weight, kg Days in experiment, days Daily gain, g Number of weighings per pig Number of blocks Blocks, with delivery weight less than 95 kg Number of observed weights
1. Repeat Avg. f Std.
2. Repeat Avg. f Std.
3. Repeat Avg. f Std.
Total Avg. f Std
14.4f 6.1 29.1 f 6.1 159.8f 8.8 100.6 zk 18.2 82.4f 11.2 85.5 f 8.8 853.6 f 128.0 5.4f 0.8
68.9& 26.4 f 168.0 f 110.2 f 88.9 f 99.1 It 847.7 f 6.0f
83.6f 5.8 30.6 f 4.3 172.1 f 10.3 107.3 f 11.4 85.8 f 9.5 88.5 f 1.6 868.5 f 92.8 5.3 f 0.5
14.4 f 8.7 28.4f 5.4 165.0 f 10.2 105.8 f 14.9 85.7i 10.4 91.4f 10.2 854.8 f 105.9 5.6f 0.7
7.1 4.6 8.2 10.9 8.9 7.7 47.1 0.5
10 10
10 6
6 4
26 20
864
960
509
2333
The breeds used in the experiment were: Breed (1) 66.5% Danish Landrace + 33.5% Breed (2) 83.5% Danish Landrace + 16.5% Breed (3) 16.5% Danish Landrace + 83.5% Breed (4) 33.5% Danish Landrace + 66.5% Breed (5) 16.5% Danish Landrace + 33.5% Breed (6) 33.5% Danish Landrace + 16.5%
Danish Danish Danish Danish Danish Danish
Large Large Large Large Large Large
white. white. white. white. white + 50% Duroc. white + 50% Duroc.
2.2. Measuring methods
The measurements recorded and their abbreviations are shown in Table 3. The pigs were concurrently recorded on video tape using the set-up shown in Fig. 1. For
62 Table 3 Description
N. Brandl,
E. .I@gensen
of measurements
I Computers
and their
corresponding
Abbreviation
Name
TS SS BB BM SW HB HS AA
Tail to scapula Snout to shoulder Breadth at back Breadth at middle Shoulder width Height at back Height at shoulder Body area
” M = Manual;
and Electronics
in Agriculture
I.5 (1996)
57-72
abbreviation
MiVa M/V M/V M/V M/V M M V
V = Video.
Video
camera
Plan view
$
2.12 m
I 4
Calibration scale
b”.5m Fig. 1. The position
of the camera
in the stable.
use in the calibration of the dimensions on the video image, a measuring stick was placed 0.5 m above ground. The stick had marks with intervals of 10 cm. The video camera was situated vertically above the animals, 2.12 m above ground. The video recordings took place outside the pens immediately after the conventional weighing. From each weighing, five frames from the video recording were selected at random. Only frames in which the whole pig could be seen were selected. The video frames were analyzed using a semiautomatic system [Scan Beam A/S (1990) equipment]. The equipment consisted of a computer with the OS/9 operation system and the picture was shown on the screen with a resolution of 512 x 512 pixels with 256
N. Brandl,
E. .I@rgensen / Computers
and Electronics
Fig. 2. Measurement
in Agriculture
15 (I 996) 57- 72
63
points.
grey levels. The software was menu-driven, and allowed scanning of the video tape and freezing of individual frames on the screen, Using a mouse, eight points on the outline of the pig were selected as shown in Fig. 2. These points are used as end points in different measures of length and width. Furthermore, the outline of the pig was drawn with the mouse, excluding the head above the shoulder (see horizontal line between shoulders in Fig. 2C). This outline defined the area of the pig. The system was supplied with a threshold function but this system was judged to be too sensitive to disturbances in the picture and was not used. Pilot studies had shown that measuring the pig with head included would introduce an additional error component, due to frequent shifts of the head position. 2.3. Statistical methods
Exploratory data analysis showed that the relationship between area of the pig and its weight was not a simple linear or quadratic function, and also the variance in weight increased almost proportionally with increasing weight. It was thus decided to employ a common curve fitting procedure (Wold, 1974; cubic smoothing spline functions) which describes the relationship between area and weight, and to use the residuals from the mean curve to investigate the influence of the other factors
64
N. Brandl,
E. Jgrgensen
/Computers
and Electronics
in Agriculture
15 (1996)
57-72
in the experiment. The spline functions were fitted on the experiment as a whole, and for each replicate individually. Finally, the residuals from the mean curve were analyzed with respect to the effect of feeding methods and breed. The spline functions were based on a method described by Wold (1974), but it had no ability to separate the random effect of pigs within blocks from the residuals. Therefore the following mixed model was used (Mixed procedure, SAS Technical Report P-229, 1992) which analyzes the fixed effects such as effect of breed, feeding methods and growth periods, and the random effects such as effect of blocks and pigs within blocks through the growth periods. Yijklm
= ,U + ol; + pj + aijk/m(ai
+ yk + b*Aijklm +
pj
+
Yk)
+
Bb
+ b**S$kl,,,
+ b***J$kl,,,
+
+ Eijklm
fijk/(Bb)
(1)
where = logarithmic transformation of live weight for breed i, feeding method j, growth period k, pig 1, and repeat measurement m; = intercept; CL =breedfixedeffecti,i={1...6); ai = feeding method fixed effect j, j = (1,2); BJ = hxed effect of growth period, k = (1. . . mijk[); Yk b* = (b; + 6; + b;) = regression coefficient for logarithmic transformation of body area; b”” = (bf + bf + bi) = regression coefficient for squared logarithmic transformation of body area; b*** = (b? + b;’ + bif) = regression coefficient for cubic logarithmic transformation of body area; = logarithmic transformation of body area; 6 .klm = squared logarithmic transformation of body area; dkh = cubic logarithmic transformation of body area; &khn = interaction between In body area and breed, feeding methAijklm (ai + @j + yk) ods and growth periods; = random effect of blocks, - N(0, a;); & = random effect of pigs within block, - N(0, D$,) b = 1.. . fij;jkl(Bb) 26 blocks; = residual, - N(0, a:). cijklm Yijkl
Model 1 (mixed model) was conducted for each replicate, similarly to the spline functions model. For simplicity, the effect of interaction between squared and cubic body area and tixed effects was not written in model 1, but it had been tested.
N Brandl,
E. J@gensen
/ Computers
and Electronics
in Agriculture
IS (1996)
57-72
65
3. Results 3.1. The general body dimensionslweight
relationship
The correlations between the length and width measurements, named in Table 3, and weight were investigated. The correlation coefficients between weight and length measurements (TS and SS) were’0.96 and 0.86, while those between weight and width measurements (BM, BB, and SW) were 0.97, 0.95, and 0.97. The correlation coefficient between weight and area was 0.98, which indicates a stronger relationship than the other dimensions. On the other hand, significant correlations were found between the pig’s age and its height; HB and HS (***, < 0.001). This relationship will affect the precision of weight estimation using two-dimensional measurements (length and width). 3.2. The general arealweight
relationship
The relationship between the logarithm of area and logarithm of live weight was almost linear. Due to logarithmic transformation, the variance of the values was independent of the expectation (homogeneity). In other words, logarithms were used to stabilize the variance (Snedecor and Cochran, 1967). A plot of the observed values of area and live weight as a logarithmic scale is shown in Fig. 3. However, the effect of area was not constant, and the use of the spline functions Weight, Ln kg 6.01 5.5 5.0-
t
4.5 4.0. 3.5 -
t
3.0
t
++++ t tt
2.5,
1.5
/
I
6.5
6.6
6.7
I
I
I
I
’
I
II
6.6
6.9
7.0
7.1
7.2
7.3
7.4
7.5
I
I
II’
7.6
77
7.8
i 7.9
8.0
Body area, Ln cm2 Fig. 3. A plot
of observed
body
area
values
and
live
weight
on a In scale.
8.1
I’ 8.2
8.3
66
N. Brandl,
0 500
E. J&gensen
I Computers
and Electronics
in Agriculture
15 (1996)
57-72
I
I
I
I
I
I
r
1000
1500
2000
2500
3000
3500
4000
Body area, cm2 Replicate
~~~ 1
-----
2
,
~--
3
Fig. 4. The estimation of live weight using spline functions for each replicate. Table 4 The residual standard deviation and its confidence intervals (spline functions, In form) Replicate Total 1 2
3
o, 0.0910 0.0897 0.0807 0.0785
Upper a 1 - ((r/2)
Residual deviation expressed in (kg) live weight at
aI2 0.0883 0.0854 0.0775 0.0742
0.0938 0.0943 0.0845 0.0837
2.4 2.4 2.1 2.1
Lower’
25
kg
60
kg
5.7 5.6 5.1 4.9
95
kg
9.1 8.9 8.0 7.8
5’a = 0.05.
gave a significant improvement compared to a simple linear function. The spline functions (for each replicate) are shown in Fig. 4. As can be seen, the live weight corresponding to a given area increased with each replication of the experiment. Similar differences between replicates in the relationship between area and weight were not found for the manual measurements, suggesting that the differences were due to differences in measurement technique between replicates. The estimates of the residual standard deviation a, (from spline functions) for each of the three replicates of the experiment (logarithmic form) are shown in Table 4, with corresponding 95% confidence intervals. The residual standard deviation has also been transformed into kilograms for different levels of live weight. It corresponds to a little less than 10% of the average weight.
N. Brandl, Table The
E. &Eensen
and Elecrronics
/ Computers
in Agricukure
15 (1996)
57-72
5 influence
Breed
of breed Landrace
on
residuals
from
Yorkshire
%
%
spline
functions
Duroc
%
No.
of litters
Mean residual
of a
Standard of mean
1
67
33
0
9
+1.15
0.85
2 3
84 16
16 84
0 0
18 16
-1.00 $0.87
0.75 1.29
4 5
33 16
67 33
0 50
6 10
+1.43 +0.77
2.16 0.77
6
33
16
50
15
-0.14
0.63
a Mean
Table The
67
of litters
within
breed
(kg.
error
form).
6 influence
Breed
of breed Landrace
on residuals %
Yorkshire
from %
the
mixed Duroc
model %
No.
of litters
Mean residual
1 2
of
Standard ’
67 84
33 16
0 0
9 18
-0.04 +0.09
0.16 0.11
3
16
84
0
16
+0.28
0.31
4
33
67
0
6
f0.06
0.15
5 6
16 33
33 16
50 50
10 15
-0.15 +0.12
0.3 1 0.17
a Mean
of litters
within
breed
(kg.
error
of mean
form).
The feeding method also showed systematic differences in the residuals, e.g. 0.4 kg higher in 60 kg live weight for pigs fed ad libitum compared to those on restricted feed. This difference is therefore of minor importance compared to the effects of breed and replicate. Tables 5 and 6 demonstrate the dependence of residuals on breed, according to the content of Landrace, Yorkshire, and Duroc in the crossbreed. The dependence was more clear in the model of spline functions than in the mixed model. As shown in Table 5, pigs with a large proportion of genes from Danish Yorkshire seem to have a higher live weight than Landrace pigs covering the same area. Standard error of mean of residual (Table 5) from the model of spline functions was 0.75 kg for Landrace pigs and 1.29 kg for Yorkshire pigs, while the residual from the mixed model (Table 6) was 0.11 kg for Landrace pigs and 0.31 kg for Yorkshire pigs. The polynomials of model 1 were tested for heterogeneity of regression coeficients by the effect of interaction between In body area and feeding methods, breed, and growth period. The results for replicate 1 showed a minor difference between feeding methods (*p < 0.0178). The effect of interaction between In body area and feeding methods was significant (***, < 0.0004) and also between In area and growth period (**p -C 0.0170). However, the effect of interaction between In area and breed was not significant (p < 0.0924). The intraclass correlation between variance of
68 Table 7 Random
h! Brand&
effect
E. J@gensen I Computers
on weight
estimation
from
and Electronics
in Agriculture
15 (1996)
57- 72
body area (In form)
Block variance 4
Pig (Block) variance
1
0.0023
0.0048
0.0023/(0.0023 0.0048/(0.0048
+ 0.0032) + 0.0032)
= 0.4182 = 0.6000
0.0032 0.0079"
&5.80/o f9.3%a
2
0.0015
0.0021
0.0015/(0.0015 0.0021/(0.0021
+ 0.0028) + 0.0028)
= 0.3488 = 0.4286
0.0028 0.0061"
f5.4% f8.2%
0.0005/(0.0005+0.0024)= 0.0009/(0.0009 + 0.0024)
0.1724 = 0.2727
0.0024 0.0061"
f5.0% f8.2%"
Replicate
3
’ Results
0.0005
from
spline
2 aPch,
0.0009
functions,
lntraclass c$/($
correlation
&,l($(h,
otherwise
Residual variance
+ u,‘)
+ up)]
u,2
+ 4
from
Accuracy exp[(In(lOO)
the mixed
a
model.
pigs within block and total variance was 0.60, while intraclass correlation between variance of block and total variance was 0.42 (Table 7). This showed that the measurements within blocks are more highly correlated than between blocks. Table 7 shows the accuracy percentage, which demonstrates the difference in accuracy of weight estimation between the model of spline functions and the mixed model. Results for replicate 2 showed a minor difference between feeding methods (**p < 0.04). The effect of interaction between In body area and feeding method was not significant (p < 0.0730). However, the interaction between In body area and breed was significant (***JI < O.OOOl), and also between In body area and growth period (***, < 0.0003). The intraclass correlation between variance of pigs within block and total variance was 0.43, while 0.35 with block (Table 7). Results for replicate 3 showed minor differences between feeding methods (**JJ < 0.0121). The effect of interaction between In body area and feeding methods was not significant (p < 0.4506). However, the interaction between In body area and breed was significant (***JI < O.OOOl), and also between in body area and growth period (***, < 0.0016). The intraclass correlation between variance of pigs within block and total variance was 0.27, while 0.17 with block (Table 7). Concerning the effect of the interaction between squared and cubic In body area and the fixed effects, no significant effects for the three replicates were found. A significant difference between the third replicate and the other replicates was found. Fig. 5 shows the relationship between the estimated values of weight and body area for each replicate, indicating the difference. 4. Discussion
4.1. Precision of weight estimation The almost linear relationship between the logarithm of area and logarithm of live weight supports the use of the allometric relationship between weight and body dimensions as suggested by Petherick (1983). The estimated precision from
N. Brandl,
E. Jqhgensen / Computers
and Electronics
in Agriculture
15 (1996)
69
57-72
Liveweight, kg 1401
0 500
I
I
I
I
I
I
I
1000
1500
2000
2500
3000
3500
4000
Body area, cm2 Replicate
--
1
-----
2
----
3
Fig. 5. The estimation of live weight using a mixed model for each replicate.
the spline functions model is much lower than reported by Schofield (1990) and Minagawa and Iechikawa (1992), but the present experiment covers a much higher weight range, abd the current estimate is based on a much higher number of pigs (Table 2). The estimated precision of the weighing method by image analysis system may seem rather low, but for many purposes in herd management, this precision might be satisfactory. 4.2. Differences betweenreplicates
However, problems might arise due to the systematic “noise” effects that were detected in the present experiment. Of great importance are the systematic differences between replicates. No satisfactory explanation for these differences has been found. If these differences between replicates are of a random nature, methods will have to be found in order to calibrate the relationship between area and weight for each new production cycle in the herd. On the other hand, if the differences are due to operator errors in the measurement technique, use of automatic algorithms for area and dimensions measurement could circumvent these errors. 4.3. Differences between breeds
The residuals from the spline functions showed systematic differences depending on breed. The results should only serve as an indication of the breed effect as the ex-
70
N. Brand, E. J@gensen i Computers and Electronics in Agriculture IS (1996) 57-72
perimental design did not allow proper breed comparison. The differences between breeds were expected, pointing to the need for using breed-specific relationship for weight prediction. A detailed study of weight and size of different parts of the body could point towards topics for further research, e.g. the difference in weight of the head between Landrace and Yorkshire (Pedersen and Busk, 1991) might account for some of the differences observed in this experiment. 4.4. Improvement
in weight estimation
The improvement in weight estimation from the mixed model was due to correction for the random effect of pigs within blocks and the interactions. Therefore the residual standard deviations from the mixed model were lower than those from spline functions. The model of spline functions has shown that image analysis is a promising method in weight estimation and the mixed model has shown that there are possibilities of improving weight estimation. Because of the significant effect of the pig’s height, further improvement of the automatic techniques for three-dimensional shape recognition would be expected to reduce the problem. The use of three-dimensional shape recognition should, however, be evaluated on a cost-benefit analysis. The improvement in weight prediction may not be as high as associated costs connected to the measurement method. The effect of feeding methods on live weight prediction was of minor importance. It is, however, important to recognize that the relationship between live weight and slaughter weight differs between feeding methods. If the weighing is done in order to optimize delivery strategies, the effect of feeding method should be taken into account. 5. Conchsions
Precision in weight estimation with 56% deviations can be achieved using image analysis, taking the correction of pigs’ variation into consideration. Therefore, weight estimation, using the mixed model, has led to the same precision as Schofield (1990) and Minagawa and Iechikawa (1992) found with a smaller number of pigs. It is difficult to envisage the establishment of a general area/weight relationship to be used in every production herd. Some kind of calibration of the general relationship to the individual herd is required. Therefore, further efforts should be directed towards automatic algorithms for image analysis, primarily algorithms for use under production conditions, e.g. estimation of the weight of several pigs in the same pen. Methods for calibration of the area/weight relationship should be investigated, e.g. using a sample of manual weighing for each pig. Because of the relatively low precision of the weight estimation, the use of video equipment in the herd might depend on the sum of benefits from all the different uses of image analysis in the herd, e.g. activity measurement and general surveillance as discussed by Van der Stuyft et al. (1991). Specification of the logistics of the future use is of importance, e.g. should the video sensors be concentrated on a specific area of the pen (e.g. feeding station), or should the whole pen (or several pens) be included, is there a need for special lighting, and how can the system be combined with electronic
N. Bran&,
E. J@ensen
/Computers
and Electronics
in Agkulture
15 (1996)
57-72
71
identification systems? A coordinated research effort in these areas is therefore important. The standard equipment for image analysis is expected to be available at very low cost in the future, in contrast with the standard weighing methods with weighing platforms, which do not utilize similar flexible techniques. For most weighing purposes, a high weighing precision is necessary. Such a high weighing precision is of low relevance in pig production, as the random influence of e.g. feeding and drinking makes a precise weight irrelevant almost immediately. References Delate, J.J. and Babu, R. (1990) Determination d’equations barymttriques sur des ports rustiques en milieu tropical. J. Rech. Porcine Fr., 22: 35-42. Filby, D.E. and Turner, M.J.B. (1979) A walk-through weigher for dairy cows. J. Agric. Eng. Res., 24: 67-78. Klatt, G. and Glende, P (1975) TierkorpermaBe bei Schweinen als Grundlage fur tiergerechte Standund Buchtenkonstruktionen. Tierzucht, 29: 420-422. Marchant, J.A. and Schofield, C.P. (1990) Pigs, Snakes and Maggots. Div. Note, Silsoe Research Institute, Silsoe, Bedford. Minagawa, H. and lechikawa, T (1992) Measurement of pig weights by an image analysis. ASAE Paper 92-0000. Nielsen, H. (1991) Behaviour and mutual relation of pigs from image and motion analysis. Stud. Rep.. Aalborg University. Aalborg. Pedersen, O.K. and Busk, H. (1991) Avl-Markedsforsog dissektion og anatomisk opmbling. The National Institute of Animal Science, Department for Research in Pigs and Horses, Tjele. Petherick, J.C. (1983) A note on allometric relationships in large white x landrace pigs. Anim. Prod., 36: 497-500. Phillips, R.W. and Dawson, W.M. (1936) A study of methods for obtaining measurements of swine. Anim. Prod., 29: 93-99. Sanotra, G.S. (1989) Automatiske registering af slagtekyllingens levendevzgt som middel til optimal produktion. [Automatic weighing of broilers as a means of production control.] Beretning 662, The National Institute of Animal Science, Research Center, Foulum, 30 pp. SAS Technical Report P-229 (1992) SASSTAT Software, Release 6.07, SAS Institute Inc., Cary, N.C., USA. Scan Beam A/S (1990) PO. 118, Norregade lo,9500 Hadsund, Denmark. Schofield, C.P. (1990) Evaluation of image analysis as a means of estimating the weight of pigs. J. Agric. Eng. Res., 47: 287-296. Schofield, C.F!, Addicott, A.L., Alloway, L., Bryant, E, Cameron, M. and Downs, C. (1989) Finding a way of obtaining the mass of pig without disturbing the pigs. Div. Note DN/1520, Engineering Education Scheme Student Project Report, Silsoe Research Institute, Silsoe, Bedford, approx. 100 PP. Slader, R.W. and Gregory, A.M. (1988) An automatic feeding and weighing system for ad lib. fed pigs. Comput. Electron. Agric., 3: 157-170. Smith, R.A. and Turner, M.J.B. (1974) Electronic aids for use in fat stock weighing. J. Agric. Eng. Res., 19: 299-311. Snedecor, G.W. and Cochran, W.G. (1967) Statistical Methods (6th Edition), The Iowa State University Press, Ames, Iowa, 329 pp. Tillett, R. and Marchant, J.A. (1990) Model-based image processing for characterizing pigs in scenes. SPIE, Optics Agric., 1379: 201-208. Turner, M.J.B. (1981) Performance monitoring of animals using on-line computer in animal production. Occas. Publ. Br. Sot. Anim. Prod., Anim. Prod., 5: 41-46.
72
N. Brandl,
E. J@gensen I Computers
and Electronics
in Agriculture
15 (1996)
57-72
Turner, M.J.B. and Smith, R.A. (1975) Recent developments in the handling and weighing of farm animals. Livest. Prod. Sci., 2: 289-295. Turner, M.J.B., Benson, J.A., Hanley, M. and Hartwell, E.S. (1985) Automatic weight monitoring of pigs, Part I. Trials of prototype weigh platforms. Div. Note DN/1266, Silsoe Research Institute. Silsoe, Bedford, 32 pp. Van der Stuyft, E. and Coedseels, V. (1990) Three dimensional computer version for exterior measurements on pigs in vivo. In: Pro. Ageng 90 Berlin, part 5.13, pp. I-IO. Van der Stuyft, E., Schofield, C.P., Randall, J.M., Wambacq, P. and Goedseels, V. (1991) Development and application of computer version systems for use in livestock production. Comput. Electron. Agric., 6: 243-265. Wold, S. (1974) Spline function in data analysis. Technometrics, 16(l): 1-l 1. Wouters, P., Geers, R., Parduyns, G., Goosens, K., Truyen, B., Goedsels, V. and Van der Stuyft, E. (1990) Image-analysis parameters as inputs for automatic environmental temperature control in piglet houses. Comput. Electron. Agric., 5: 233-246. Yea, M.L. and Smith, I? (1977) A note on relationships between girth measurements and sow live weight change. Exp. Husb., 33: 81-84.