machine vision detection of bonemeal in animal feed samples

7
Machine Vision Detection of Bonemeal in Animal Feed Samples CHRISTIAN NANSEN,* TIMOTHY HERRMAN, and RAND SWANSON Texas AgriLife Research, 1102 E FM 1294 Lubbock, Texas 79403-6603 (C.N.); Plant and Soil Science Department, Texas Tech University, Campus Box 42122, Lubbock, Texas 79409 (C.N.); Office of the Texas State Chemist, Texas A&M, PO Box 3160, College Station, Texas 77841 (T.H.); and Resonon Inc., 619 N. Church Ave. Suite 3, Bozeman, Montana 59715 (R.S.) There is growing public concern about contaminants in food and feed products, and reflection-based machine vision systems can be used to develop automated quality control systems. An important risk factor in animal feed products is the presence of prohibited ruminant-derived bonemeal that may contain the BSE (Bovine Spongiform Encephalopathy) prion. Animal feed products are highly complex in composition and texture (i.e., vegetable products, mineral supplements, fish and chicken meal), and current contaminant detection systems rely heavily on labor- intensive microscopy. In this study, we developed a training data set comprising 3.65 million hyperspectral profiles of which 1.15 million were from bonemeal samples, 2.31 million from twelve other feed materials, and 0.19 million denoting light green background (bottom of Petri dishes holding feed materials). Hyperspectral profiles in 150 spectral bands between 419 and 892 nm were analyzed. The classification approach was based on a sequence of linear discriminant analyses (LDA) to gradually improve the classification accuracy of hyperspectral profiles (reduce level of false positives), which had been classified as bonemeal in previous LDAs. That is, all hyperspectral profiles classified as bonemeal in an initial LDA (31% of these were false positives) were used as input data in a second LDA with new discriminant functions. Hyperspectral profiles classified as bonemeal in LDA2 (false positives were equivalent to 16%) were used as input data in a third LDA. This approach was repeated twelve times, in which at each step hyperspectral profiles were eliminated if they were classified as feed material (not bonemeal). Four independent feed materials were experimentally contaminated with 0–25% (by weight) bonemeal and used for validation. The analysis presented here provides support for development of an automated machine vision to detect bonemeal contamination around the 1% (by weight) level and therefore constitutes an important initial screening tool in comprehensive, rapid, and practically feasible quality control of feed materials. Index Headings: Hyperspectral imaging; Quality control; Feed inspection; Real-time analysis; Bovine spongiform encephalopathy; Prohibited feed contaminants. INTRODUCTION The quality of animal feed not only influences the growth and well-being of livestock animals, but it is also well known that pathogens and toxic constituents in domestic animals can be transferred from milk and meat products and pose potential health risks to consumers. 1–5 An important risk factor in ruminant feed products is the presence of ruminant-derived bonemeal (prohibited animal protein) that may contain the BSE (Bovine Spongiform Encephalopathy) prion. 6 The latest case of BSE in the US was confirmed in 2006 from a cow in Alabama. 7 In Europe, there is a ban on use of all rendered animal protein in feedstuffs for food production animals. 8,9 In the US, feedlots and to a lesser extent dairy farms typically rely on in-house feed mills to produce bulk feeds, which are supplemented with high-protein supplements from external sources. Potential contamination of ruminant feed products with bonemeal include cross-contamination by transporters, protein blenders working with multiple sources of animal protein, and feed mills that manufacture protein supplement for cattle and non-ruminant species. In the US, the Food and Drug Administration (FDA) and state feed control officials evaluate ruminant feed samples for the presence of prohibited animal protein as part of a nationwide BSE detection program. Feed samples are collected during inspections of feedlots and feed mills using approved analytical sampling methods and subsequently inspected under laboratory conditions based on standardized microscopy procedures. 10 The physical preparation of feed samples for inspection takes about two hours per sample, and careful microscopy based inspection by specially trained technicians takes an additional two hours per feed sample. If bonemeal particles or other potentially prohibited ruminant-derived contaminants are found during microscopy, the feed sample is subjected to further analyses using polymerase chain reaction (PCR) technology. As the initial detection is based upon microscopy (and therefore quite dependent upon the technician conducting the inspection), little is known about the minimum detection level for this inspection procedure. Mainly due to growing public concern about contaminants and defects in food and feed production, reflection-based technologies are being used to develop machine vision systems for detection of defects and contaminants in a wide range of food products, including meat, 11,12 fruits and vegetables, 13–18 grain and flour, 19–22 and animal feed. 23–25 Pierna et al. 24 collected reflectance data in the 900 to 1700 nm wavelength range (spectral bands in 10 nm increments) from animal feed particles and bonemeal fragments, and validation was based upon placement of individual feed particles in a cross surrounded by vegetal feed particles. The clear advantage of this experimental arrangement of feed particles is that the actual position of bonemeal particles and their number per image cube were known. However, this simplified arrangement does not take into account the potential error associated with partially overlapping particles and residue/dust from one feed material being deposited on other particles, and the authors did not clarify what type of bonemeal particles were used and whether all the used bonemeal particles were the same tissue (whether it was bone, flesh, or any other type of animal tissue). Another concern is that bonemeal may not distribute uniformly when mixed with other feed materials, and that can dramatically affect the minimum detection level. A very important challenge associated with accurate and consistent detection of contaminants in animal feed materials is that they constitute highly heterogeneous mixtures of particles in terms of colors, textures, shapes, and dimensions (Fig. 1). Detection of ruminant-derived bonemeal refers to hair, flesh, blood, bone, and grease. To what extent can these different tissues be Received 8 December 2009; accepted 1 April 2010. * Author to whom correspondence should be sent. E-mail: cnansen@ag. tamu.edu. Volume 64, Number 6, 2010 APPLIED SPECTROSCOPY 637 0003-7028/10/6406-0637$2.00/0 Ó 2010 Society for Applied Spectroscopy

Upload: rand

Post on 03-Oct-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Machine Vision Detection of Bonemeal in Animal Feed Samples

Machine Vision Detection of Bonemeal in Animal Feed Samples

CHRISTIAN NANSEN,* TIMOTHY HERRMAN, and RAND SWANSONTexas AgriLife Research, 1102 E FM 1294 Lubbock, Texas 79403-6603 (C.N.); Plant and Soil Science Department, Texas Tech University,Campus Box 42122, Lubbock, Texas 79409 (C.N.); Office of the Texas State Chemist, Texas A&M, PO Box 3160, College Station,

Texas 77841 (T.H.); and Resonon Inc., 619 N. Church Ave. Suite 3, Bozeman, Montana 59715 (R.S.)

There is growing public concern about contaminants in food and feed

products, and reflection-based machine vision systems can be used to

develop automated quality control systems. An important risk factor in

animal feed products is the presence of prohibited ruminant-derived

bonemeal that may contain the BSE (Bovine Spongiform Encephalopathy)

prion. Animal feed products are highly complex in composition and

texture (i.e., vegetable products, mineral supplements, fish and chicken

meal), and current contaminant detection systems rely heavily on labor-

intensive microscopy. In this study, we developed a training data set

comprising 3.65 million hyperspectral profiles of which 1.15 million were

from bonemeal samples, 2.31 million from twelve other feed materials,

and 0.19 million denoting light green background (bottom of Petri dishes

holding feed materials). Hyperspectral profiles in 150 spectral bands

between 419 and 892 nm were analyzed. The classification approach was

based on a sequence of linear discriminant analyses (LDA) to gradually

improve the classification accuracy of hyperspectral profiles (reduce level

of false positives), which had been classified as bonemeal in previous

LDAs. That is, all hyperspectral profiles classified as bonemeal in an initial

LDA (31% of these were false positives) were used as input data in a

second LDA with new discriminant functions. Hyperspectral profiles

classified as bonemeal in LDA2 (false positives were equivalent to 16%)

were used as input data in a third LDA. This approach was repeated

twelve times, in which at each step hyperspectral profiles were eliminated

if they were classified as feed material (not bonemeal). Four independent

feed materials were experimentally contaminated with 0–25% (by weight)

bonemeal and used for validation. The analysis presented here provides

support for development of an automated machine vision to detect

bonemeal contamination around the 1% (by weight) level and therefore

constitutes an important initial screening tool in comprehensive, rapid,

and practically feasible quality control of feed materials.

Index Headings: Hyperspectral imaging; Quality control; Feed inspection;

Real-time analysis; Bovine spongiform encephalopathy; Prohibited feed

contaminants.

INTRODUCTION

The quality of animal feed not only influences the growthand well-being of livestock animals, but it is also well knownthat pathogens and toxic constituents in domestic animals canbe transferred from milk and meat products and pose potentialhealth risks to consumers.1–5 An important risk factor inruminant feed products is the presence of ruminant-derivedbonemeal (prohibited animal protein) that may contain the BSE(Bovine Spongiform Encephalopathy) prion.6 The latest case ofBSE in the US was confirmed in 2006 from a cow inAlabama.7 In Europe, there is a ban on use of all renderedanimal protein in feedstuffs for food production animals.8,9 Inthe US, feedlots and to a lesser extent dairy farms typically relyon in-house feed mills to produce bulk feeds, which aresupplemented with high-protein supplements from externalsources. Potential contamination of ruminant feed products

with bonemeal include cross-contamination by transporters,protein blenders working with multiple sources of animalprotein, and feed mills that manufacture protein supplement forcattle and non-ruminant species.

In the US, the Food and Drug Administration (FDA) andstate feed control officials evaluate ruminant feed samples forthe presence of prohibited animal protein as part of anationwide BSE detection program. Feed samples are collectedduring inspections of feedlots and feed mills using approvedanalytical sampling methods and subsequently inspected underlaboratory conditions based on standardized microscopyprocedures.10 The physical preparation of feed samples forinspection takes about two hours per sample, and carefulmicroscopy based inspection by specially trained technicianstakes an additional two hours per feed sample. If bonemealparticles or other potentially prohibited ruminant-derivedcontaminants are found during microscopy, the feed sampleis subjected to further analyses using polymerase chain reaction(PCR) technology. As the initial detection is based uponmicroscopy (and therefore quite dependent upon the technicianconducting the inspection), little is known about the minimumdetection level for this inspection procedure.

Mainly due to growing public concern about contaminantsand defects in food and feed production, reflection-basedtechnologies are being used to develop machine vision systemsfor detection of defects and contaminants in a wide range offood products, including meat,11,12 fruits and vegetables,13–18

grain and flour,19–22 and animal feed.23–25 Pierna et al.24

collected reflectance data in the 900 to 1700 nm wavelengthrange (spectral bands in 10 nm increments) from animal feedparticles and bonemeal fragments, and validation was basedupon placement of individual feed particles in a crosssurrounded by vegetal feed particles. The clear advantage ofthis experimental arrangement of feed particles is that theactual position of bonemeal particles and their number perimage cube were known. However, this simplified arrangementdoes not take into account the potential error associated withpartially overlapping particles and residue/dust from one feedmaterial being deposited on other particles, and the authors didnot clarify what type of bonemeal particles were used andwhether all the used bonemeal particles were the same tissue(whether it was bone, flesh, or any other type of animal tissue).Another concern is that bonemeal may not distribute uniformlywhen mixed with other feed materials, and that candramatically affect the minimum detection level. A veryimportant challenge associated with accurate and consistentdetection of contaminants in animal feed materials is that theyconstitute highly heterogeneous mixtures of particles in termsof colors, textures, shapes, and dimensions (Fig. 1). Detectionof ruminant-derived bonemeal refers to hair, flesh, blood, bone,and grease. To what extent can these different tissues be

Received 8 December 2009; accepted 1 April 2010.* Author to whom correspondence should be sent. E-mail: [email protected].

Volume 64, Number 6, 2010 APPLIED SPECTROSCOPY 6370003-7028/10/6406-0637$2.00/0

� 2010 Society for Applied Spectroscopy

Page 2: Machine Vision Detection of Bonemeal in Animal Feed Samples

distinguished from a wide range of plant-derived materials andbonemeal from other animals (i.e., fish and chicken)?

In this study, hyperspectral reflectance data in 150 hyper-spectral bands across the visible spectrum (418–892 nm) wereacquired from two commercial samples of ‘‘pure’’ (meaningthat they originated exclusively from ground cattle cadavers)ruminant-derived bonemeal and 12 other feed samples,including fish and chicken meal. These feed materials wereused to generate a training data set comprising 3.65 millionhyperspectral profiles. Discriminant functions were used toclassify individual hyperspectral profiles in the training data setas either background, bonemeal, or feed. A hierarchical lineardiscriminant analysis (LDA) approach was used in whichhyperspectral profiles classified as bonemeal in an initial LDAwere re-classified in a second LDA; this approach was repeated12 times to progressively increase the bonemeal detectionaccuracy. The accuracy of the hierarchical LDA approach wasvalidated using hyperspectral profiles acquired from indepen-dent feed materials that had been experimentally contaminatedwith known amounts of bonemeal (0–25% by weight). Therelationship between observed and predicted amounts ofbonemeal was examined in a multi-regression analysis.Although this study concerns detection of ruminant-derivedcontaminants in animal feed, we believe that many industries,including the food26 and pharmaceutical industries,27 facequality control challenges that are similar to the ones describedhere. Thus, the analytical approach presented here may beconsidered relevant to a wide range of commercial applica-tions.

EXPERIMENTAL

Feed Samples and Preprocessing. Official feed samples(each 0.5–1.0 kg), obtained during inspections by investigatorsof the Texas Feed and Fertilizer Control Service, wereevaluated by microscopy using the standard techniques

described above.10 All samples were found to be in complianceand tested negative for ruminant-derived contaminants (pro-hibited animal protein). Some of these feed samples were inpellet form, whereas others were ground materials. Typicalingredients in these samples included corn, soybean, cotton gintrash (including bracts, stems, leaves, and residual lint), alfalfa,and wheat, but the exact composition of the feed samples wasnot known. In addition, we obtained samples of ‘‘pure’’ fishmeal, chicken meal, and ruminant-derived bone meal (samplesfrom two different feed mills and years). Here, ‘‘pure’’ denotessamples of scale/hair/feather, blood, grease, skin, muscle, andbone from either fish, chicken, or cattle, and these sampleswere acquired from large commercial feed mills. In thefollowing, ‘‘bonemeal’’ encompasses all types of ruminant-derived tissues, and similarly ‘‘fish meal’’ and ‘‘chicken meal’’refer to ground tissues associated with these animals.

Particle Size Considerations. Rutlidge and Reedy28

emphasized the importance of a narrow range in particle sizein spectral analyses of granular objects, and they recommendedanalysis of particles with a size similar to the pixel size, asparticle size smaller than pixel size increases the frequency ofmixed pixels. Sifting and selection of only particles smallerthan pixel size reduces spectral noise attributed to variation inprojection angles, and it has been shown to increaseclassification accuracy of hyperspectral profiles acquired fromground maize kernels.29 However, focusing on small particlesrequires considerable handling time, grinding, and sifting thatmay not be practical for large sample sizes. Also, compara-tively hard particles, such as bone fragments, may not beground as easily as softer materials, so extensive grinding andsubsequent sifting may potentially skew sample composition.Finally, a mixture of small particles is difficult to place in a thinuniform layer only a few particles thick. This is potentially aproblem in mixtures of powders23 or in this case feed materials,when bone fragments have a higher density than the majorityof the remaining particles, as such comparatively heavier

FIG. 1. Examples of feed materials analyzed in this study, including ruminant-derived bonemeal (in black box). The following feed materials were experimentallycontaminated (0–25% by weight) and used for independent validation: S101124, S108178, S110162, and S112153.

638 Volume 64, Number 6, 2010

Page 3: Machine Vision Detection of Bonemeal in Animal Feed Samples

particles may ‘‘sink to the bottom’’ and become covered bylighter particles (denoted ‘‘settling effect’’).

With these practical considerations in mind, a standardhousehold coffee grinder was used to process all feed materials(thoroughly cleaned between processing of each feed sample),and we only included particles with a diameter of 0.86 to 1.91mm (standard sieves numbers 10 and 20). Consequently, it waspossible to process feed samples within a few minutes, placematerial from each sample in a thin layer, and minimize the riskof settling effect. The experimental settings used in this studyallowed us to collect hyperspectral profiles at a resolution of42.4 pixels per mm2, so, on average, about 80 hyperspectralprofiles were collected from each feed fragment.

Hyperspectral Imaging. A hyperspectral push-broomcamera (PIKA II, www.resonon.com) was mounted on analuminum tower-structure 50 cm above a 15-cm diameter Petridish holding feed materials. The main specifications of thehyperspectral camera are as follows: the objective lens had 35mm focal length optimized for the visible and near-infrared(NIR) spectra; wavelength range 405 to 907 nm; interface:Firewire (IEEE 1394b); output: digital (12 bit), 160 bands(spectral) by 640 pixels (spatial); angular field of view: 78; andspectral resolution: 3.1 nm. All hyperspectral images werecollected with artificial lighting from 15 W, 12 V light bulbsmounted in two angled rows, one on either side of the lens,with three bulbs in each row. A voltage stabilizer (Tripp-Lite,PR-7b, www.radioreference.com) powered the lighting. A lightgreen piece of paper was placed in the bottom of the Petri dishused to hold feed materials, so that hyperspectral profiles fromthe background were easily separated from feed materials. Apiece of white Teflon was used as a white reference and, foreach spectral band, reflectance profiles were converted intoproportion of the reflection from Teflon (denoted relativereflectance). All hyperspectral images were collected atambient temperature conditions. Thin layers and images wererecorded at 21–23 8C and 40–50% relative humidity.Radiometric repeatability, meaning the consistency of acquiredreflectance data, was confirmed by collecting data from fourcolor cards (blue, yellow, green, and red) on all data acquisitiondays before and after collecting reflectance data from feedmaterials. Based on average reflectance profiles from colorcards it was confirmed that relative reflectance data from mostof the 160 spectral bands varied ,1% among data acquisitiondays. However, we obtained some radiometric noise at bothends of the spectrum, so five spectral bands at each end of thespectrum were omitted. Consequently, input data comprisedhyperspectral profiles from 150 spectral bands between 419and 892 nm.

Data Acquisition and Training Data. Hyperspectralprofiles from image files were converted into .txt format andimported into PC-SAS 9.1 (SAS Institute, NC) for statisticalanalysis. In PC-SAS, classification of hyperspectral profilesfrom feed materials was based upon linear discriminantanalysis30 (PROC DISCRIM), in which independent variables(in this case spectral bands) are used to develop lineardiscriminant functions to separate classes. In LDA, reflectancevalues in selected spectral bands are multiplied with coeffi-cients in the linear discriminant functions and subsequentlysummed to generate a discriminant score for each discriminantfunction, and a given hyperspectral profile will be assigned tothe class with the highest discriminant score. Thus, an

important advantage of LDA is that all hyperspectral profilesare classified according to the defined classes.

Linear discriminant analysis has been used widely in theanalyses of hyperspectral data.31–35 Apart from being simpleand therefore requiring comparatively little computer process-ing power, LDA is not associated with probability assumptionsor requirements regarding input data distributions.35 Thisanalytical approach is highly suitable for classifications inwhich pixels are classified into a low number of well-definedclasses. We compiled a training data set consisting ofreflectance data from light green back ground, two bonemealsamples, and twelve non-contaminated feed samples with threereplicated hyperspectral imaging cubes of each feed materialand light green back ground, and nine replications from bothbonemeal samples (total of 57 hyperspectral images). Eachhyperspectral imaging cube consisted of 64 000 hyperspectralprofiles, and the complete training data set consisted of 3.65million hyperspectral profiles, of which 1.15 million were frombonemeal samples, 2.31 million from other feed materials, and0.19 million denoting light green background. Traininghyperspectral images were collected over four separate days.A classification variable, Class, was used to classify allhyperspectral profiles as either light green background (Class¼�1), bonemeal (Class ¼ 100), or feed material (Class ¼ 0).

The analytical approach used here is somewhat similar to adecision-tree approach,32,36 as we conducted twelve consecu-tive LDAs (each of them having specific discriminantfunctions), and the approach is illustrated in Fig. 2 with theinitial four LDAs (however, we conducted a total of twelveconsecutive LDAs in this analysis). The complete training dataset was subjected to an initial LDA (LDA1), which classifiedhyperspectral profiles as either background, feed, or bonemeal.Subsequently, a second LDA (LDA2) was used to classifyhyperspectral profiles that had been classified as bonemeal inLDA1 (hyperspectral profiles that had been classified as either

FIG. 2. Outline of analytical approach, in which the training data set wasanalyzed in a series of 12 linear discriminant analyses (LDAs). Hyperspectralprofiles classified as bonemeal in LDA1 were used as input data in LDA2,while hyperspectral profiles classified as either light green background or feedwere omitted. Hyperspectral profiles classified as bonemeal in LDA2 were usedas input data in LDA3, and this process was repeated 12 times to graduallyreduce the level of false positives.

APPLIED SPECTROSCOPY 639

Page 4: Machine Vision Detection of Bonemeal in Animal Feed Samples

background or feed in LDA1 were excluded). A third LDA(LDA3) was used to classify hyperspectral profiles that hadbeen classified as bonemeal in LDA2. This procedure wasrepeated twelve times and used to gradually ‘‘distill’’ thetraining data set and progressively improve the bonemealdetection accuracy. The tentative logic behind this analyticalapproach is that hyperspectral profiles are gradually eliminated,but those classified as either feed or background are eliminatedproportionally more than those classified as bonemeal, so thedetection accuracy gradually increases (the level of falsepositive is gradually reduced).

Validation Analysis. Validation feed materials represented awide variation in terms of color, feed composition, and particleshape (Fig. 1), and they were chosen to assess the level ofrobustness and sensitivity of our classification across differentfeed material backgrounds. We collected three replicatedimages from each of four independent feed materials that hadbeen experimentally contaminated with 0 (non-contaminated),0.5%, 1.0%, 2.5%, 5.0%, 12.5%, or 25% (by weight) bonemeal(four feed materials 3 seven contamination levels 3 threereplications ¼ 84 validation images). Most of these contami-nation levels are considerably higher than would be consideredacceptable as minimum detection level in most commercialapplications and regulatory inspections, but the main purposeof this study was to assess the general concept of detectingbonemeal fragments in complex feed mixtures. Contaminationof feed materials consisted of adding bonemeal to 20 g samplesof feed material and thoroughly shaking each sample for 5 minin a 1 L plastic container. Validation hyperspectral images werecollected on three different days (not the same days trainingdata had been collected). The sequential LDA approach wasapplied to feed materials that had been experimentallycontaminated with bonemeal. Each of the 84 validationhyperspectral imaging cubes consisted of 64 000 hyperspectralprofiles. During the validation exercise, it was discovered thatnumbers of hyperspectral profiles classified as bonemeal ineach of the twelve LDAs varied considerably among validationfeed materials. In other words, bonemeal did not mix uniformlyacross feed materials and was therefore not detected with thesame consistency in different feed material mixtures. Conse-quently, we could not use the actual numbers of classifiedbonemeal hyperspectral profiles in the LDAs as reliableindicators of contamination level. Instead, we calculateddifferences in numbers of hyperspectral profiles classified asbonemeal between subsequent LDAs and used those differ-ences as explanatory variables in a linear multi-regression(PROC REG with option selection ¼ forward) fit to theexperimentally controlled contamination level (0–25% byweight). As an example, if 56 000, 50 000, 40 000, and20 000 hyperspectral profiles were classified as bonemeal inLDA1, LDA2, LDA3, and LDA4, respectively, then theexplanatory variables (Diff1, Diff2, and Diff3) would be: 6000,10 000, and 20 000. Thus, for each validation, we calculated 11(Diff1–11) explanatory variables.

RESULTS AND DISCUSSION

There are several key features associated with feedinspection procedures supporting and justifying the develop-ment of a machine vision based quality control system: (1)samples for inspection are transported/mailed to a laboratory,so inspection is not real time and very rigorous packaginglabeling procedures are needed to ensure that a given sample

can be tracked/referenced and that it is not damaged andpotentially contaminated during transport; (2) specially trainedtechnicians are needed to undertake the inspection, whichinvolves substantial costs and restricts how many feed samplescan be inspected within a given time period. The practicalconsequences are (1) considerable costs associated withinspection, packaging, labeling, and transport, and (2) thatfeed mills and feed lots have to wait seven days or more beforeinspection results become available, and by then the inspectedfeed material may already be distributed and/or consumed byanimals. In addition, a reflection-based system may also beused to examine additional qualitative traits of feed materials,such as digestibility,37,38 protein content,38 or melaminecontamination.39

Evaluation of Discriminant Functions. Major challengesregarding detection of contaminants in complex and diversematrices, such as animal feed (Fig. 1), are the combination of(1) diversity of source materials and (2) the heterogeneity ofprojection angles, shapes, and dimensions of feed particles. Inaddition, bonemeal is itself a highly complex material, as it iscomposed of tissues that differ dramatically in biochemicalcomposition, texture, and fragment shapes. Due to theheterogeneity of both feed materials and bonemeal, it wasexpected that a certain portion of hyperspectral profiles frombonemeal would be indistinguishable from those of other feedmaterials. Initially, we examined to what extent bonemealclasses, derived from either supervised or unsupervisedclassifications, could provide accurate classification, but theseattempts provided poor and inconsistent detections of bone-meal. Thus, we decided to use a hierarchical LDA approach, inwhich the main goal was to increase the detection accuracy ofhyperspectral profiles that had been classified as bonemeal.

In the initial LDA, 1.02 million hyperspectral profiles frombonemeal were correctly classified (69%), and remainingprofiles were classified as either background or other feedmaterials (Fig. 3a). However, the same analysis also revealedhigh levels of false positives (classified as bonemeal): 272(out of 0.19 million) hyperspectral profiles from pure lightgreen background, 0.15 million (out of 0.19 million) hyper-spectral profiles from chicken meal, 0.07 million (out of 0.19million) hyperspectral profiles from fish meal, and 0.23million (out of 1.92 million) hyperspectral profiles from otherfeed materials. All hyperspectral profiles classified asbonemeal in the first LDA (1.47 million) were subjected toa second LDA, in which 635 493 hyperspectral profiles frombonemeal were classified correctly (84%). False positives inthe second LDA were 42 hyperspectral profiles from lightgreen background, 25 002 hyperspectral profiles from chickenmeal, 4365 from fish meal, and 92 897 from other feedmaterials. This approach was repeated twelve times, and therewas a proportional increase in correctly classified hyper-spectral profiles from bonemeal, and bonemeal detectionaccuracy exceeded 95% after six iterations. The hierarchicalLDA approach also showed (Fig. 3a) that (1) after twoiterations, light green background was eliminated, (2) chickenmeal had a high level of false positives in the first iteration butwas below 0.5% after six iterations, and (3) fish meal wasvirtually eliminated after five iterations. As a consequence ofthe proposed approach, the complete training data setcomprising 3.65 million hyperspectral profiles was graduallyreduced to about 25 000 hyperspectral profiles (99.3%reduction) after twelve LDAs (Fig. 3b).

640 Volume 64, Number 6, 2010

Page 5: Machine Vision Detection of Bonemeal in Animal Feed Samples

Validation. Discriminant functions from each of the twelveconsecutive LDAs were saved and used for independentvalidation with four feed materials that had been experimen-tally contaminated at seven levels and with three replicatedimages of each combination of feed material and contaminationlevel (Table I). The bottom row in Table I shows that thehighest correlation between number of detected hyperspectralprofiles and experimental contamination level was obtained atthe fifth LDA (LDA5) (correlation coefficient¼ 0.67) (Fig. 4a)(df¼ 1,83, adjusted R2 value¼ 0.404, F-value¼ 57.31, P-value, 0.001). However, as underscored by the following examples,it was quite clear that regression slopes varied considerableamong feed materials. Regarding feed material S101124, nocontamination (%) yielded an average of 1.6 hyperspectralprofiles classified as bonemeal, while 25% contamination ofthat feed yielded an average of 1110.3 hyperspectral profilesclassified as bonemeal. Regarding feed material S108178, nocontamination (%) yielded an average of 31.7 hyperspectral

profiles classified as bonemeal, while 25% contaminationyielded an average of 175.7 hyperspectral profiles classified asbonemeal. In other words, 25% contamination caused a 1000-fold increase in detected hyperspectral profiles in S101124 butonly a five-fold increase in S108178. Such difference indetection response among feed materials suggested that wecould not rely on the absolute number of detected hyperspectralprofiles as an accurate indicator of the actual contaminationlevel.

Another important observation was that in the training dataset, the average number of hyperspectral profiles classified asbonemeal after twelve LDAs was 1165, which suggested that a25% contamination in validation samples should yield around291 hyperspectral profiles (1165/4 ¼ 291). In feed materialS101124, 25% contamination yielded, on average, 507 hyper-spectral profiles, while 15–96 were classified as bonemeal inthe other three validation feed materials. One possibleexplanation for this discrepancy and variability among feed

FIG. 3. (a) Relative proportions of different feed materials among the hyperspectral profiles classified as bonemeal in 12 consecutive linear discriminant analyses(LDAs). It is seen that the classification accuracy increases from about 67% in LDA1 to .99.9% in LDA12. (b) Gradual decrease in number of hyperspectral profilesclassified in 12 consecutive LDAs. Initially (LDA1), 3.65 million hyperspectral profiles were classified, while around 25 000 hyperspectral profiles were classified inLDA12.

APPLIED SPECTROSCOPY 641

Page 6: Machine Vision Detection of Bonemeal in Animal Feed Samples

materials is that bonemeal may not mix uniformly with otherfeed materials, and bonemeal particles have different densitythan other feed materials and therefore sink or float in mixtures.It should be emphasized that we attempted to place feedmaterials in as thin a layer as possible, but still, it is certainlypossible that bonemeal particles were partially covered bylighter feed fragments, floating on top of more dense materials,or were partially covered by dust from feed materials. Also,bonemeal particles may be slightly greasy, which increases thechance of light feed dust particles adhering to bonemeal andtherefore reducing the detection accuracy.

In conclusion, it appears that a number of important practicalfactors may hamper the use of absolute numbers of detectedhyperspectral profiles as an accurate indicator of the actualcontamination level. Instead of using the absolute numbers ofdetected hyperspectral profiles, we calculated differencesbetween consecutive LDAs (i.e., subtracting detected bonemealhyperspectral profiles in LDA2 from those detected in LDA1).As an example (Table I), an average of 56 136 hyperspectralprofiles from non-contaminated S101124 were identified asbonemeal in the first LDA (LDA1), while 56 073 hyperspectralprofiles were identified as bonemeal in LDA2. The differences

TABLE I. Number of hyperspectral profiles (pixels) classified as bonemeal in experimentally contaminated (0–25% by weight) validation feed materialsduring twelve consecutive linear discriminant analyses (LDAs).

Sequence of linear discriminant analyses (LDAs)

Feed Cont. 1 2 3 4 5 6 7 8 9 10 11 12

S101124 0.0 56136 56073 37 36 15 3 2 1 0 0 0 00.5 58362 58294 88 86 48 6 4 4 4 4 4 31.0 58778 58711 85 83 34 9 7 7 5 5 5 42.5 55264 55177 54 50 20 10 8 6 4 3 3 25.0 55490 55338 159 147 103 45 33 29 22 20 19 19

12.5 60779 60382 543 503 380 173 117 107 72 64 60 5625.0 57514 55530 3936 3510 2719 1744 1110 954 672 548 507 489

S108178 0.0 13943 3265 871 222 157 54 32 4 3 1 1 00.5 15200 3978 922 268 205 62 31 7 5 2 2 21.0 13815 2944 942 238 160 50 30 7 6 2 1 12.5 16131 4615 1060 335 257 84 45 10 8 5 3 25.0 14455 3088 1037 291 205 69 40 14 11 8 4 4

12.5 15754 3169 1215 371 297 127 76 27 19 13 7 725.0 18883 3135 1838 648 470 241 176 77 64 51 24 23

S110162 0.0 1762 1090 120 102 66 34 13 12 4 3 2 10.5 1722 1096 128 111 71 32 15 14 4 4 3 31.0 3161 2154 332 308 167 61 25 22 6 5 4 32.5 2839 2039 172 154 114 55 26 21 4 3 3 35.0 3510 2602 227 206 148 65 31 28 7 7 6 4

12.5 5611 3957 530 502 429 187 107 101 33 31 21 1925.0 10581 6635 2098 1813 1697 672 436 407 151 149 96 89

S112153 0.0 38661 7763 4919 2266 512 423 65 28 22 16 11 100.5 39473 6431 5044 2118 312 264 51 18 14 9 5 51.0 39067 22570 5706 4213 1824 1564 231 140 108 77 54 532.5 38844 21945 5900 4332 1840 1581 246 145 112 82 58 575.0 38621 21319 6094 4452 1856 1598 262 149 116 87 61 60

12.5 40050 22430 6817 4863 2041 1771 329 205 161 112 84 8225.0 42811 22593 8609 5988 2745 2351 555 357 268 180 135 133

FIG. 4. (a) Correlation between experimental contamination level (0–25% by weight) in four feed materials (see Fig. 1) and absolute numbers of hyperspectralprofiles classified as bonemeal in the fifth linear discriminant analysis (LDA 5, see Table I). (b) We used differences of detected bonemeal hyperspectral profileLDAs (i.e., LDA1� LDA2, LDA2� LDA3, etc.) as explanatory variables in a multi-regression analysis of experimental contamination of validation samples.

642 Volume 64, Number 6, 2010

Page 7: Machine Vision Detection of Bonemeal in Animal Feed Samples

between consecutive LDAs (in this case, 56136� 56073¼ 63)

were used as independent variables in a forward stepwise

regression analysis of experimental contamination level. Using

this approach, we obtained a highly significant regression fit (df

¼ 7,83, adjusted R2 value¼ 0.855, F-value¼ 71.02, P-value ,

0.001) (Fig. 4b).

CONCLUSION

In hyperspectral-based analyses of feed samples a major

challenge is considerable heterogeneity of animal feed products

in terms of overall composition, particle size (both average and

variance), density, and texture. These challenges become of

particular importance when the objective is to use this

technology for detection of low-level contaminants in large-

scale quality control systems. Classification accuracy is further

complicated when the contaminant (in this case bonemeal) isalso highly diverse in terms of texture and biochemical

composition. However, we demonstrated that reflectance in

the 418 to 892 nm range can provide detection accuracy around

the minimum contamination level of 1% (by weight). It is

important to remember that the density of bonemeal was higher

than most other feed materials, so in most feed materials it

actually represents a fairly low level of contamination in terms

of weight (Fig. 5). Our study was based on data acquisition at a

fairly high spatial resolution (on average, 80 hyperspectral

profiles per feed particle), and the advantage of acquiring

hyperspectral data at a high spatial resolution is that the

occurrence of mixed pixels is reduced, which provides more

consistent hyperspectral profiles and therefore increases the

likelihood of accurate classification.

1. K. Grob, M. Vass, M. Biedermann, and H. P. Neukom, Food Add. Cont.18, 1 (2001).

2. K. Pabst, W. Mathar, R. Palavinskas, H. Meisel, A. B. Thgen, and H.Klafkke, Food Add. Cont. 22, 210 (2005).

3. E. D. Caldas and A. C. S. Silva, J. Agric. Food Chem. 55, 7974 (2007).4. W. R. Leeman, K. J. Van den berg, and G. F. Houben, Food Add. Cont. 24,

1 (2007).5. V. Decruyenaere, Ph. Lecomte, C. Demarquilly, J. Aufrere, P. Dardenne,

D. Stilmant, and A. Buldgen, Anim. Feed Sci. Technol. 148, 138 (2009).6. C. M. Kahn, The Merck Veterinary Manual (Merck & Co., Inc,

Whitehouse Station, NJ, 2005), 9th ed.7. CDC, available from http://www.cdc.gov/ncidod/dvrd/bse/news/

alabama_cow_031506.htm (accessed March 18, 2010).8. Anonymous, Off. J. Eur. Commun. L306, 32 (2000).9. Anonymous, Off. J. Eur. Commun. L273, 1 (2002).

10. FDA, h t t p : / / w w w . f d a . g o v / d o w n l o a d s / A n i m a l V e t e r i n a r y /GuidanceComplianceEnforcement/ComplianceEnforcement/ucm113437.pdf (accessed March 18, 2010).

11. S. G. Kong, Y. Chen, I. Kim, and M. S. Kim, Appl. Opt. 43, 824 (2004).12. J. Qiao, M. O. Ngadi, N. Wang, C. Gariepy, and S. O. Prasher, J. Food

Eng. 83, 10 (2007).13. T. Baye and H. C. Becker, J. Am. Oil Chem. Soc. 81, 641 (2004).14. P. M. Mehl, Y. Chen, M. S. Kim, and D. E. Chan, J. Food Eng. 61, 67

(2004).15. A. M. Lefcout and M. S. Kim, Comp. Elec. Agricult. 50, 135 (2006).16. Y. Peng and R. Lub, Postharvest Bio. Technol. 48, 52 (2008).17. D. Wang, F. E. Dowell, and D. S. Chung, Cereal Chem. 78, 625 (2001).18. B. M. Nicolai, K. Beullens, E. Bobelyn, A. Peirs, W. Saeys, K. I. Theron,

and J. Lammertyn, Postharvest Biol. Technol. 46, 99 (2007).19. S. R. Delwiche, Y. Chen, and W. R. Hruschka, Cereal Chem. 72, 243

(1995).20. S. R. Delwiche and W. R. Hruschka, Cereal Chem. 77, 86 (1999).21. J. P. Mendoza, J. E. Throne, F. E Dowell, and J. E. Baker, J. Stored Prod.

Res. 39, 305 (2003).22. O. E. El-Sabai, R. Sanderson, M. P. Bleiweiss, and N. Schmidt, J.

Entomol. Sci. 41, 155 (2006).23. V. Baeten, A. Michotte-Renier, G. Sinnaeve, and P. Dardenne, Proceed.

Sixth Food Authenticity and Safety Inter. Symp. (FASIS) (Nantes, France,2001), pp. 1–11.

24. J. A. F. Pierna, V. Baeten, A. M. Renier, R. A. Cogdill, and P. Dardenne, J.Chemom. 18, 341 (2004).

25. Y. Liu, K. Chao, M. S. Kim, D. Tuschel, O. Olkhovyk, and R. J. Priore,Appl. Spectrosc. 63, 477 (2009).

26. A. A. Gowen, C. P. O’Donnell, P. J. Cullen, G. Downey, and J. M. Frias,Trends Food Sci. Technol. 18, 590 (2007).

27. O. Kolomiets, U. Hoffmann, P. Geladi, and H. W. Siesler, Appl. Spectrosc.62, 1200 (2008).

28. H. T. Rutlidge and B. J. Reedy, Appl. Spectrosc. 63, 172 (2009).29. C. Nansen, M. Kolomiets, and X. Gao, J. Agric. Food Chem. 56, 2933

(2008).30. R. A. Fisher, Annals Eugenics 7, 179 (1936).31. T. Borregaard, H. Nielsen, L. Norgaard, and H. Have, J. Agricult. Eng.

Res. 75, 389 (2000).32. R. Lawrence, Western J. Appl. For. 18, 202 (2003).33. A. A. Mignani, L. Ciaccheri, A. Cimato, C. Attilio, and P. R. Smith, Sens.

Actuators, B 111/112, 363 (2005).34. P. B. Garcia-Allende, O. M. Conde, J. Mirapeix, A. Cobo, and J. M.

Lopez-Higuera, Sens. Actuators, B 129, 977 (2008).35. H. Okamoto and W. S. Lee, Comp. Electron. Agric. 66, 201 (2009).36. M. A. Friedl and C. E. Brodley, Remote Sens. Environ. 61, 399 (1997).37. S. Landau, T. Glasser, and L. Dvash, Small Rum. Res. 61, 1 (2006).38. U. L. Diener, R. J. Cole, T. H. Sanders, G. A. Payne, L. S. Lee, and M. A.

Klich, Ann. Rev. Phytopathol. 25, 249 (1987).39. M. K. van der Lee, G. van der Weg, W. A. Traag, and H. G. J. Mol, J.

Chroma. 1186, 325 (2008).

FIG. 5. Illustration of 1% contamination of a feed sample.

APPLIED SPECTROSCOPY 643