[ieee 2009 canadian conference on computer and robot vision (crv) - kelowna, british columbia,...

8
Vision Based Metal Spectral Analysis using Multi-label Classification * Eranga Ukwatta Jagath Samarabandu [email protected] [email protected] Department of Electrical and Computer Engineering The University of Western Ontario, London, ON, Canada, N6A 3K7 Abstract Industrial equipments that employ element identification tend to be expensive as they utilize built-in spectroscopes and computers for post processing. In this paper we present an in situ fully automatic method for detecting constituent ele- ments in a sample specimen using computer vision and ma- chine learning techniques on Laser Induced Breakdown Spec- troscopy (LIBS) spectra. This enables the development of a compact and portable spectrometer on a high resolution video camera. In the traditional classification problem, classes are mu- tually exclusive by definition. However, in spectral analysis a spectrum could contain emissions from multiple elements such that the disjointness of the labels is no longer valid. We cast the metal detection problem as a multi-label classification and enable detection of elemental composition of the speci- men. Here, we apply both Support Vector Machine (SVM) and Artificial Neural Networks (ANN) to multiple metal classifi- cation and compare the performance with a simple template matching technique. Both machine learning approaches yield correct identification of metals to an accuracy of 99%. Our method is useful in instances where accurate elemental anal- ysis is not required but rather a qualitative analysis. Experi- ments on the simulation data show that our method is suitable for LIBS metal detection. Keywords: Spectroscopy, multi-label classification, SVM, pattern recog- nition 1. Introduction Laser-induced Breakdown Spectroscopy (LIBS) is a method of atomic emission spectroscopy [7] that uses a high- power focused laser pulse to excite microscopic amounts of solid, liquid or gaseous material and to collect and spec- trally analyze the plasma. The spectral composition of the * This work was supported by the Ontario Research of Excellence. light emitted by the plasma depends on the constituent atomic species of the ablated material. The analysis can range from a simple identification of elements in a sample to a more de- tailed determination of absolute masses or relative concentra- tions. This technique offers fast and real-time analysis with no sample preparation thus giving rise to numerous applications in industry such as chemical and biological hazards analysis, radioactive contamination analysis, blood and tissue analysis, space exploration and aerosol analysis [12, 18]. In particular, we develop a spectrum analyzer for detecting contaminants in machine lubricants although it can easily be generalized to any type of LIBS measurements requiring qualitative anal- ysis. Typically spectrometers used in the industry require a computer for spectral analysis, thus making them difficult to use on site. With the availability of low cost higher resolution cameras and powerful embedded processors, there is a signif- icant opportunity for image processing algorithms that can be embedded on the sensor itself. We transform the classical one-dimensional frequency spectral analysis of metals into two-dimensional space using a CCD/CMOS sensor and a diffraction grating array setup. Resulting images contain intensity peaks (blobs) which cor- respond to the spectral peaks of a plasma emission. Figure 1 shows the frequency spectrum and the LIBS image obtained by exposing the grating-camera setup to an ultraviolet broad- band source and a Neon calibration lamp respectively. The intensities of the blobs are dependent upon the the amount of material excited. When the amount is less only prominent spectral peaks would be observable. Therefore it is apparent that for qualitative analysis, we need to look only for the per- sistent lines of that element. we propose to implement and test an algorithm for process- ing these LIBS images in real-time in a highly resource con- strained environments. Therefore the computational resources necessary and the computational complexity of different algo- rithms are of considerable practical importance. Extracting regions of interests from the image sensor itself, where blobs are highly likely to appear in an LIBS image is one such task in reducing the computational power. However, imperfections arise in the procedure and the need to detect more than one el- 2009 Canadian Conference on Computer and Robot Vision 978-0-7695-3651-4/09 $25.00 © 2009 IEEE DOI 10.1109/CRV.2009.42 132

Upload: jagath

Post on 09-Feb-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Vision Based Metal Spectral Analysis using Multi-labelClassification ∗

Eranga Ukwatta Jagath [email protected] [email protected]

Department of Electrical and Computer EngineeringThe University of Western Ontario, London, ON, Canada, N6A 3K7

Abstract

Industrial equipments that employ element identificationtend to be expensive as they utilize built-in spectroscopes andcomputers for post processing. In this paper we present anin situ fully automatic method for detecting constituent ele-ments in a sample specimen using computer vision and ma-chine learning techniques on Laser Induced Breakdown Spec-troscopy (LIBS) spectra. This enables the development of acompact and portable spectrometer on a high resolution videocamera.

In the traditional classification problem, classes are mu-tually exclusive by definition. However, in spectral analysisa spectrum could contain emissions from multiple elementssuch that the disjointness of the labels is no longer valid. Wecast the metal detection problem as a multi-label classificationand enable detection of elemental composition of the speci-men. Here, we apply both Support Vector Machine (SVM) andArtificial Neural Networks (ANN) to multiple metal classifi-cation and compare the performance with a simple templatematching technique. Both machine learning approaches yieldcorrect identification of metals to an accuracy of 99%. Ourmethod is useful in instances where accurate elemental anal-ysis is not required but rather a qualitative analysis. Experi-ments on the simulation data show that our method is suitablefor LIBS metal detection.Keywords:Spectroscopy, multi-label classification, SVM, pattern recog-nition

1. Introduction

Laser-induced Breakdown Spectroscopy (LIBS) is amethod of atomic emission spectroscopy [7] that uses a high-power focused laser pulse to excite microscopic amounts ofsolid, liquid or gaseous material and to collect and spec-trally analyze the plasma. The spectral composition of the

∗This work was supported by the Ontario Research of Excellence.

light emitted by the plasma depends on the constituent atomicspecies of the ablated material. The analysis can range froma simple identification of elements in a sample to a more de-tailed determination of absolute masses or relative concentra-tions. This technique offers fast and real-time analysis with nosample preparation thus giving rise to numerous applicationsin industry such as chemical and biological hazards analysis,radioactive contamination analysis, blood and tissue analysis,space exploration and aerosol analysis [12, 18]. In particular,we develop a spectrum analyzer for detecting contaminantsin machine lubricants although it can easily be generalizedto any type of LIBS measurements requiring qualitative anal-ysis. Typically spectrometers used in the industry require acomputer for spectral analysis, thus making them difficult touse on site. With the availability of low cost higher resolutioncameras and powerful embedded processors, there is a signif-icant opportunity for image processing algorithms that can beembedded on the sensor itself.

We transform the classical one-dimensional frequencyspectral analysis of metals into two-dimensional space usinga CCD/CMOS sensor and a diffraction grating array setup.Resulting images contain intensity peaks (blobs) which cor-respond to the spectral peaks of a plasma emission. Figure 1shows the frequency spectrum and the LIBS image obtainedby exposing the grating-camera setup to an ultraviolet broad-band source and a Neon calibration lamp respectively. Theintensities of the blobs are dependent upon the the amountof material excited. When the amount is less only prominentspectral peaks would be observable. Therefore it is apparentthat for qualitative analysis, we need to look only for the per-sistent lines of that element.

we propose to implement and test an algorithm for process-ing these LIBS images in real-time in a highly resource con-strained environments. Therefore the computational resourcesnecessary and the computational complexity of different algo-rithms are of considerable practical importance. Extractingregions of interests from the image sensor itself, where blobsare highly likely to appear in an LIBS image is one such taskin reducing the computational power. However, imperfectionsarise in the procedure and the need to detect more than one el-

2009 Canadian Conference on Computer and Robot Vision

978-0-7695-3651-4/09 $25.00 © 2009 IEEE

DOI 10.1109/CRV.2009.42

132

(a) emission signal for UV (b) blob pattern for UV

(c) emission signal for Neon (d) blob pattern for Neon

Figure 1: Spectra of calibrated light sources (UV and Neon).The LIBS spectrum for UV broadband source and Neonsource captured using our experimental setup. Note how theone-dimensional signal is transformed to an image containingintensity peaks corresponding to persistent lines in the emis-sion spectra.

ement in a given blob pattern requires a fairly advanced tech-nique for analyzing patterns. Here multi-label classificationapproach shows promising results which address the problemof detecting multiple elements and adapting to the dynamicenvironment.

Here, the main contribution of our work is a real-time fullyautomatic detection of elements in a sample specimen from apredefined set of elements using a commercial camera. Theother contributions of this paper include multi-label classifi-cation approach for metal detection and techniques for imple-menting sufficiently capable pattern recognition algorithms inhighly resource constrained environments.

The rest of the paper is organized as follows. We will beginsection 2 with an overview of the existing literature. In sec-tion 3 we discuss the multi-label classification method used toclassify elements in an oil specimen. We present our approachof using a commercial camera for metal spectroscopy and ex-perimental setup used in section 4. In this setup, the gratingplane and the image plane may not be parallel so that properalignment is necessary. This is obtained using a registrationusing homographies. In section 5, we show that using a sim-ulation setup such as ours, detection results to an accuracy of99% could be obtained.

2. Related work

The existing body of literature in the area of LIBS focuseson both algorithmic improvements for the detection processand hardware related improvements. Here we concentrate on

algorithmic improvements on the detection process thus en-abling the use of simple hardware and a general-purpose videocamera. An unknown sample can be identified by correlat-ing its spectrum with a library of spectra. Lentjes et al. [13]present such a single- and multiple-shot analysis technique.They correlate multiple single-shot spectra with each refer-ence spectrum to obtain a histogram of correlation values. Ifthese distributions of correlation have no overlap across differ-ent reference spectra, they can declare a detection. Using thisfact, these distributions can be approximated by a gamma dis-tribution which allows discrimination between two materialswith a certain probability. Gornushkin et al. [9] use both lin-ear and rank correlation methods to identify samples with sim-ilar chemical composition. The correlation plot correspondingto the highest correlation probability is taken as the matchinglibrary spectra. A lesser distinctive technique than correlationanalysis is peak detection. For example, Barbini et al. [2] usepeak detection for soil analysis. Ferrero et al. [1] proposean alternative approach based on the algebraic determinationof unknown spectrum coordinates with respect to a spectrallibrary base.

Samek et al. [19] use Principle Component Analysis andMahalanobis distance measures in a discriminant analysis tocompare and match spectra of unknown samples to a libraryspectra of calibration samples. The spectrum of the unknownis compared against multiple discriminant models. An indica-tion of the likelihood of the spectrum matching one of thesegroups is then made, and the material is therefore classified asthe closest match, or no match at all.

We applied a correlation-based pattern-matching techniquein the vision-based spectroscopy simulation work [21] to findthe signatures of known elements. If the experimental setuphas minimal imperfection, this simple memory-based methodwould be suitable. However, this method fails practically dueto presence of multiple metals, impurities, unknown emis-sions, missing blobs, high CCD noise, changes in illumina-tion, camera tremor and variations in the point-spread func-tion. We observed that due to numerous imperfections inthe simulation set up, the threshold used to compare the av-erage similarity score and declare a match, requires adjust-ment whenever the experimental set up is slightly changed(e.g. camera positioning and alignment). Moreover, the previ-ous pattern-matching technique [21] heavily relies on the user-defined threshold when declaring a match. Since we utilize anapproach that is highly error-prone, more advanced techniquesare required for analyzing blob patterns.

The multi-label classification method [20] is increasinglybeing used such as in text classification, semantic scene clas-sification, music categorization and protein function classifi-cation where a sample may belong to more than one class.For example Boutell et al. [15] use multi-label classificationon semantic scene classification where a photograph could be-long to more than one conceptual class, such as beaches andsunsets at the same time.

133

3. Multi-Label classification

Traditional single-label classification involves learningfrom a set of examples that are associated with a single la-bel l from a set of disjoint labels L = {l1, l2, ..., ln}, |L| > 1[15]. If |L| = 2, then the learning problem is deduced to abinary classification problem, while |L| > 2 is regarded asa multi-class classification problem. However in multi-labelclassification, each training sample x is associated with a sub-set Px ⊆ L of possible labels.Thus, in contrast to multi-classlearning, instances are not assumed to be mutually exclusivesuch that multiple labels may be associated with a single in-stance. A straightforward method to achieve our goal of cor-rectly classifying the metal signatures is to consider the signa-tures of elements corresponding to multiple elements as a newclass and build a model for it. However this method becomesimpractical since the number of classes increases exponen-tially with the number of metals to be analyzed.

The most common approach to multi-label classification isbinary relevance learning. This involves learning |L| binaryclassifier for each possible label, using all examples x withli ∈ Px as positive examples and all those with li 3 Px asnegative examples. For classifying a new instance, all binarypredictions are obtained and then the set of labels correspond-ing to positive relevance classification is associated with theinstance. This scenario is, for example, commonly used forevaluating algorithms on the scene classification [15] and [11].

Support vector machine (SVM) [4, 6] is the most widelyused technique in the multi-label classification [15, 11, 8] lit-erature. A significant advantage of the SVM approach is thatthe complexity of the resulting classifier is characterized bythe number of support vectors rather than the dimensional-ity of the transformed space. As a result, SVMs tend to beless prone to the issues of over-fitting than other methods. Inour approach, we decompose the problem into a set of binaryclassification problems and develop a classifier for each class(each metal) which considers each training sample as posi-tive to which it belongs and as negative to all others. In otherwords we apply one-vs-rest classification approach. To deter-mine labels of a test sample, the binary classifiers thus devel-oped are run individually on the test sample and every labelfor which the output of the classifier exceeds a predeterminedthreshold is selected as a label of the sample. We use LIBSVM[5] library for the SVM implementation. The main drawbackof this method is the requirement for a new binary classifierfor each newly introduced class.

We next apply an artificial neural network (ANN) [3] formetal spectroscopy multi-label classification task. We recog-nize that it seems natural to use a neural network with oneoutput node per class to deal with multi-label classification. Inother words more than one output of the ANN may be activewhere active nodes corresponding to active elements in thespecimen. In this case, only a single ANN classifier is used asopposed to the SVM multi-label classification method. Train-ing process for ANN is also quite straight forward like in aclassical classification problem where a rearrangement of the

Table 1: Training and testing data

This depicts the training and testing data used in ourexperiments. We use 6 metals Ag, Pb,Cu,Fe, Cr, Ni and the

combinations of Ag, pb, Cu and Cu.

Metal Training Testing Total

Ag 60 300 360

Pb 55 270 325

Cu 60 300 360

Fe 60 210 270

Cr 65 420 485

Ni 75 125 200

Ag+Pb 55 100 155

Pb+Cu 50 125 175

Ag+Cu 65 150 215

Ag+Pb+Cu 35 120 155

Total 580 2120 2700

training data is not required. A multi-layer perceptron withone hidden layer is considered initially. Our main considera-tions of selecting the most suitable classifier are the accuracyof the classification, the complexity and the computationaltime, as our method requires real-time performance.

3.1. Training the classifier

The training step in a machine learning task could be con-sidered as a calibration step in the metal spectroscopy imple-mentation where samples of known metals with known com-positions are propelled through an oil-pipe of which measure-ments are subsequently taken.

The machine learning approach for metal spectroscopyposes a problem that requires finding a distinctive feature vec-tor. Our task of finding a distinctive feature set is importantas it allows us to use a relatively simple classifier and alsosimplifies the work of the classifier itself. Note that the fea-tures should be insensitive to noise and to irrelevant transfor-mations. Our approach occupies a feature set which is basedon an average similarity score obtained by correlating a pat-tern template present in the NIST [17] database with each sig-nature to be classified. Note that we only need to considersignatures resulting from single elements. Since the expectedregions of the blobs are already known, we only search for thepeaks in those regions. This method saves significant amountof computational cost compared to running a peak detectionon the whole image frame to find the intensity peaks. Inour current experimental set up, we use 6 features each cor-responding to the metals (Ag, Cr, Cu, Fe ,Ni ,Pb). The experi-ment is run for several minute to obtain the training data. Thedisplayed patterns are then timestamped and are later labeled

134

manually. Once the system is trained, it could then be used inthe testing process to classify novel patterns.

Training a SVM consists of finding the optimal hyper-plane; that is, the one with the maximum distance from thenearest training patterns. We use the training data more thanonce when training the binary SVM classifiers consideringeach sample as a positive sample of each of the classes towhich it belongs and negative to which it does not belong.In our example, we consider the Ag and Cu data to belongto the ‘Ag’ class when training the ‘Ag’ model, and considerit to belong to the ‘Cu’ class when training the ‘Cu’ model.This requires rearrangement of the training data for each bi-nary SVM classifier.

We use the back-propagation learning technique to train thefeed forward ANN with the same training data set. Unlike theSVM approach the data set is fed as it is to the ANN withoutany rearrangement.

3.2. Pattern Matching

Assume that there are K patterns and each patternpk, k = 0, . . . ,K − 1 contains nk blobs (or points). Theseare read at the beginning of the algorithm. Similarity betweena blob, generated as described in section 4.1, and the corre-sponding image region is obtained by calculating the scalarproduct, and normalizing by the squared sum of the kernelg(s, t).

Algorithm 1 Pattern matching algorithm.

Ensure: image exists . image is a frame from video stream1: Detect markers.2: Calculate H.3: Extract the regions of interest4: for k ← 0,K − 1 patterns do5: for i← 0, nk points do6: Calculate similarity score between thresholded

image region and blob7: end for8: score← average similarity.9: end for

10: Form the feature vector11: Declared L binary classifier12: for j ← 0, |L| classes do13: Match the new instance against all14: end for15: Take the union and Print k of matched patterns

This algorithm computes a score which is related to the cor-relation value assuming an anisotropic Gaussian point spreadfunction. However, it is not exactly the correlation coefficientsince we do not use the usual normalization. This ensuresthat the low intensity blobs pertaining to insignificant spectralresponses have less influence on the score. Then the featurevector is formed after calculating the average similarity of theunknown pattern with the library patterns. The new instance is

Figure 2: Dispersion lines of the primary gratings.A monolithic, single-substrate, silicon grating is used in oursetup. Shortest wavelengths are on the left-side of the figure.Lines from top to bottom are for gratings 1, 2 and 3. Theheight of the spectral lines is 100 microns.

then compared against all the binary classifiers and the unionof result is taken as the set of matched patterns.

4. Experimental setup

Our experimental set up consists of a random pattern dis-play and a high resolution camera aiming at this display whichdoes the detection and further processing. We use ELPHEL353 model network camera which runs on a Linux kernel forour work. The camera is equipped with Aptina MT9P0015MPix CMOS sensor, Axis ETRAX FS processor and 64MBDDR SDRAM. Unlike other commercial cameras we have fullaccess to the camera internals and the camera firmware, thusletting us develop our own programming code to execute onit. We implement our algorithm in C language and cross com-piled using AXIS cross compiler for ETRAX FS processorarchitecture on ELPHEL 353.

Our method involves aligning the pattern display plane andthe image plane using homographies, extracting the regions ofinterests, obtaining the correlation scores by convolving withNational Institute of Standards and Technology(NIST) [17] li-brary of spectra and finally using multi-label classification toclassify each novel pattern. We now describe each of thesesteps in detail.

4.1. Random Pattern Display

We use spectra of metals silver (Ag), iron (Fe), lead (Pb),chromium (Cr), copper (Cu), and nickel (Ni) obtained fromNIST [17] database to simulate the pattern display. Simplestraight line equations are used to model the spectral lines ofthe grating array as shown in figure 2. The diffraction grat-ing array used in our experiment has a wavelength courageof 235 − 636.2nm as shown in table 2. Wider wavelengthcoverage increases the material spectrum. High resolutionenables the resolution of closely spaced spectral lines andavoid interferences. However in our approach we account

135

Table 2: Wavelength for the grating array

The minimum and maximum wavelength, and the resolutionof the grating array corresponding to each primary grating.

All the values are in nanometers (nm).

Minimum Maximum Range Resolution

235 355 120 1.06

313.4 473.4 160 1.42

421.1 636.2 215 1.91

for some spectral overlap to provide a more realistic simula-tion. The wavelength-spatial mapping and relative intensitiesof the metals from NIST database is then used to find the lo-cation of the blobs and their intensities and the spread. If twoblobs overlap, intensities for the pixels are aggregated and dis-played. In our experiments, the blobs pertaining to relativeintensity above 2500 are considered.

We also consider the effect of Point Spread Function (PSF)in our experiment. PSF is the space-invariant spatial responseof an imaging system to a point light source. Due to the natureof the PSF blobs in the pattern display are spreaded highlyalong the dispersion line and little along y axis. Moreoverthe resolution of the system is mainly influenced by the PSF.We model the spread of blobs using Gaussian estimation. Weused an anisotropic Gaussian function where the standard de-viations in the different dimensions are not equal.

A computer displays randomly selected patterns from apattern repository. Pattern repository is a small database con-taining the number of blobs in each pattern, the location ofthese blobs (x, y), their intensity I , and the spread. The loca-tion (x, y) ∈ [0, 1]× [0, 1] ⊂ R2, and the intensity I ∈ [0, 1].Note that intensities are normalized down to [0, 1]. The spreadσs, σt ∈ R+, and kernel widths ws, wt. Having defined theseparameters, we can generate the image display containingblobs by,

f(x, y) =ws∑

s=−ws

wt∑t=−wt

g(s, t)δ(x+ s, y + t) (1)

where

δ(x, y) =∑

k

Ikδk(x, y) (2)

g(s, t) = e−( s

2

2σ2s+ t2

2σ2t)k

(3)

where s ∈ [−ws, ws], t ∈ [−wt, wt], k iterates over allthe blobs in the selected set of patterns and Ik is the scaledintensity of blob k. In order to map the coordinates (x, y) toactual image pixels, they need to be scaled by the image heightand width respectively.

scene plane

image plane

camera

Figure 3: Necessity for plane alignment.The image plane and the scene plane (pattern display) are notparallel in general. A planar homography can be used to trans-form the misaligned to a canonical rectangle.

4.2. Registration using Homographies

In our simulation setup, the camera observes the displayedpatterns. For every video frame received, the image process-ing module finds the matching patterns from the pattern repos-itory. However, the observed image and the canonical pointlocations in the repository need to be registered first. Thisis necessary because the image plane and the pattern displayscreen may not in general be parallel. As a result there is per-spective distortion between the image pattern display screenand a canonical rectangle. This distortion can be modeled bya planar homography [10, 14].

Figure 3 shows the perspective effect and the markers pic-torially. Note that the image and scene planes are not parallelin general. The transformation between these two planes ishomographic. At least four correspondences are needed toestimate the aligning homography. So we use four markersm1,m2,m3 and m4 at each corner of the displayed imageto mark the boundaries x = 0, x = 1, y = 0 and y = 1.When these markers are detected in the image, we calculatethe homography between the markers and the canonical cor-ners c1, c2, c3 and c4. Figure 4 shows the images of the pat-tern display along with the four markers.

We show how the homographies are calculated followingthe formulation in Hartley and Zisserman [10]. In relationto images, a homography is a projective transform that takeseach point xi

1 on one image I to x′i on another I ′. In otherwords, if we consider a set of point correspondences xi ↔ x′ithe problem is to compute the 3× 3 matrix H such that

Hxi = x′i (4)

for each i [10]. This transform has 8 degrees of freedom.

1All points xi ∈ P2 are homogeneous, i.e. xi = [xi yi wi]T [16].

136

(a) Ag (b) Cr (c) Cu

(d) Fe (e) Ni (f) Pb

Figure 4: Images of the pattern displaysThis figure shows the computer screen that displays a syn-thetic pattern along with the four markers. These markers aredetected and homographies are computed for each frame re-ceived to correct the alignment. The number of intensity peakspresent in the patterns for each particular metal varies depend-ing on the cut-off wavelength.

Since a point correspondence provides 2 constraints, four suchcorrespondences are sufficient to compute H. The markersmi, i = 1, . . . 4 and corners ci, i = 1, . . . , 4 are the pointsused for this calculation. So we take x′i = mi and xi = ci.We also need to note that since Hxi and x′i are homogenouscoordinates, Hxi and x′i have the same direction but may dif-fer in magnitude.

We make use of the direct linear transformation (DLT) al-gorithm [10] to compute H. By writing equation 4 in terms ofa cross product as

x′i × Hxi = 0, (5)

Once this homography is calculated, the location of a pointin the pattern repository in the captured image can be accu-rately computed. Moreover, since we know the relative in-tensity and the spread of each blob, we can locally replicatethe blob similar to what is displayed. In other words, we canquery for the presence of each pattern in the repository, in thecaptured image.

4.3. Extracting regions of interest

We consider two methods in obtaining the regions of inter-est from the full frame image within the camera to meet theprocessing constraints of the embedded processor. This en-ables us to perform the image processing to a small area ofthe image frame thus saving significant processing time. Themost straight forward method is to treat blobs (intensity peaks)individually and extract them independently from each other.However, the diffraction grating arrays are designed in such away that blobs usually fall into a set of finite dispersion lines.We exploit this behavior to extract elongated stripes at oncealong each dispersion line. The average computational time

Table 3: Computational-time comparison for blob extraction

The two approaches of blob extraction is compared againstthe computation time. Extracting rectangular stripes

containing several blobs outperforms the extraction ofindividual blobs in terms of speed.

Method Region type Average time(micro-seconds)

Rectangular stripes400× 20 3722µs500× 20 4296µs

Individual blobs12 blobs , 20× 20 21883µs20 blobs , 20× 20 36109µs

spent by each of the methods for 50 such iterations is depictedin table 3. Note that by extracting the rectangular stripes theprocess can be sped up by about four times.

5. Results

We use Ag, Cu, Pb, Cr, Fe and Ni as metals and thecombined compounds of Ag+Pb, Ag+Cu, Pb+ Cu andAg+Cu+Pb as shown in table 1. We use similarity scoreswith Ag, Cu and Pb etc. as features. The main drawback ofthis method is the need for re-training when a new elementis introduced. We first normalize the data before the machinelearning techniques (ANN or SVM) are applied.

The experiment is carried out at a camera resolution of800× 600 and 22.3 frames per second, while the patterns aredisplayed randomly at every 3 seconds. The training data isobtained by running the system for a certain period of timeand then manually labeling the data. The training step can beconsidered as the calibration step for the spectrometer. Thecamera captures patterns that are displayed randomly and anaverage correlation score is obtained for each pattern. Thedata is then labeled according to the time-stamp of the detec-tor and display computer. We use six features based on simi-larity score as computed in algorithm 1 to build the classifiers.580 metal signature samples are used for training and 2120samples for testing. Further sub divisions of the training andtesting samples are listed in table 1.

We first apply SVM on the training and testing data. In theone-vs-rest approach, one classifier is trained for each classand each outputs a score for a test example. SVM classifiershave been shown to give better performance than other classi-fiers on similar problems. We use the Radial Basis Function(RBF) as the kernel and extend the SVM to multi-label clas-sification. The RBF kernel nonlinearly maps samples into ahigher dimensional space, so that it, unlike the linear kernel,may handle the case when the relation between class labelsand attributes is nonlinear.

In the SVM approach we employ six binary classifiers foreach metal class to be classified. When a binary classifier is

137

Table 4: Results of the experiments

The summary of the performance data by SVM and ANN onthe simulated testing data data. Both methods show

promising results on the testing data.

Metal Correlation method Accuracy Accuracy

TP rate FP rate (SVM) (ANN)

Ag 89.21 21.65 99.82 99.82Pb 83.45 14.58 99.94 99.94Cu 77.47 9.15 99.34 98.98Fe 91.63 7.65 99.78 99.47Cr 89.26 6.54 99.76 99.79Ni 86.92 8.21 99.84 99.47

trained for example for Ag class, 215 samples are consideredto be positive and the rest (365 samples) is considered as neg-ative samples.

We apply the ANN technique on the same data set. In theANN approach we use a single multi-layer perceptron com-prising of three output layer nodes each representing a metalclass. When multiple elements are present, more than oneoutput of the neural network is active. The training data couldalso be fed to the ANN at once without projection. This designhas an advantage of using only one classifier for a multi-labelapproach as opposed to six binary SVM classifiers in our case.The accuracy of the classification could be further improvedby increasing the number of hidden neurons; however, this re-sults in an increase in the complexity and computational time.

The experimental results are shown in table 4. We consideraccuracy as the ratio of correct classification (both true posi-tive and true negative) to total classifications. Both methodsshow promising results, where the decision on selecting oneparticular method is rather influenced by the computationalresources required by each of the methods. The false positiverate for both ANN and SVM are below 0.4% for all the met-als. Table 4 column 2 corresponds to the results obtained byusing a simple correlation based pattern matching technique[21] based on a threshold on the same testing data set. Thismethod is only able to obtain significantly low true positiverates while recording a high false positive rate.

6. Conclusion

We presented a computer vision based technique for real-time fully automatic identification of metallic compositions inoil samples using a compact spectroscope developed within acommercial video camera, thus eliminating the use of com-puters for further processing as in the case of industrial spec-troscopes. The key features of our work include: (1) transfor-mation of the classical one-dimensional frequency spectra ofmetals into two-dimensional space using a diffraction gratingarray mounted onto the camera CCD/CMOS, (2) alignment of

the planes using homographic transformation using markers,(3) use of multi-label classification approach to metal spec-troscopy which enables multi-element analysis and (4) apply-ing SVM and ANN to the metal detection problem and com-paring the accuracy of the techniques.

We tested both SVM and ANN on our multi-label metalsignature data set. SVM entails decomposing the problem intoa set of binary classification problems. However, in the ANNapproach it is sufficient to have only one multi-layer percep-tron with multiple output nodes equal to the number of metalsto be classified. When the specimen contains more than oneelement more than one output would go high. FurthermoreWe were able to obtain accuracy rates (above 99%) that arecomparable to the techniques used in the metal spectroscopyliterature. Our design seeks to maintain the fundamental ad-vantages of LIBS, while achieving a cost-effective configu-ration capable of accurate characterization of the elementalcomposition of materials.

Limitations of our system include insufficient frequency re-sponse and non-uniform quantum efficiency characteristic ofthe camera CCD that curtail some of the lines in the spectrumand high CCD noise compared to ICCDs in spectrographs.

7. Future work

In the proposed approach we only consider qualitativesingle-shot LIBS element detection. Our work could be ex-tended to quantitative analysis as well. Estimating materialquantity involves determining particles size based on relativestrength of spectral peaks as well as counting the frequencyoccurrence over a certain period of time. Future work lies indeveloping our techniques at the FPGA level so as to processeverything inside the camera and only present the detected ele-ments as outputs. This particularly adds more resource and en-gineering constraints to the problem since the computationaland memory resources are further prohibitive.

While we are developing this technology with a specificapplication in mind, the proposed technology has a muchbroader application in computer vision based sensors in a widevariety of domains including manufacturing, automation andsurveillance.

Acknowledgement

we would like to thank Mike Hall from Checkfluid Incfor helpful discussions. We would also like to thank An-drey N. Filippov and his Elphel Inc. team for the help givenon the camera firmware. We gratefully acknowledge the fi-nancial support received from the Ontario Centres of Excel-lence (OCE), the University of Western Ontario and the Nat-ural Sciences and Engineering Research Council of Canada(NSERC).

138

References

[1] R.G. Herrera A. Dona R. Fernandez-Reyes J.J. LasernaA. Ferrero, P. Lucena. Libraries for spectrum identifi-cation: Method of normalized coordinates versus linearcorrelation. Spectrochimica Acta Part B: Atomic Spec-troscopy, 63(3):383–388, 2008.

[2] R. Barbini, F. Colao, R. Fantoni, V. Lazic, A. Palucci,F. Capitelli, and H.J.L. van der Steen. Laser inducedbreakdown spectroscopy for semi-quantitative elementalanalysis in soils and marine sediments. In Proceedings ofEARSeL-SIG-Workshop LIDAR, volume 1, pages 122–129, Dresden, Germany, June 2000.

[3] C.M. Bishop. Neural Networks for Pattern Recognition.Oxford: Oxford University Press., 1995.

[4] Bernhard E. Boser, Isabelle M. Guyon, and Vladimir N.Vapnik. A training algorithm for optimal margin classi-fiers. In COLT ’92: Proceedings of the fifth annual work-shop on Computational learning theory, pages 144–152,New York, NY, USA, 1992. ACM.

[5] Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a li-brary for support vector machines, 2001.

[6] Corinna Cortes and Vladimir Vapnik. Support-vectornetworks. Machine Learning, 20(3):273–297, 1995.

[7] David A. Cremers and Leon J. radziemski. Laser-Induced Breakdown Spectroscopy, chapter 1, pages 1–35. Cambridge University Press, 2006.

[8] Shantanu Godbole and Sunita Sarawagi. S.: Discrim-inative methods for multi-labeled classification. InIn Proceedings of the 8th Pacific-Asia Conference onKnowledge Discovery and Data Mining, pages 22–30.Springer, 2004.

[9] I. B. Gornushkin, B. W. Smith, H. Nasajpour, and J. D.Winefordner. Identification of solid materials by corre-lation analysis using a microscopic laser-induced plasmaspectrometer. Analytical Chemistry, 71(22):5157–5164,November 1999.

[10] Richard Hartley and Andrew Zisserman. Multiple ViewGeometry in Computer Vision. Cambridge UniversityPress, 2nd edition, 2003.

[11] B. Lauser and A. Hotho. Automatic multi-label subjectindexing in a multilingual environment. In Proceedings

of the 7th European Conference in Research and Ad-vanced Technology for Digital Libraries (ECDL 2003),pages 140–151, 2003.

[12] Won-Bae Lee, Jianyong Wu, Yong-Ill Lee, and JosephSneddon. Recent applications of laser-induced break-down spectrometry: A review of material approaches.Applied Spectroscopy Reviews, 39(1):27–97, December2004.

[13] M. Lentjes, K. Dickmann, and J. Meijer. Calculation andoptimization of sample identification by laser inducedbreakdown spectroscopy via correlation analysis. Spec-trochimica Acta Part B: Atomic Spectroscopy, 62(1):56–62, January 2007.

[14] Yi Ma, Stefano Soatto, Jana Kosecka, and S. ShankarSastry. An Invitation to 3-D Vision. Springer-Verlag,New York Inc., 2004.

[15] Jiebo Luo Matthew Boutell, Xipeng Shen and Christo-pher Brown. Learning multi-label semantic scene clas-sification. Pattern Recognition, 37(9):1757–1771, 2004.

[16] Richard P. Paul. Robot Manipulators: Mathematics Pro-gramming and Control. The MIT Press Series in Ar-tificial Intelligence. The MIT Press, Cambridge, Mas-sachusetts, 1981.

[17] M.A. Van Hove P.R. Watson and K. Hermann. NISTSurface Structure Database, volume Version 5.0. Na-tional Institute of Standards and Technology, Gaithers-burg, MD, 2004.

[18] D. A. Rusak, B. C. Castle, B. W. Smith, and J. D. Wine-fordner. Fundamentals and applications of laser-inducedbreakdown spectroscopy. Critical Reviews in AnalyticalChemistry, 27(4):257–290, December 1997.

[19] O. Samek, V. Krzysanek, D.C.S. Beddows, H.H. Telle,J. Kaiser, and M. Lika. Material identification usinglaser spectroscopy and pattern recognition algorithms. InCAIP01, page 443 ff., 2001.

[20] G. Tsoumakas and I. Katakis. Multi-label classification:An overview. International Journal of Data Warehous-ing and Mining, 3(3):1–13, 2007.

[21] E. Ukwatta, R. Rodrigo, J. Samarabandu, and M. Hall.Vision based spectroscopy simulation. In CanadianConference on Computer and Robot Vision, pages 363–368, 2008.

139