pesaje de cerdos

Upload: david-bastidas

Post on 07-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 Pesaje de cerdos

    1/7

    See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/236886740

    Weight Estimation Using Image Analysis andStatistical Modelling: A Preliminary Study 

     ARTICLE  in  APPLIED ENGINEERING IN AGRICULTURE · JANUARY 2007

    Impact Factor: 0.41 · DOI: 10.13031/2013.22332

    CITATIONS

    4

    READS

    50

    4 AUTHORS, INCLUDING:

    Thomas M. Banhazi

    University of Southern Queensland

    78 PUBLICATIONS  254 CITATIONS 

    SEE PROFILE

    Available from: Thomas M. Banhazi

    Retrieved on: 18 March 2016

    https://www.researchgate.net/profile/Thomas_Banhazi?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_4https://www.researchgate.net/profile/Thomas_Banhazi?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_5https://www.researchgate.net/profile/Thomas_Banhazi?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_5https://www.researchgate.net/?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_1https://www.researchgate.net/profile/Thomas_Banhazi?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_7https://www.researchgate.net/institution/University_of_Southern_Queensland?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_6https://www.researchgate.net/profile/Thomas_Banhazi?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_5https://www.researchgate.net/profile/Thomas_Banhazi?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_4https://www.researchgate.net/?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_1https://www.researchgate.net/publication/236886740_Weight_Estimation_Using_Image_Analysis_and_Statistical_Modelling_A_Preliminary_Study?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_3https://www.researchgate.net/publication/236886740_Weight_Estimation_Using_Image_Analysis_and_Statistical_Modelling_A_Preliminary_Study?enrichId=rgreq-369a90d0-00a6-4d8a-bb2e-13377ba2f4b2&enrichSource=Y292ZXJQYWdlOzIzNjg4Njc0MDtBUzoyMTg3ODYxNTEwNDcxNjhAMTQyOTE3NDA5MTI3Mw%3D%3D&el=1_x_2

  • 8/18/2019 Pesaje de cerdos

    2/7

     Applied Engineering in Agriculture

    Vol. 23(1): 91-96    2007 American Society of Agricultural and Biological Engineers ISSN 0883−8542 91

     

    WEIGHT ESTIMATION USING IMAGE A NALYSIS  ANDSTATISTICAL  MODELLING: A PRELIMINARY STUDY

    K. Kollis, C. S. Phang, T. M. Banhazi, S. J. Searle

     ABSTRACT. The weighing of pigs on a farm is traditionally performed manually, making the process time-consuming and laborious. An automated weighing system could thus greatly improve the efficiency of the weighing process. Former studieshave demonstrated that an animal’s weight may be estimated via analysis of an image of that animal. A recent study conducted at the University of Adelaide aimed to implement an automatic weight estimation system for pigs, and use this system toconfirm the results of previous studies while investigating new features, such as additional statistical modelling. A system wasdesigned and implemented using off-the-shelf hardware. It was found that the system was able to estimate a pig’s weight withan acceptable error.

     Keywords. Precision livestock farming, Image processing, Weight estimation, Pigs.

    he aim of this project was to develop a system capa-ble of estimating a pig’s weight based on an image

    of the pig. Previous research into this topics demon-strated that a correlation exists between the weight

    of a pig and physical features such as the pig’s length or two-dimensional area when viewed from above (Brandl and Jor-gensen, 1996; Schofield et al., 1999). The main task was toverify these findings and to investigate if improved correla-tion can be established between certain features of a pig’simage and its weight using additional statistical modelling.

    To confirm a correlation between a pig’s weight and somephysical features, the necessary data had to be collected, suchas the images of pigs and their corresponding weights. A system for data collection and image processing wasdesigned to function in an automated fashion. The tasks wereautomated to ensure that components of the system could be

    reused when the fully developed non-invasive weighingsystem is commercialized.

    B ACKGROUNDWithin the agricultural industry, weighing of livestock is

    a necessity. It is used to monitor the growth and health of theanimals and to determine their market value (Schofield,1990; Schofield et al., 1999). When delivering animals to the

    Submitted for review in December 2005 as manuscript number SE6070; approved for publication by the Structures & Environment Divisionof ASABE in September 2006. 

    The authors are Kristina Kollis,  Research Student, Phang CheeShiong,  Research Student, University of Adelaide, Department of Electrical Engineering, North Terrace Campus, SA; Thomas M. Banhazi,PhD, ASABE Member Engineer, Research Scientist, Livestock System

     Alliance, University of Adelaide, Roseworthy Campus, Roseworthy, SA;and Stephen J. Searle,  Research Scientist, University of Adelaide,Department of Electrical Engineering, North Terrace Campus, SA.Corresponding author:  Thomas M. Banhazi, Research Scientist,Livestock System Alliance, University of Adelaide, Roseworthy Campus,Roseworthy, SA; phone: 618-8303 7781 fax: 618-8303 7975; e-mail:[email protected].  

    market their weight must fall within a specified range, andthis range is progressively becoming smaller. Marketing

    animals that fall outside of this weight range can lead topenalties for the farmer and significant deductions frommarket price (Doeschl-Wilson et al., 2005).

    Traditionally, weighing is performed manually and thismethod is very laborious and time consuming. It wouldgenerally involve having to physically move the pig to a setof scales, and for a large pig it could take two stockmen 3 to5 min to complete the job (Brandl and Jorgensen, 1996). Thismethod is stressful to the animal and impractical, as well aspotentially dangerous from an ergonomic point of view.

    Research has previously been undertaken on imageprocessing systems used to estimate the weight of variousanimals (Cross et al., 1983; Ruff et al., 1995; Chao et al.,2000). Promising results have been obtained with pigs

    (Whittemore and Schofield, 2000; Doeschl-Wilson et al.,2005). A recent study showed that a linear relationshipexisted between the area of a pig’s image and its weight, andby analyzing images of pigs their weight could be estimated

     with an error of only 5% (Schofield et al., 1999).By determining the weight of livestock via an image

    processing system, the amount of time, the cost, and manuallabor required for weighing could be greatly reduced.Weighing could occur more often; giving the farmers theability to monitor their herd more closely. It can provideuseful information about the growth of the animals and assistthe farmer in choosing an improved feeding regime (Scho-field, 1990; Banhazi et al., 2003). It could also give early

     warning on potential disease outbreak in the herd, which will

    be an essential component of any futuristic PrecisionLivestock Farming (PLF) system (Schofield et al., 1999;Banhazi et al., 2002).

    MEASUREMENT SYSTEMTo perform this study a number of equipment, including

    (1) a weighing system, (2) an image capture device, (3) an

    T

  • 8/18/2019 Pesaje de cerdos

    3/7

    92 A PPLIED ENGINEERING IN A GRICULTURE

    enclosure to positions the pigs with lighting, and (4) a frameto mount the camera was required.

    The weighing system (ACCU-ARM Survey Scale, Os-borne Inc. USA, Osborne, Kans.) was set up on a commercialfarm and used to collect the necessary weight data.

     A Logitech QuickCam Messenger webcam was used tocapture images of the pigs. This camera has a 640 ×  480resolution and a frame rate of up to 30 frames per second. Itis a cost-effective instrument, can be easily connected to acomputer via a Universal Serial Bus (USB) port and can be

    effectively controlled. A rectangular enclosure (900 ×  1350 ×  364 mm) wasconstructed. The enclosure was only wide enough to fit onepig. Doors on spring hinges were attached to the enclosure toprevent more than one pig entering at the same time.

     An extendible frame with a maximum height of 3 m wasconstructed to mount the webcam on. This was the necessaryheight to ensure that the entire enclosure was in the field of view of the webcam.

    The whole system was in a fully enclosed piggery building with fluorescent lighting. Extra lighting was still required forthe webcam to capture quality images. Two 50-W downlights(MR-16C halogen, Etlin-Daniels Ltd., Toronto, ON, Canada)

     were used and mounted on the webcam frame. A diagram of 

    the setup is shown in figure 1.

    SOFTWAREThree different computing languages (MATLAB, Java

    and DELPHI) were used in this study.MATLAB V6.5.1 (R13) with the Image Processing

    Toolbox V4.1 (the MathWorks, Inc., Natick, Mass.) was usedto perform all image processing algorithms. Custom Javasoftware was used to control the webcam, capture and storethe images of the pigs.

    Direct communication with the scale was to be establishedto automatically capture the weight of the animals as soon asthey entered the enclosure. Unfortunately due to sometechnical problems this was not achieved during this study.Therefore, the weights were recorded manually and associat-ed with the images offline.

    (a)(b)

    (c)

    (d)

    Figure 1. Camera and lighting setup (a) webcam, (b) down lights, (c) web-cam frame, (d) enclosure. (The figure is not to scale.)

    BUILDING  AND PIGSThe experiment was conducted in a fully slatted grower/ 

    finisher building constructed using sandwich panels andsituated in the Wakefield Regional Council area within South

     Australia. The building, typically housing approximately1,000 grower pigs, was equipped with tunnel ventilation anda liquid feeding system. All animals used in this preliminaryexperiment were male Large White pigs.

    IMAGE PROCESSINGR EQUIREMENTS

     An automated weight estimation system requires somemeans of extracting information from an image of a pig. Thisinformation is a measure of the pig’s apparent size, and is theend product of a sequence of image processing steps usedduring this study. These steps comprised (1) object detection,(2) segmentation, (3) filtering, and (4) feature extraction.Object detection is the determination of whether or not anobject of interest (a pig in this case) is in the camera’s fieldof view. Should such an object be present, it is then isolatedfrom the background imagery (segmentation). Filtering isperformed on a segmented image in order to remove spurious

    segmented pixels and to fill in poorly segmented regions of the target object. Finally dimensional features of thesegmented region, such as area and length, are computed.Statistical analysis yields a correlation between thesefeatures and animal weight. This relationship can then beused to predict pig weight based upon feature values.

    OBJECT DETECTION A fixed threshold method was used to determine the

    presence of a pig in the camera’s field of view. This threshold was determined by an offline calibration step.

    Two images were captured from the fixed camera rig; oneimage containing a pig and the other image empty, i.e. just thebackground. These two images were then compared to locate

    the largest region of significant difference. The brightness of each pixel in the pig image was compared with thecorresponding pixel in the background image. A binaryimage was formed based on the result of this comparison, inthe manner depicted in figure 2.

    Typically the output binary image, c, would haveconsisted of a large region of ones and smaller regions of onesscattered throughout the image. The largest contiguousregion of one-valued pixels was found. This region was takento be the silhouette of the pig in the image. A rectangulardetection region, with the same center as the silhouette butapproximately half the dimensions, was defined. Theaverage brightness of that region in both photos wascomputed. The midpoint between these two average bright-

    ness values was chosen as the detection threshold. Thiscompleted the calibration process.

    Pig detection could then be performed by sampling animage and comparing the measured brightness from thepixels in the defined detection region with the detectionthreshold. If a large percentage of pixels passed the test, thena pig was declared to be present and the image saved forfurther analysis.

    Note that in practice, calibration was performed wholly with a relatively clean white pig, despite a small number of non-white or patterned pigs existing in the herd. Calibration

  • 8/18/2019 Pesaje de cerdos

    4/7

    93Vol. 23(1): 91-96

    1 3 2 1 1 1 3 2 1 1 0 0 0 0 0

    2 1 1 3 1 2 8 9 3 1 0 1 1 0 0

    2 1 3 3 2 2 8 9 3 2 0 1 1 0 0

    3 2 3 3 2 3 9 9 3 3 0 1 1 0 0

    1 1 2 1 1 1 2 2 1 1 0 0 0 0 0

    Image (a) Image (b) Output (c)

     

     

    ≥−

  • 8/18/2019 Pesaje de cerdos

    5/7

    94 A PPLIED ENGINEERING IN A GRICULTURE

    Binary Image

    Erosion   Dilation

    Figure 5. Erosion and dilation performed on a binary image.

    ground objects which were erroneously segmented, while

    preserving the main object (the pig). In this study adisk-shaped structuring element of size 7 was used. Theoperation was performed trivially in Matlab via the imopencommand:

    im2 = imopen(im1,strel(‘disk’,7));

     An example of median filtering followed by opening is givenin figure 6.

    FEATURE EXTRACTIONOnce the image of the pig was segmented and cleaned up

    via filtering, features could be extracted. The three featuresthat were employed in this study were area, length, and spinelength.

    The area of the object in pixels is trivially defined to be thesum of the binary pixel values over the whole image. Thisassumes that by this stage there will be only one contiguousregion in the image.

    The spine length feature refers not to the pig’s actualspine, but to the major branch of the tree structure which isfound by performing skeletonization on the binary image.Skeletonization is a process that reduces all objects in animage to lines without changing the essential structure of theimage. In this case the skeleton is not a representation of theanimal’s actual skeleton, but a connected set of lines whichrepresent the centres of the animal’s visible protuberances.The skeleton thus is a representation of the topology of theobject or animal under scrutiny. (Davies 1997; Heneghanet al., 2002). The process is often used for tasks such as textrecognition since the essential shape of letters and glyphsremains the same regardless of handwriting. Skeletonizationis trivially performed in Matlab via the command im2 =bwmorph(im1,‘skel’). An example of this is shown infigure 7. The skeleton has been superimposed on the negative

    Figure 6. Image filtering and opening performed on the image of pig.

    Figure 7. Skeletonization performed on a segmented image.

    of its corresponding segmented image to better display theskeletonization process.

    This spine length is the number of pixels which comprisethe main (longest) branch of the skeleton. This feature is

    expected to be robust to the animal’s posture, because thedistance along the animal’s spine remains relatively constantregardless of curvature, and the main junction points of theskeleton remain relatively constant when the animal movesits head.

     The spine length was computed by isolating the largestbranch in the skeleton and counting the number of pixels. Themain branch was located by determining the location of 

     junctions via a zero-crossing method (Mehrotra and Zhan,1996).

    The length feature refers to the distance from the center of the pig’s neck to its tail. The position of the pig’s neck provedto be difficult to detect due to the unknown orientation of thepig’s head. It was decided to estimate the pig’s neck position

    as the point at which the main segment (referred to as thespine above) of the pig’s skeleton terminated. After skeleto-nization as above, the two endpoints of the spine were found.The “head” endpoint was deemed to be the one which gaverise to the most sub-branches, as the head was moretopologically complex than the rump and usually produceda more structured sub-skeleton. The tail was assumed to bethe most extreme pixel of the segmented image at theopposite end from the head. With these two data points theEuclidean distance could then be found, giving a closeapproximation of the length of the pig. Euclidean distance

     was appropriate since the pixel dimension ratio was one-to-one. If this were not the case, a weighted metric (e.g.Mahalanobis distance) would have been appropriate. How-

    ever since the animals were constrained to been oriented inthe same direction as the image X axis, the effect of unevenscaling on the X and Y axes would likely be minimal and theEuclidean distance would be a good approximation to actualdistance in this particular study.

    Table 1. Statistical results.

    Weight vs.Log (Area)

    Log (Weight)vs. Length

    Weight vs. Log(Spine Length)

    Correlation coefficient 0.7787 0.7751 0.5793

    P-value 4.55 × 10−

    6 6.91 × 10−

    9 1.11 × 10−

    4

     Average error 3.24 kg(5.33%)

    3.53 kg(5.78%)

    4.13 kg(6.76%)

    68% Confidence Interval 7.56 kg(12.42%)

    7.80 kg(5.78%)

    9.22 kg(15.10%)

    95% Confidence Interval 11.70 kg(19.23%)

    11.91 kg(19.51%)

    14.10 kg(23.11%)

    99% Confidence Interval 14.38 kg(23.63%)

    14.56 kg(23.86%)

    17.26 kg(28.28%)

  • 8/18/2019 Pesaje de cerdos

    6/7

    95Vol. 23(1): 91-96

     ANALYSIS OF R ESULTSThe full set of data contained 84 image weight pairs. Many

    of these images were duplicate images of the same animal.38 unique animals were identified and these formed the basedata set. Some of these images were of poor quality, in thatthe head of the animal did not fall within the field of view, orthe outline of the animal was blurry. In these cases the areacomputation was found to suffer. There were 14 such casesin the data set. These area-weight pairs were excluded fromanalysis. However, the algorithms for neck detection and

    length computation were found to be acceptably robust in thecase of blurring or partial head obscuration. Therefore the full38 data points were used for these analyses. It would havebeen preferable to have a much larger dataset, especially forthe area analysis, however promising results were stillobtained and are summarized in table 1.

    The best results were obtained when using the neck-to-taildistance versus log weight (correlation coefficient 0.5640)and area versus weight (correlation coefficient 0.5295) todetermine the weight. These correlation coefficients wereboth significant, having a probability of occurrence less than1%. The resulting linear weight prediction formulas achievean average absolute error just under 5% in either case,confirming the results found in the literature (Schofield et al.,

    1999). A scatter plot of weight versus log(area) with a fittedregression line is shown in figure 8, and a scatter plot of log

     weight versus length with regression line in figure 9. Theresults obtained with the spine length feature were lessconclusive, having a correlation coefficient of 0.3300, or aprobability of 4.3%. However the absolute error predicted bythe corresponding linear prediction equation was 5.94%,only slightly higher than for the other two methods.

     A further statistical analysis based on the weight, area andlength data (using the 24 ”good” samples) resulted in a R2

    value of 0.7154, which corresponds to a correlation coeffi-cient of 0.8458. Using the area and length variables gave riseto the following results:

     Average error: 2.83 kg (4.65%)

    68% confidence interval: 3.67 kg (6.03%)

    95% confidence interval: 7.19 kg (11.82%)

    99% confidence interval: 9.47 kg (15.56%)

    Initial results indicated that predictive precision of theequations might be improved if combined area and lengthdata were used.

    The regression equations of all the weight featurerelationships are shown below, where y, x1, x2, x3  andcorrespond to weight, area, length, and spine length,

    respectively. No equations incorporating x2 x3 or x1 x3 termsare reported because there was no significant interactionbetween the corresponding features.

     y = 35.05log( x1) − 262.4

    log( y) = 5.966 × 10-3 x2 + 3.040

     y = 22.10log( x3) − 50.14

     y = 3.470 × 10-2 x1 + 1.716 x2 − 1.690 × 10-4  x1 x2 − 291.4

    Figure 8. Scatter plot of weight vs. log(area) with fitted regression line.

    Figure 9. Scatter plot of log weight vs. neck-to-tail length with fitted re-gression line.

    CONCLUSION  AND SUMMARYThis study verified that the weight of a pig could beestimated from a top-view image with an average error of around 5%. Of the features investigated, area and neck-to-taillength had high correlation with a pig’s weight. The study hasdemonstrated a weaker relationship between the spine lengthfeature and weight.

    This study suffers from the limitation of a small sample of pigs, all of which occupy a small weight range. Neverthelessthe study has demonstrated the existence of definite linear orlog-linear relationships between features and weight for thisrange. This study has laid the foundations for further work,in terms of suggesting a new feature (spine length) andsuggesting a novel way of measuring a previously used

    feature (neck position), and demonstrating the efficacy of these methods through application to real imagery. Resultshave been promising and invite further investigation with alarge sample of animals across a broader weight range.

    IMPROVEMENTS  AND FUTURE WORK Due to time constraints and technical problems an

    automated system that could capture images of pigs andestimate their weights in real time was not developed.However due to the success of the individual components of this project, such a system would be relatively easy to

  • 8/18/2019 Pesaje de cerdos

    7/7

    96 A PPLIED ENGINEERING IN A GRICULTURE

    produce. With this study Java was used to capture images forthe data collection stage and MATLAB was used to processthem, by combining these two programs; a fully functioningsystem could be designed. Alternatively, to avoid the need tocombine the two programming languages, the entire programcould be written in either Java or MATLAB.

    One important ability of an automated system would bethe need to automatically adjust to the particular environmentin which it was installed. This aspect falls outside the scopeof the current study, but bears mention here. The appearance

    of the pig in an image will depend upon factors such ascamera location (height, orientation), camera intrinsic pa-rameters (focal length, aperture, pixel resolution), andlighting. It will therefore be necessary to perform somecalibration of an installed system. However if the equationsspecifying the linear relationship between pig and weightcould be expressed in terms of an objective measurement unit(e.g. meters) instead of a subjective unit which depends uponcamera parameters (i.e. pixels), then it would be possible tosupply an installation with hard-wired linear relationships.The task of calibrating the camera to determine therelationship between pixels and metres would remain, but thepig-weight equation would not have to be learned by thesystem. As it stands, the current approach is adaptable to

    other situations only by performing data analysis to deter-mine the weight-feature relationship once the camera isinstalled.

    Before a fully automated system is put into place, it wouldbe useful to revise the segmentation algorithm. Withimproved segmentation it may be possible to achieve a highercorrelation and lower error.

    In addition, there are other features that could beinvestigated. In this study the calculation of the area of the pigincluded the pigs head. This has been shown previously to bea possible source of error (Schofield, 1990). Therefore, if thepig’s body area was calculated, without including its head,this would lead to a large decrease in the error. Other featuresthat could be investigated are the width of the hips or

    shoulders, or a combination of the length, hip and shoulder width.

    Different equations relating a pig’s weight to one of thesefeatures may exist for the different breeds or the sex of thepig. Detecting these factors via image processing would notbe plausible, but if a farmer were to have only one breed thenthe equation could be calibrated to suit individual circum-stances. In addition if the pigs had new generation RF ID(Radio Frequency Identification) tags which store more thanidentification, then breed/gender information could be storedon the tag and the appropriate equation applied to the pig.

     Another possible extension for this project would be tocalculate features in real units i.e. meters or square meters,not pixels as done in this study. Once again this aspect was not

    looked into due to project restrictions, but if the imagescontained some markers of known distance then the realmeasurements of the pig’s features could be extrapolated.This would be beneficial because if the equipment was to berelocated, or maintenance was performed, it would notmatter if the height or position of the camera were to change.

    If multiple cameras were used, there are more features thatcould be extracted from the images, such as the pig’s height,or width from its stomach to its back. As demonstrated byprevious research, it is also possible to create a threedimensional image of the pig (Wu et al., 2004). Although

    these options would most likely give better results, they alsoinvolve more equipment and more sophisticated imageprocessing techniques, which in turn would lead to a greatercost. The extra precision gained from these techniques maynot be worth the extra cost involved.

     ACKNOWLEDGEMENTSThe authors wish to acknowledge the technical assistance

    of Mr. Ian Linke and Mr. Alban O’Brien (University of  Adelaide) with the setup of the instrumentation, Mr. Greg

    Ludvigsen (Ludvigsen Family Farms) for providing assess tothe experimental facilities, Gerald Johnson (Osborne Indus-tries) for providing assistance with programming and Mr.David Rutley (University of Adelaide) for assisting with thestatistical analysis.

    R EFERENCESBanhazi, T., J. L. Black, M. Durack, C. Cargill, A. King, P. Hughes.

    2002. Precision livestock farming. In Australian Association of  Pig Veterinarians Proceedings 2002. Adelaide, Australia: Australian Association of Pig Veterinarians.

    Banhazi, T., J. L. Black, and M. Durack. 2003. Australian precisionlivestock farming workshops. In Joint Conference of 

     ECPA-ECPLF, eds. A. Werner and A. Jarfe, 675-684. Berlin,Germany:Wageningen Academic Publisher.

    Brandl, N., and E. Jorgensen. 1996. Determination of live weight of pigs from dimensions measured using image analysis.Computers and Electronics in Agriculture 15(1): 57-72.

    Chao, K., B. Park, Y. R. Chen, W. R. Hruschka, and F. W. Wheaton.2000. Design of a dual-camera system for poultry carcassesinspection. Applied Engineering in Agriculture 16(5): 581-587.

    Cross, H. R., D. A. Gilliland, P. R. Durland, and S. Seideman. 1983.Beef carcass evaluation by use of a video image analysis system.

     J. of Animal Science 57(4): 908-917.Davies, E. R. 1997. Machine Vision: Theory Algorithms Practices,

    2nd ed. San Diego, Calif.: Academic Press.Doeschl-Wilson, A.B., D. M. Green, A. V. Fisher, S. M. Carroll, C.

    P. Schofield, and C. T. Whittemore. 2005. The relationship

    between body dimensions of living pigs and their carcasscomposition. Meat Science 70(2): 229-240.Heneghan, C., J. Flynn, M. O’Keefe, and M. Cahill. 2002.

    Characterization of changes in blood vessel width and tortuosityin retinopathy of prematurity using image analysis. Medical 

     Image Analysis 6(4): 407-429.Mehrotra, R., and S. Zhan. 1996. A computational approach to

    zero-crossing-based two-dimensional edge detection. Graphical  Models and Image Processing 58(1): 1-17.

    Ruff, B. P., J. A. Marchant, and A. R. Frost. 1995. Fish sizing andmonitoring using a stereo image analysis system applied to fishfarming. Aquacultural Engineering 14(2): 155-173.

    Schofield, C. P. 1990. Evaluation of image analysis as a means of estimating the weight of pigs. J. of Agricultural Engineering

     Research 47(): 287-296.Schofield, C. P., J. A. Marchant, R. P. White, N. Brandl, M. Wilson.

    1999. Monitoring pig growth using a prototype imaging system. J. of Agricultural Engineering Research 72(3): 205-210.

    Whittemore, C. T., and C. P. Schofield. 2000. A case for size andshape scaling for understanding nutrient use in breeding sowsand growing pigs. Livestock Production Science 65(3): 203-208.

    Wu, J., R. Tillett, N. McFarland, X. Ju, J. P. Siebert, and P.Schofield. 2004. Extracting the three-dimensional shape of livepigs using stereo photogrammetry. Computers and Electronicsin Agriculture 44(3): 203-222.