8
Research Article Enhanced Template Matching Using Dynamic Positional Warping for Identification of Specific Patterns in Electroencephalogram Won-Du Chang and Chang-Hwan Im Department of Biomedical Engineering, Hanyang University, 222 Wangsimni-ro, Seongdong-gu 133-791, Republic of Korea Correspondence should be addressed to Chang-Hwan Im; [email protected] Received 25 March 2014; Accepted 4 April 2014; Published 27 April 2014 Academic Editor: Kiwoon Kwon Copyright © 2014 W.-D. Chang and C.-H. Im. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Template matching is an approach for signal pattern recognition, oſten used for biomedical signals including electroencephalogram (EEG). Since EEG is oſten severely contaminated by various physiological or pathological artifacts, identification and rejection of these artifacts with improved template matching algorithms would enhance the overall quality of EEG signals. In this paper, we propose a novel approach to improve the accuracy of conventional template matching methods by adopting the dynamic positional warping (DPW) technique, developed recently for handwriting pattern analysis. To validate the feasibility and superiority of the proposed method, eye-blink artifacts in the EEG signals were detected, and the results were then compared to those from conventional methods. DPW was found to outperform the conventional methods in terms of artifact detection accuracy, demonstrating the power of DPW in identifying specific one-dimensional data patterns. 1. Introduction Template matching has been one of the most popular approaches in pattern recognition over the past few decades [14]. is technique is designed to match parts of a signal (or image) to a predefined template signal (or image) in order to quantify similarity of shapes among test and template signals. anks to its applicability in detecting various kinds of pat- terns, successful applications in a variety of different research fields have been reported. Such fields include eye-region detection [5, 6], human authentication [7], stock change categorization [8], handwriting recognition [9], signature verification [10], and electroencephalogram (EEG) artifact detection [1113]. Pattern-detection studies on EEG signals have been con- ducted for the purpose of identifying pathologically driven EEG patterns or EEG artifacts [11, 12, 1416]. However, there is still a need for better identification of eye-blink and motion artifacts, so that they can be rejected nearly perfectly in hopes of obtaining more reliable EEG analyses results. Precise automatic identification of artifacts is of great necessity in applications requiring online EEG processing or long-term EEG monitoring. Aside from the need for better artifact detection, there is also a need for better detection of abnormal EEG patterns associated with various brain disorders in order to achieve improved diagnostic decisions or better lesion localization [17, 18]. Dynamic time warping (DTW), a technique for enhanced template matching, has been widely studied in speech recog- nition [19, 20] and is gradually being applied in other ways, such as shape-boundary matching [21], facial recognition [22], signature verification [23], and EEG pattern detection [12]. DTW is a method that has been applied to achieve more accurate quantification of differences between template and test-signal subpatterns, through optimal matching of corresponding points. Instead of assuming uniform distri- butions among corresponding points between template and test subpatterns, DTW finds the best corresponding points by warping the template pattern at the time axis. Recent studies have shown higher accuracies for template matching with DTW than for conventional template matching methods that assume uniform distributions among corresponding points [2426]. Hindawi Publishing Corporation Journal of Applied Mathematics Volume 2014, Article ID 528071, 7 pages http://dx.doi.org/10.1155/2014/528071

Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

Research ArticleEnhanced Template Matching UsingDynamic Positional Warping for Identification ofSpecific Patterns in Electroencephalogram

Won-Du Chang and Chang-Hwan Im

Department of Biomedical Engineering Hanyang University 222 Wangsimni-ro Seongdong-gu 133-791 Republic of Korea

Correspondence should be addressed to Chang-Hwan Im ichhanyangackr

Received 25 March 2014 Accepted 4 April 2014 Published 27 April 2014

Academic Editor Kiwoon Kwon

Copyright copy 2014 W-D Chang and C-H Im This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

Templatematching is an approach for signal pattern recognition often used for biomedical signals including electroencephalogram(EEG) Since EEG is often severely contaminated by various physiological or pathological artifacts identification and rejectionof these artifacts with improved template matching algorithms would enhance the overall quality of EEG signals In this paperwe propose a novel approach to improve the accuracy of conventional template matching methods by adopting the dynamicpositional warping (DPW) technique developed recently for handwriting pattern analysis To validate the feasibility and superiorityof the proposed method eye-blink artifacts in the EEG signals were detected and the results were then compared to thosefrom conventional methods DPW was found to outperform the conventional methods in terms of artifact detection accuracydemonstrating the power of DPW in identifying specific one-dimensional data patterns

1 Introduction

Template matching has been one of the most popularapproaches in pattern recognition over the past few decades[1ndash4]This technique is designed tomatch parts of a signal (orimage) to a predefined template signal (or image) in order toquantify similarity of shapes among test and template signalsThanks to its applicability in detecting various kinds of pat-terns successful applications in a variety of different researchfields have been reported Such fields include eye-regiondetection [5 6] human authentication [7] stock changecategorization [8] handwriting recognition [9] signatureverification [10] and electroencephalogram (EEG) artifactdetection [11ndash13]

Pattern-detection studies on EEG signals have been con-ducted for the purpose of identifying pathologically drivenEEG patterns or EEG artifacts [11 12 14ndash16] However thereis still a need for better identification of eye-blink andmotionartifacts so that they can be rejected nearly perfectly inhopes of obtainingmore reliable EEG analyses results Preciseautomatic identification of artifacts is of great necessity inapplications requiring online EEG processing or long-term

EEG monitoring Aside from the need for better artifactdetection there is also a need for better detection of abnormalEEG patterns associated with various brain disorders in orderto achieve improved diagnostic decisions or better lesionlocalization [17 18]

Dynamic timewarping (DTW) a technique for enhancedtemplate matching has been widely studied in speech recog-nition [19 20] and is gradually being applied in other wayssuch as shape-boundary matching [21] facial recognition[22] signature verification [23] and EEG pattern detection[12] DTW is a method that has been applied to achievemore accurate quantification of differences between templateand test-signal subpatterns through optimal matching ofcorresponding points Instead of assuming uniform distri-butions among corresponding points between template andtest subpatterns DTWfinds the best corresponding points bywarping the template pattern at the time axis Recent studieshave shown higher accuracies for template matching withDTW than for conventional template matchingmethods thatassume uniform distributions among corresponding points[24ndash26]

Hindawi Publishing CorporationJournal of Applied MathematicsVolume 2014 Article ID 528071 7 pageshttpdxdoiorg1011552014528071

2 Journal of Applied Mathematics

Dynamic positional warping (DPW) is a modification ofDTW that was developed to improve accuracy in distancequantification [27] It was originally developed for the accu-rate matching of contour data with two-dimensional shapesand frequently used for signature verification By allowing forthe signal to be warped on the ordinate axis in addition to thetime axis DPW can more accurately identify correspondingpoints than can conventional DTW

The main goal of this study was to investigate whetherDPW could be extended to one-dimensional pattern recog-nition problems To approach this aim we applied DPW forthe detection of eye-blink artifact patterns in frontal EEGdataacquired from 24 healthy subjects The detection accuracyof DPW was then compared to those of the conventionaltemplate matching methods

2 Materials and Methods

21 Experimental Data and Preprocessing In this study eye-blink artifacts in continuous EEG signals were selected as thetarget patterns to be detectedThe reason for this is that whileeye-blink artifacts were regarded as representative artifactscontaminating EEG signals it was difficult to accurately iden-tify them due to high variability among events or individualsEEG data were recorded from 24 healthy participants usinga multichannel EEG recording system (ActiveTwo AD-boxBioSemi The Netherlands) at a sampling rate of 2048Hzwhile the participants performed spot-the-difference puzzlesfor 25 seconds Two slightly different images were presentedon the left and right halves of a display and the participantswere asked to find the differences between two images for 15secondsThe taskwas repeated five times for each participantA particular frontal channel Fp2 in the international 10ndash20system was used for the eye-blink artifact detection Toverify eye-blink detection accuracy it was necessary to usea ground-truth dataset indicating the presence of an eye-blink artifact For this aim time ranges of eye-blink artifactswere marked by two experienced researchers based on visualinspection of EEG data

Before the primary analyses EEG data were high-passfiltered with a 01 Hz cutoff frequency downsampled to a64Hz sampling rate in order to reduce the computationcost and median-filtered with a five-point width in orderto smooth the data The width of the median filter wasdetermined empirically

22 Procedure for Template Matching In order to evaluateand compare different distance metrics a typical templatematching protocol was implemented The template matchingprotocol was designed to be as simple as possible so asto exclude any potential influence from any confoundingfactors Figure 1 illustrates the schematic diagramof our studyprotocol

The core parts of this process include distance calculationbetween templates and test patterns (denoted by Step 1 inFigure 1) and an overall similarity decision based on a pre-determined threshold (denoted by Step 3 in Figure 1) Bothof these steps are common among studies using templatematching approaches [11 12 28] In the current study test

patterns were extracted from the continuous test EEG datausing a fixed-size sliding window and the distances betweenthe template and test EEG signalswere evaluated at every timepoint (the number of slidingwindowswas denoted by119873)Thesize of the sliding windowwas set to be the same as the lengthof the template as this was an assumption indispensable forapplying linear template matching such as correlation androot-mean-square error The decision step was only appliedfor the local minima of the distance array and equal widthswere assumed for the detected pattern and template Whenranges of adjacent detected patterns overlapped with oneanother the detected pattern rangesweremerged into a singlerange in order to avoid duplicate detection

Template signals were randomly selected by a computeras in [4] so as to eliminate any possible bias toward theuse of a specific method When used by experts manualtemplate selection has the potential for achievement ofhigher performance outcomes [11 12] compared to randomselection however manual selection processes are highlydependent on expertsrsquo subjective decisions and can lead tobiased results

Approaches for better use of training data involve con-struction of a single template by averaging patterns in asingle cluster or selection of best-fit templates for each clusterUnfortunately however thesemethods do not generally showhigh performance when template widths and shapes havelarge variances In this study we adopted a normalizationmethod [29] considering large variances of template widthsand shapes due to random selection of templates Thereare two advantages for normalization approach comparedto the conventional approaches (1) effects of impropertemplate selection can be minimized by distance-averaging(2) variations in template width and shape do not need tobe considered Normalized distance (denoted by119863119895) betweenthe 119895th test pattern and templates can be calculated by

119863119895 =

(sum119899119894=1 119889119894119895)

119899 sdot 120590 (1)

where 119889119894119895 is distance between the 119894th template and the 119895th testpattern 119899 is the number of templates and120590 is a normalizationfactor given as

120590 =

(sum119899119894=1sum119899119895=119894+1 119889119894119895)

119899 sdot (119899 minus 1) 2 (2)

The test pattern 119879119895 is accepted if 119863119895 is a local minimumand if this local minimum is lower than a predefinedthresholdThis overall process was repeated 20 times in orderto achieve an unbiased comparison

23 Traditional Distance Metrics Because it is generallyassumed that target-pattern shapes are unchanging Eucli-dean distance and correlation-coefficients have been mostcommonly used for template matching applications [4 30]Three traditional distance metrics are investigated in thisstudy which are root-mean-square error (RMSE) basedon Euclidean distances (with linear matching) correlationcoefficient and Kurtosis Kurtosis was considered in thisstudy because it is widely used in biomedical data analysis

Journal of Applied Mathematics 3

Training21 3 54

Template selection

2

1

3

54Step 3 Decision

Testing

Source data

Ground truth

Test pattern extraction using a sliding window

Step 1 Distance calculation for each template pattern Tj

Step 2 Normalizationbest template selectiond12 d13

d23

d24

d25 d34

d35

d45120590 =

n

sumj=i+1

dij n middot (n minus 1)2

Tj

d1 d2 d3 d4 d5

T1Tn

TN

Dj =

n

sumi=1

di (n middot 120590)

Accept Tj if Dj is a local minimum and Dj lt 120579reject otherwise

n

sumi=1

( (

( (

Figure 1 Schematic diagram of our study protocol for 119899 = 5 templates After selecting templates from the ground-truth dataset the averagedistance among the templates is calculated for normalization (during the ldquoTrainingrdquo phase) During the ldquoTestingrdquo phase distances betweentemplates and test patterns within test-signal sliding windows are calculated

[31 32] Between two signals 119860 and 119861 with 119871119860 and 119871119861 asthe respective signal lengths distances for each metric aredefined as follows

Root-mean-square error

119889rmse = radic1

119871sdot

119871

sum

119896=1

119860 (119896) minus 119861 (119896)2 (3)

Correlation

119889corr =sum119871119896=1 119860 (119896) minus 119860 sdot 119861 (119896) minus 119861

radicsum119871119896=1 119860 (119896) minus 119860

2sdot radicsum119871119896=1 119861 (119896) minus 119861

2

(4)

Kurtosis

119889ku =

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

sum119871119860119896=1

119860 (119896) minus 1198604

119871119860 sdot 1205901198604

minus

sum119871119861119896=1

119861 (119896) minus 1198614

119871119861 sdot 1205901198614

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

(5)

where 119860(119896) and 119861(119896) denote 119896th data in signals 119860 and 119861respectively Note that RMSE and correlation are calculableonly for identical signal lengths Thus a common variable 119871

was used to represent the signal length in (3) and (4)

24 Dynamic Time Warping In spite of various modifica-tions of DTW in previous decades original kernel modelsfor calculating distance are still being widely used in manyapplications In this study we adopted a common implemen-tation of DTW [19] and empirically determined parametersfor slope constraintsThe DTWdistance between two signalsis defined as

119889dtw = 120591 (119871119860 119871119861) (6)

where 119871119860 and 119871119861 are respective template and test patternlengths and 120591(119894 119895) is the distance between two subsignals119860(119896) | 1 le 119896 le 119894 and 119861(119896) | 1 le 119896 le 119895 defined as

120591 (119894 119895) =1003816100381610038161003816119860 (119894) minus 119860 (1) minus 119861 (119895) minus 119861 (1)

1003816100381610038161003816

+min119888

120591 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888))

(7)

where 120591(1 1) = 0 and 119862119860(119888) and 119862119861(119888) are 119888th slope con-straints on pattern axes which limit the number of skipping(jumping) data points 119862119860119861(119888) denotes the 119888th pair of theslope constraints on template and test pattern axes and canbe written as

119862119860119861 = (1119898) (119898 1) | 1 le 119898 le 119872 (8)

where119872 is the maximum branch length of slope constraintsNote that the values at the starting points of the two patternsare adjusted to be overlapped

4 Journal of Applied Mathematics

Valu

e

Time

Matching

120572

120573

119834

bc

d

(a)

Valu

e

Time

Warping

120572

120573

119834 119834998400

b c

d

(b)

Warping

Time

Valu

e

120572

120573

119834

119834998400

b

cd

(c)Figure 2 Schematic illustrations for elucidating dynamic time warping and positional warping for one-dimensional data matching (a) twosignals 120572 (solid line) and 120573 (dashed line) are compared and considered a pair of corresponding points (b) Time warping in DTW a is warpedto a1015840 by time shifting (c) Positional and time warping in DPW a is warped to a1015840 to be overlapped onto b

25 Dynamic Positional Warping (DPW) DPW was orig-inally proposed for accurate quantification of differencesbetween two-dimensional data such as an objectrsquos contouror handwritten characters by searching similar subsequencesrecursively [27] When employed for one-dimensional datathe DPW distance between time series signals 119860 and 119861 canbe written as follows

119889dtw = 120591 (119871119860 119871119861) (9)

120591 (119894 119895) =10038161003816100381610038161003816119860 (119894) minus 119860 (119894prev) minus 119861 (119895) minus 119861 (119895prev)

10038161003816100381610038161003816+ 120596 (119894 119895)

(10)

119894prev = 119894 minus 119862119860 (119888min (119894 119895)) (11)

119895prev = 119895 minus 119862119861 (119888min (119894 119895)) (12)

119888min (119894 119895) = arg min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (13)

120596 (119894 119895) = min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (14)

where most notations are the same as those used in theoriginal DTW equations ((6) and (7)) In these equations119894prev and 119895prev represent preceding corresponding points thatminimize 120591(119894 119895) As shown in (9) and (10) the forms ofthe equations are the same as those of conventional DTW

equations except with regard to distance calculation betweentwo points Note that 119860(119894prev) and 119861(119895prev) are substituted for119860(1) and 119861(1) respectively in (10)

Figure 2 compares the mechanisms of DPW and DTWin one-dimensional data-matching applications When twosignals are compared and points a and b are matched as acorresponding pair (Figure 2(a)) DTW shifts a subsequencethat begins with a on the time axis such that the shifted pointis moved to the same time index as the subsequence startingwith b (Figure 2(b)) This process denoted as time warpingallows for distance calculation between points c and d byplacing them closely on time axis In the case of DPW uponmatching a and b the subsequence starting from a is warpedso that a is overlapped onto b Please note this subsequencewarping costs the distance (on the axis of ordinate) betweenthe two points a and b while the warping cost on the timeaxis is free (refer to [27] for more detailed description on theoriginal DPWmethod)

3 Results and Discussion

Receiver operating characteristic (ROC) curves were used tocompare pattern-detection performances among the varioustemplate matching approaches introduced in Section 2 Toevaluate ROC curves recall rates were evaluated with respect

Journal of Applied Mathematics 5

0 10 20 30 40 50 60 70 80 90 10010

20

30

40

50

60

70

80

90

100

Recall ()

Prec

ision

()

RMSECorrelationKurtosis

DTWDPW

Figure 3 ROC curves of five different methods

to fixed precision rates for each iteration of each participantThen for each precision rate recall rates were averaged acrossall the iterations and participants Figure 3 showsROCcurvesillustrating detection accuracies for five different methodsDPW showed the highest accuracy among all methodsinvestigated with an accuracy of 82 for equal precisionand recall rates DPW accuracy was 10 higher than thatfor conventional DTW (where accuracy rating was 72) andeven higher than those for conventional distance metrics(RMSE 49 correlation 34 and Kurtosis 11) Theseresults demonstrate that positional warping as has been usedfor two-dimensional pattern recognition problems mightbe also effective in one-dimensional pattern recognitionproblems

The extremely low accuracies of RMSE and correlationmay be surprising considering that both distance metricsare so commonly used for template matching applicationsThe poor performances found for both metrics are thoughtto partly originate from high target-pattern shape variationsIt is also possible that these poor performances were theresult of the chosen task being more difficult than typicaltasks Since the templates in the current task were selectedrandomly from ground-truth datasets there may have beenmany templates with irregular shapes Despite these difficultconditions the proposed DPW approach showed muchhigher detection accuracy than the DTW approach suggest-ing that DPW might be used as a new and powerful methodfor extracting specific signal patterns for EEG applications

Table 1 summarizes the best detection accuracies among20 iterations evaluated for each participant Accuracy wascalculated as the percentage of precision or recall for equalprecision and recall values in ROC curves When ROCcurveswere evaluated for each participant and best accuracieswere selected among the 20 iteration results the conven-tional methods based on correlation coefficients or RMSEsyielded better accuracies than the results shown in Figure 3

Nevertheless DPW still outperformed the other metricsranking the highest for 22 of 24 participants The averageddetection accuracy for DPW (9610) was 362 higher thanthat for DTW (9238)

In addition the influence of the number of templates ondetection accuracy was investigated The detection accuracywas evaluated by increasing the number of templates and thenaveraging across all iterations and participants (Table 2) Theresults show a weak influence of the number of templates ondetection accuracy Except for correlation accuracy did notchange significantly as the number of templates increasedInstead the standard deviations ofDTWandDPWdecreasedsignificantly demonstrating the possibility for more stablepattern detection by the use of sufficient numbers of tem-plates in DTW and DPW

4 Conclusion

In this paper we investigated whether DPW originally devel-oped for two-dimensional pattern recognition could be suc-cessfully employed for one-dimensional pattern recognitionTo validate our alternative hypothesis that DPW is effectivefor one-dimensional data analysis DPW was applied to theproblem of EEG eye-blink artifact detection DPW outper-formed conventional template matching methods includingDTW demonstrating that this positional warping methodwhich warps signals on both ordinate and abscissa axes isalso effective in one-dimensional pattern recognition Thisstudy suggests the possibility of applying DPW tomany othertypes of signal patterns and applicationsWe are also planningto combine DPW with other methodologies in our futurestudies

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

6 Journal of Applied Mathematics

Table 1 Best accuracies () evaluated for each participant among results from 20 iterations Best accuracy values for each participant are inbold font

Subject ID Correlation RMSE Kurtosis DTW DPW1 8696 6132 2286 9497 98552 8425 9067 3946 9760 98283 4919 6083 1598 7742 85274 6902 8438 1577 9365 95415 4928 7369 1845 8350 92396 2667 8444 1333 9000 91557 8072 9280 3095 9464 98668 8819 9286 4800 9801 100009 6296 9877 3134 9877 993810 7183 7133 1794 9357 951111 4000 8667 2071 9155 1000012 6132 9174 1324 9328 992613 5748 4188 1510 7921 965614 6083 7889 3019 9143 971415 6389 7607 1501 9436 986516 8063 9418 3405 9684 989517 6087 5401 2279 8428 808218 4030 8638 2400 9737 987219 6501 7208 1837 8981 949520 1759 7667 1769 9333 949421 7920 9167 2213 9251 979422 6311 4163 2510 9188 967023 6555 9023 2308 10000 980824 4099 9753 2071 9917 9917Average 6108 7878 2318 9238 9610

Table 2 Artifact detection accuracies () with respect to the number of templates for equal precision and recall

Number of templates Correlation RMSE Kurtosis DTW DPW1 4954 plusmn 2245 6165 plusmn 2842 965 plusmn 563 7758 plusmn 2244 8394 plusmn 2352

2 3437 plusmn 2754 6255 plusmn 2551 1174 plusmn 1101 6829 plusmn 2959 7823 plusmn 3035

3 2842 plusmn 2593 6160 plusmn 2508 1020 plusmn 721 7638 plusmn 2047 8606 plusmn 1706

4 2731 plusmn 2458 6042 plusmn 2552 988 plusmn 749 7551 plusmn 2007 8579 plusmn 1636

5 2384 plusmn 2228 5977 plusmn 2472 1077 plusmn 815 7464 plusmn 1979 8592 plusmn 1624

6 2489 plusmn 2147 5890 plusmn 2572 1047 plusmn 835 7749 plusmn 1744 8663 plusmn 1541

7 2576 plusmn 2291 5844 plusmn 2509 1037 plusmn 814 7609 plusmn 1764 8642 plusmn 1574

8 2535 plusmn 2223 5859 plusmn 2525 1085 plusmn 874 7680 plusmn 1732 8687 plusmn 1460

9 2456 plusmn 2088 5965 plusmn 2445 1108 plusmn 890 7792 plusmn 1512 8713 plusmn 1416

10 2417 plusmn 1933 5949 plusmn 2537 1069 plusmn 917 7868 plusmn 1535 8654 plusmn 1525

Acknowledgments

This work was supported in part by the IT RampD program ofMSIPKEIT (KI10045461 Development of Cultural ContentsEvaluationTechnologyBased onReal-TimeBiosignal ofMul-tiple Subjects) in part by the IT RampD program of MOTIEMISPKEIT (10045452 Development of Multimodal Brain-Machine Interface SystemBased onUser Intent Recognition)and in part by the National Research Foundation of Korea(NRF) funded by the Ministry of Science ICT and FuturePlanning (NRF-2012R1A2A2A03045395)

References

[1] A Goshtasby ldquoTemplate matching in rotated imagesrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol7 no 3 pp 338ndash344 1985

[2] J Frank S Mannor J Pineau and D Precup ldquoTime seriesanalysis using geometric templatematchingrdquo IEEETransactionson Pattern Analysis and Machine Intelligence vol 35 no 3 pp740ndash754 2013

[3] S Omachi and M Omachi ldquoFast template matching withpolynomialsrdquo IEEETransactions on Image Processing vol 16 no8 pp 2139ndash2149 2007

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

2 Journal of Applied Mathematics

Dynamic positional warping (DPW) is a modification ofDTW that was developed to improve accuracy in distancequantification [27] It was originally developed for the accu-rate matching of contour data with two-dimensional shapesand frequently used for signature verification By allowing forthe signal to be warped on the ordinate axis in addition to thetime axis DPW can more accurately identify correspondingpoints than can conventional DTW

The main goal of this study was to investigate whetherDPW could be extended to one-dimensional pattern recog-nition problems To approach this aim we applied DPW forthe detection of eye-blink artifact patterns in frontal EEGdataacquired from 24 healthy subjects The detection accuracyof DPW was then compared to those of the conventionaltemplate matching methods

2 Materials and Methods

21 Experimental Data and Preprocessing In this study eye-blink artifacts in continuous EEG signals were selected as thetarget patterns to be detectedThe reason for this is that whileeye-blink artifacts were regarded as representative artifactscontaminating EEG signals it was difficult to accurately iden-tify them due to high variability among events or individualsEEG data were recorded from 24 healthy participants usinga multichannel EEG recording system (ActiveTwo AD-boxBioSemi The Netherlands) at a sampling rate of 2048Hzwhile the participants performed spot-the-difference puzzlesfor 25 seconds Two slightly different images were presentedon the left and right halves of a display and the participantswere asked to find the differences between two images for 15secondsThe taskwas repeated five times for each participantA particular frontal channel Fp2 in the international 10ndash20system was used for the eye-blink artifact detection Toverify eye-blink detection accuracy it was necessary to usea ground-truth dataset indicating the presence of an eye-blink artifact For this aim time ranges of eye-blink artifactswere marked by two experienced researchers based on visualinspection of EEG data

Before the primary analyses EEG data were high-passfiltered with a 01 Hz cutoff frequency downsampled to a64Hz sampling rate in order to reduce the computationcost and median-filtered with a five-point width in orderto smooth the data The width of the median filter wasdetermined empirically

22 Procedure for Template Matching In order to evaluateand compare different distance metrics a typical templatematching protocol was implemented The template matchingprotocol was designed to be as simple as possible so asto exclude any potential influence from any confoundingfactors Figure 1 illustrates the schematic diagramof our studyprotocol

The core parts of this process include distance calculationbetween templates and test patterns (denoted by Step 1 inFigure 1) and an overall similarity decision based on a pre-determined threshold (denoted by Step 3 in Figure 1) Bothof these steps are common among studies using templatematching approaches [11 12 28] In the current study test

patterns were extracted from the continuous test EEG datausing a fixed-size sliding window and the distances betweenthe template and test EEG signalswere evaluated at every timepoint (the number of slidingwindowswas denoted by119873)Thesize of the sliding windowwas set to be the same as the lengthof the template as this was an assumption indispensable forapplying linear template matching such as correlation androot-mean-square error The decision step was only appliedfor the local minima of the distance array and equal widthswere assumed for the detected pattern and template Whenranges of adjacent detected patterns overlapped with oneanother the detected pattern rangesweremerged into a singlerange in order to avoid duplicate detection

Template signals were randomly selected by a computeras in [4] so as to eliminate any possible bias toward theuse of a specific method When used by experts manualtemplate selection has the potential for achievement ofhigher performance outcomes [11 12] compared to randomselection however manual selection processes are highlydependent on expertsrsquo subjective decisions and can lead tobiased results

Approaches for better use of training data involve con-struction of a single template by averaging patterns in asingle cluster or selection of best-fit templates for each clusterUnfortunately however thesemethods do not generally showhigh performance when template widths and shapes havelarge variances In this study we adopted a normalizationmethod [29] considering large variances of template widthsand shapes due to random selection of templates Thereare two advantages for normalization approach comparedto the conventional approaches (1) effects of impropertemplate selection can be minimized by distance-averaging(2) variations in template width and shape do not need tobe considered Normalized distance (denoted by119863119895) betweenthe 119895th test pattern and templates can be calculated by

119863119895 =

(sum119899119894=1 119889119894119895)

119899 sdot 120590 (1)

where 119889119894119895 is distance between the 119894th template and the 119895th testpattern 119899 is the number of templates and120590 is a normalizationfactor given as

120590 =

(sum119899119894=1sum119899119895=119894+1 119889119894119895)

119899 sdot (119899 minus 1) 2 (2)

The test pattern 119879119895 is accepted if 119863119895 is a local minimumand if this local minimum is lower than a predefinedthresholdThis overall process was repeated 20 times in orderto achieve an unbiased comparison

23 Traditional Distance Metrics Because it is generallyassumed that target-pattern shapes are unchanging Eucli-dean distance and correlation-coefficients have been mostcommonly used for template matching applications [4 30]Three traditional distance metrics are investigated in thisstudy which are root-mean-square error (RMSE) basedon Euclidean distances (with linear matching) correlationcoefficient and Kurtosis Kurtosis was considered in thisstudy because it is widely used in biomedical data analysis

Journal of Applied Mathematics 3

Training21 3 54

Template selection

2

1

3

54Step 3 Decision

Testing

Source data

Ground truth

Test pattern extraction using a sliding window

Step 1 Distance calculation for each template pattern Tj

Step 2 Normalizationbest template selectiond12 d13

d23

d24

d25 d34

d35

d45120590 =

n

sumj=i+1

dij n middot (n minus 1)2

Tj

d1 d2 d3 d4 d5

T1Tn

TN

Dj =

n

sumi=1

di (n middot 120590)

Accept Tj if Dj is a local minimum and Dj lt 120579reject otherwise

n

sumi=1

( (

( (

Figure 1 Schematic diagram of our study protocol for 119899 = 5 templates After selecting templates from the ground-truth dataset the averagedistance among the templates is calculated for normalization (during the ldquoTrainingrdquo phase) During the ldquoTestingrdquo phase distances betweentemplates and test patterns within test-signal sliding windows are calculated

[31 32] Between two signals 119860 and 119861 with 119871119860 and 119871119861 asthe respective signal lengths distances for each metric aredefined as follows

Root-mean-square error

119889rmse = radic1

119871sdot

119871

sum

119896=1

119860 (119896) minus 119861 (119896)2 (3)

Correlation

119889corr =sum119871119896=1 119860 (119896) minus 119860 sdot 119861 (119896) minus 119861

radicsum119871119896=1 119860 (119896) minus 119860

2sdot radicsum119871119896=1 119861 (119896) minus 119861

2

(4)

Kurtosis

119889ku =

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

sum119871119860119896=1

119860 (119896) minus 1198604

119871119860 sdot 1205901198604

minus

sum119871119861119896=1

119861 (119896) minus 1198614

119871119861 sdot 1205901198614

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

(5)

where 119860(119896) and 119861(119896) denote 119896th data in signals 119860 and 119861respectively Note that RMSE and correlation are calculableonly for identical signal lengths Thus a common variable 119871

was used to represent the signal length in (3) and (4)

24 Dynamic Time Warping In spite of various modifica-tions of DTW in previous decades original kernel modelsfor calculating distance are still being widely used in manyapplications In this study we adopted a common implemen-tation of DTW [19] and empirically determined parametersfor slope constraintsThe DTWdistance between two signalsis defined as

119889dtw = 120591 (119871119860 119871119861) (6)

where 119871119860 and 119871119861 are respective template and test patternlengths and 120591(119894 119895) is the distance between two subsignals119860(119896) | 1 le 119896 le 119894 and 119861(119896) | 1 le 119896 le 119895 defined as

120591 (119894 119895) =1003816100381610038161003816119860 (119894) minus 119860 (1) minus 119861 (119895) minus 119861 (1)

1003816100381610038161003816

+min119888

120591 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888))

(7)

where 120591(1 1) = 0 and 119862119860(119888) and 119862119861(119888) are 119888th slope con-straints on pattern axes which limit the number of skipping(jumping) data points 119862119860119861(119888) denotes the 119888th pair of theslope constraints on template and test pattern axes and canbe written as

119862119860119861 = (1119898) (119898 1) | 1 le 119898 le 119872 (8)

where119872 is the maximum branch length of slope constraintsNote that the values at the starting points of the two patternsare adjusted to be overlapped

4 Journal of Applied Mathematics

Valu

e

Time

Matching

120572

120573

119834

bc

d

(a)

Valu

e

Time

Warping

120572

120573

119834 119834998400

b c

d

(b)

Warping

Time

Valu

e

120572

120573

119834

119834998400

b

cd

(c)Figure 2 Schematic illustrations for elucidating dynamic time warping and positional warping for one-dimensional data matching (a) twosignals 120572 (solid line) and 120573 (dashed line) are compared and considered a pair of corresponding points (b) Time warping in DTW a is warpedto a1015840 by time shifting (c) Positional and time warping in DPW a is warped to a1015840 to be overlapped onto b

25 Dynamic Positional Warping (DPW) DPW was orig-inally proposed for accurate quantification of differencesbetween two-dimensional data such as an objectrsquos contouror handwritten characters by searching similar subsequencesrecursively [27] When employed for one-dimensional datathe DPW distance between time series signals 119860 and 119861 canbe written as follows

119889dtw = 120591 (119871119860 119871119861) (9)

120591 (119894 119895) =10038161003816100381610038161003816119860 (119894) minus 119860 (119894prev) minus 119861 (119895) minus 119861 (119895prev)

10038161003816100381610038161003816+ 120596 (119894 119895)

(10)

119894prev = 119894 minus 119862119860 (119888min (119894 119895)) (11)

119895prev = 119895 minus 119862119861 (119888min (119894 119895)) (12)

119888min (119894 119895) = arg min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (13)

120596 (119894 119895) = min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (14)

where most notations are the same as those used in theoriginal DTW equations ((6) and (7)) In these equations119894prev and 119895prev represent preceding corresponding points thatminimize 120591(119894 119895) As shown in (9) and (10) the forms ofthe equations are the same as those of conventional DTW

equations except with regard to distance calculation betweentwo points Note that 119860(119894prev) and 119861(119895prev) are substituted for119860(1) and 119861(1) respectively in (10)

Figure 2 compares the mechanisms of DPW and DTWin one-dimensional data-matching applications When twosignals are compared and points a and b are matched as acorresponding pair (Figure 2(a)) DTW shifts a subsequencethat begins with a on the time axis such that the shifted pointis moved to the same time index as the subsequence startingwith b (Figure 2(b)) This process denoted as time warpingallows for distance calculation between points c and d byplacing them closely on time axis In the case of DPW uponmatching a and b the subsequence starting from a is warpedso that a is overlapped onto b Please note this subsequencewarping costs the distance (on the axis of ordinate) betweenthe two points a and b while the warping cost on the timeaxis is free (refer to [27] for more detailed description on theoriginal DPWmethod)

3 Results and Discussion

Receiver operating characteristic (ROC) curves were used tocompare pattern-detection performances among the varioustemplate matching approaches introduced in Section 2 Toevaluate ROC curves recall rates were evaluated with respect

Journal of Applied Mathematics 5

0 10 20 30 40 50 60 70 80 90 10010

20

30

40

50

60

70

80

90

100

Recall ()

Prec

ision

()

RMSECorrelationKurtosis

DTWDPW

Figure 3 ROC curves of five different methods

to fixed precision rates for each iteration of each participantThen for each precision rate recall rates were averaged acrossall the iterations and participants Figure 3 showsROCcurvesillustrating detection accuracies for five different methodsDPW showed the highest accuracy among all methodsinvestigated with an accuracy of 82 for equal precisionand recall rates DPW accuracy was 10 higher than thatfor conventional DTW (where accuracy rating was 72) andeven higher than those for conventional distance metrics(RMSE 49 correlation 34 and Kurtosis 11) Theseresults demonstrate that positional warping as has been usedfor two-dimensional pattern recognition problems mightbe also effective in one-dimensional pattern recognitionproblems

The extremely low accuracies of RMSE and correlationmay be surprising considering that both distance metricsare so commonly used for template matching applicationsThe poor performances found for both metrics are thoughtto partly originate from high target-pattern shape variationsIt is also possible that these poor performances were theresult of the chosen task being more difficult than typicaltasks Since the templates in the current task were selectedrandomly from ground-truth datasets there may have beenmany templates with irregular shapes Despite these difficultconditions the proposed DPW approach showed muchhigher detection accuracy than the DTW approach suggest-ing that DPW might be used as a new and powerful methodfor extracting specific signal patterns for EEG applications

Table 1 summarizes the best detection accuracies among20 iterations evaluated for each participant Accuracy wascalculated as the percentage of precision or recall for equalprecision and recall values in ROC curves When ROCcurveswere evaluated for each participant and best accuracieswere selected among the 20 iteration results the conven-tional methods based on correlation coefficients or RMSEsyielded better accuracies than the results shown in Figure 3

Nevertheless DPW still outperformed the other metricsranking the highest for 22 of 24 participants The averageddetection accuracy for DPW (9610) was 362 higher thanthat for DTW (9238)

In addition the influence of the number of templates ondetection accuracy was investigated The detection accuracywas evaluated by increasing the number of templates and thenaveraging across all iterations and participants (Table 2) Theresults show a weak influence of the number of templates ondetection accuracy Except for correlation accuracy did notchange significantly as the number of templates increasedInstead the standard deviations ofDTWandDPWdecreasedsignificantly demonstrating the possibility for more stablepattern detection by the use of sufficient numbers of tem-plates in DTW and DPW

4 Conclusion

In this paper we investigated whether DPW originally devel-oped for two-dimensional pattern recognition could be suc-cessfully employed for one-dimensional pattern recognitionTo validate our alternative hypothesis that DPW is effectivefor one-dimensional data analysis DPW was applied to theproblem of EEG eye-blink artifact detection DPW outper-formed conventional template matching methods includingDTW demonstrating that this positional warping methodwhich warps signals on both ordinate and abscissa axes isalso effective in one-dimensional pattern recognition Thisstudy suggests the possibility of applying DPW tomany othertypes of signal patterns and applicationsWe are also planningto combine DPW with other methodologies in our futurestudies

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

6 Journal of Applied Mathematics

Table 1 Best accuracies () evaluated for each participant among results from 20 iterations Best accuracy values for each participant are inbold font

Subject ID Correlation RMSE Kurtosis DTW DPW1 8696 6132 2286 9497 98552 8425 9067 3946 9760 98283 4919 6083 1598 7742 85274 6902 8438 1577 9365 95415 4928 7369 1845 8350 92396 2667 8444 1333 9000 91557 8072 9280 3095 9464 98668 8819 9286 4800 9801 100009 6296 9877 3134 9877 993810 7183 7133 1794 9357 951111 4000 8667 2071 9155 1000012 6132 9174 1324 9328 992613 5748 4188 1510 7921 965614 6083 7889 3019 9143 971415 6389 7607 1501 9436 986516 8063 9418 3405 9684 989517 6087 5401 2279 8428 808218 4030 8638 2400 9737 987219 6501 7208 1837 8981 949520 1759 7667 1769 9333 949421 7920 9167 2213 9251 979422 6311 4163 2510 9188 967023 6555 9023 2308 10000 980824 4099 9753 2071 9917 9917Average 6108 7878 2318 9238 9610

Table 2 Artifact detection accuracies () with respect to the number of templates for equal precision and recall

Number of templates Correlation RMSE Kurtosis DTW DPW1 4954 plusmn 2245 6165 plusmn 2842 965 plusmn 563 7758 plusmn 2244 8394 plusmn 2352

2 3437 plusmn 2754 6255 plusmn 2551 1174 plusmn 1101 6829 plusmn 2959 7823 plusmn 3035

3 2842 plusmn 2593 6160 plusmn 2508 1020 plusmn 721 7638 plusmn 2047 8606 plusmn 1706

4 2731 plusmn 2458 6042 plusmn 2552 988 plusmn 749 7551 plusmn 2007 8579 plusmn 1636

5 2384 plusmn 2228 5977 plusmn 2472 1077 plusmn 815 7464 plusmn 1979 8592 plusmn 1624

6 2489 plusmn 2147 5890 plusmn 2572 1047 plusmn 835 7749 plusmn 1744 8663 plusmn 1541

7 2576 plusmn 2291 5844 plusmn 2509 1037 plusmn 814 7609 plusmn 1764 8642 plusmn 1574

8 2535 plusmn 2223 5859 plusmn 2525 1085 plusmn 874 7680 plusmn 1732 8687 plusmn 1460

9 2456 plusmn 2088 5965 plusmn 2445 1108 plusmn 890 7792 plusmn 1512 8713 plusmn 1416

10 2417 plusmn 1933 5949 plusmn 2537 1069 plusmn 917 7868 plusmn 1535 8654 plusmn 1525

Acknowledgments

This work was supported in part by the IT RampD program ofMSIPKEIT (KI10045461 Development of Cultural ContentsEvaluationTechnologyBased onReal-TimeBiosignal ofMul-tiple Subjects) in part by the IT RampD program of MOTIEMISPKEIT (10045452 Development of Multimodal Brain-Machine Interface SystemBased onUser Intent Recognition)and in part by the National Research Foundation of Korea(NRF) funded by the Ministry of Science ICT and FuturePlanning (NRF-2012R1A2A2A03045395)

References

[1] A Goshtasby ldquoTemplate matching in rotated imagesrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol7 no 3 pp 338ndash344 1985

[2] J Frank S Mannor J Pineau and D Precup ldquoTime seriesanalysis using geometric templatematchingrdquo IEEETransactionson Pattern Analysis and Machine Intelligence vol 35 no 3 pp740ndash754 2013

[3] S Omachi and M Omachi ldquoFast template matching withpolynomialsrdquo IEEETransactions on Image Processing vol 16 no8 pp 2139ndash2149 2007

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

Journal of Applied Mathematics 3

Training21 3 54

Template selection

2

1

3

54Step 3 Decision

Testing

Source data

Ground truth

Test pattern extraction using a sliding window

Step 1 Distance calculation for each template pattern Tj

Step 2 Normalizationbest template selectiond12 d13

d23

d24

d25 d34

d35

d45120590 =

n

sumj=i+1

dij n middot (n minus 1)2

Tj

d1 d2 d3 d4 d5

T1Tn

TN

Dj =

n

sumi=1

di (n middot 120590)

Accept Tj if Dj is a local minimum and Dj lt 120579reject otherwise

n

sumi=1

( (

( (

Figure 1 Schematic diagram of our study protocol for 119899 = 5 templates After selecting templates from the ground-truth dataset the averagedistance among the templates is calculated for normalization (during the ldquoTrainingrdquo phase) During the ldquoTestingrdquo phase distances betweentemplates and test patterns within test-signal sliding windows are calculated

[31 32] Between two signals 119860 and 119861 with 119871119860 and 119871119861 asthe respective signal lengths distances for each metric aredefined as follows

Root-mean-square error

119889rmse = radic1

119871sdot

119871

sum

119896=1

119860 (119896) minus 119861 (119896)2 (3)

Correlation

119889corr =sum119871119896=1 119860 (119896) minus 119860 sdot 119861 (119896) minus 119861

radicsum119871119896=1 119860 (119896) minus 119860

2sdot radicsum119871119896=1 119861 (119896) minus 119861

2

(4)

Kurtosis

119889ku =

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

sum119871119860119896=1

119860 (119896) minus 1198604

119871119860 sdot 1205901198604

minus

sum119871119861119896=1

119861 (119896) minus 1198614

119871119861 sdot 1205901198614

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

(5)

where 119860(119896) and 119861(119896) denote 119896th data in signals 119860 and 119861respectively Note that RMSE and correlation are calculableonly for identical signal lengths Thus a common variable 119871

was used to represent the signal length in (3) and (4)

24 Dynamic Time Warping In spite of various modifica-tions of DTW in previous decades original kernel modelsfor calculating distance are still being widely used in manyapplications In this study we adopted a common implemen-tation of DTW [19] and empirically determined parametersfor slope constraintsThe DTWdistance between two signalsis defined as

119889dtw = 120591 (119871119860 119871119861) (6)

where 119871119860 and 119871119861 are respective template and test patternlengths and 120591(119894 119895) is the distance between two subsignals119860(119896) | 1 le 119896 le 119894 and 119861(119896) | 1 le 119896 le 119895 defined as

120591 (119894 119895) =1003816100381610038161003816119860 (119894) minus 119860 (1) minus 119861 (119895) minus 119861 (1)

1003816100381610038161003816

+min119888

120591 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888))

(7)

where 120591(1 1) = 0 and 119862119860(119888) and 119862119861(119888) are 119888th slope con-straints on pattern axes which limit the number of skipping(jumping) data points 119862119860119861(119888) denotes the 119888th pair of theslope constraints on template and test pattern axes and canbe written as

119862119860119861 = (1119898) (119898 1) | 1 le 119898 le 119872 (8)

where119872 is the maximum branch length of slope constraintsNote that the values at the starting points of the two patternsare adjusted to be overlapped

4 Journal of Applied Mathematics

Valu

e

Time

Matching

120572

120573

119834

bc

d

(a)

Valu

e

Time

Warping

120572

120573

119834 119834998400

b c

d

(b)

Warping

Time

Valu

e

120572

120573

119834

119834998400

b

cd

(c)Figure 2 Schematic illustrations for elucidating dynamic time warping and positional warping for one-dimensional data matching (a) twosignals 120572 (solid line) and 120573 (dashed line) are compared and considered a pair of corresponding points (b) Time warping in DTW a is warpedto a1015840 by time shifting (c) Positional and time warping in DPW a is warped to a1015840 to be overlapped onto b

25 Dynamic Positional Warping (DPW) DPW was orig-inally proposed for accurate quantification of differencesbetween two-dimensional data such as an objectrsquos contouror handwritten characters by searching similar subsequencesrecursively [27] When employed for one-dimensional datathe DPW distance between time series signals 119860 and 119861 canbe written as follows

119889dtw = 120591 (119871119860 119871119861) (9)

120591 (119894 119895) =10038161003816100381610038161003816119860 (119894) minus 119860 (119894prev) minus 119861 (119895) minus 119861 (119895prev)

10038161003816100381610038161003816+ 120596 (119894 119895)

(10)

119894prev = 119894 minus 119862119860 (119888min (119894 119895)) (11)

119895prev = 119895 minus 119862119861 (119888min (119894 119895)) (12)

119888min (119894 119895) = arg min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (13)

120596 (119894 119895) = min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (14)

where most notations are the same as those used in theoriginal DTW equations ((6) and (7)) In these equations119894prev and 119895prev represent preceding corresponding points thatminimize 120591(119894 119895) As shown in (9) and (10) the forms ofthe equations are the same as those of conventional DTW

equations except with regard to distance calculation betweentwo points Note that 119860(119894prev) and 119861(119895prev) are substituted for119860(1) and 119861(1) respectively in (10)

Figure 2 compares the mechanisms of DPW and DTWin one-dimensional data-matching applications When twosignals are compared and points a and b are matched as acorresponding pair (Figure 2(a)) DTW shifts a subsequencethat begins with a on the time axis such that the shifted pointis moved to the same time index as the subsequence startingwith b (Figure 2(b)) This process denoted as time warpingallows for distance calculation between points c and d byplacing them closely on time axis In the case of DPW uponmatching a and b the subsequence starting from a is warpedso that a is overlapped onto b Please note this subsequencewarping costs the distance (on the axis of ordinate) betweenthe two points a and b while the warping cost on the timeaxis is free (refer to [27] for more detailed description on theoriginal DPWmethod)

3 Results and Discussion

Receiver operating characteristic (ROC) curves were used tocompare pattern-detection performances among the varioustemplate matching approaches introduced in Section 2 Toevaluate ROC curves recall rates were evaluated with respect

Journal of Applied Mathematics 5

0 10 20 30 40 50 60 70 80 90 10010

20

30

40

50

60

70

80

90

100

Recall ()

Prec

ision

()

RMSECorrelationKurtosis

DTWDPW

Figure 3 ROC curves of five different methods

to fixed precision rates for each iteration of each participantThen for each precision rate recall rates were averaged acrossall the iterations and participants Figure 3 showsROCcurvesillustrating detection accuracies for five different methodsDPW showed the highest accuracy among all methodsinvestigated with an accuracy of 82 for equal precisionand recall rates DPW accuracy was 10 higher than thatfor conventional DTW (where accuracy rating was 72) andeven higher than those for conventional distance metrics(RMSE 49 correlation 34 and Kurtosis 11) Theseresults demonstrate that positional warping as has been usedfor two-dimensional pattern recognition problems mightbe also effective in one-dimensional pattern recognitionproblems

The extremely low accuracies of RMSE and correlationmay be surprising considering that both distance metricsare so commonly used for template matching applicationsThe poor performances found for both metrics are thoughtto partly originate from high target-pattern shape variationsIt is also possible that these poor performances were theresult of the chosen task being more difficult than typicaltasks Since the templates in the current task were selectedrandomly from ground-truth datasets there may have beenmany templates with irregular shapes Despite these difficultconditions the proposed DPW approach showed muchhigher detection accuracy than the DTW approach suggest-ing that DPW might be used as a new and powerful methodfor extracting specific signal patterns for EEG applications

Table 1 summarizes the best detection accuracies among20 iterations evaluated for each participant Accuracy wascalculated as the percentage of precision or recall for equalprecision and recall values in ROC curves When ROCcurveswere evaluated for each participant and best accuracieswere selected among the 20 iteration results the conven-tional methods based on correlation coefficients or RMSEsyielded better accuracies than the results shown in Figure 3

Nevertheless DPW still outperformed the other metricsranking the highest for 22 of 24 participants The averageddetection accuracy for DPW (9610) was 362 higher thanthat for DTW (9238)

In addition the influence of the number of templates ondetection accuracy was investigated The detection accuracywas evaluated by increasing the number of templates and thenaveraging across all iterations and participants (Table 2) Theresults show a weak influence of the number of templates ondetection accuracy Except for correlation accuracy did notchange significantly as the number of templates increasedInstead the standard deviations ofDTWandDPWdecreasedsignificantly demonstrating the possibility for more stablepattern detection by the use of sufficient numbers of tem-plates in DTW and DPW

4 Conclusion

In this paper we investigated whether DPW originally devel-oped for two-dimensional pattern recognition could be suc-cessfully employed for one-dimensional pattern recognitionTo validate our alternative hypothesis that DPW is effectivefor one-dimensional data analysis DPW was applied to theproblem of EEG eye-blink artifact detection DPW outper-formed conventional template matching methods includingDTW demonstrating that this positional warping methodwhich warps signals on both ordinate and abscissa axes isalso effective in one-dimensional pattern recognition Thisstudy suggests the possibility of applying DPW tomany othertypes of signal patterns and applicationsWe are also planningto combine DPW with other methodologies in our futurestudies

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

6 Journal of Applied Mathematics

Table 1 Best accuracies () evaluated for each participant among results from 20 iterations Best accuracy values for each participant are inbold font

Subject ID Correlation RMSE Kurtosis DTW DPW1 8696 6132 2286 9497 98552 8425 9067 3946 9760 98283 4919 6083 1598 7742 85274 6902 8438 1577 9365 95415 4928 7369 1845 8350 92396 2667 8444 1333 9000 91557 8072 9280 3095 9464 98668 8819 9286 4800 9801 100009 6296 9877 3134 9877 993810 7183 7133 1794 9357 951111 4000 8667 2071 9155 1000012 6132 9174 1324 9328 992613 5748 4188 1510 7921 965614 6083 7889 3019 9143 971415 6389 7607 1501 9436 986516 8063 9418 3405 9684 989517 6087 5401 2279 8428 808218 4030 8638 2400 9737 987219 6501 7208 1837 8981 949520 1759 7667 1769 9333 949421 7920 9167 2213 9251 979422 6311 4163 2510 9188 967023 6555 9023 2308 10000 980824 4099 9753 2071 9917 9917Average 6108 7878 2318 9238 9610

Table 2 Artifact detection accuracies () with respect to the number of templates for equal precision and recall

Number of templates Correlation RMSE Kurtosis DTW DPW1 4954 plusmn 2245 6165 plusmn 2842 965 plusmn 563 7758 plusmn 2244 8394 plusmn 2352

2 3437 plusmn 2754 6255 plusmn 2551 1174 plusmn 1101 6829 plusmn 2959 7823 plusmn 3035

3 2842 plusmn 2593 6160 plusmn 2508 1020 plusmn 721 7638 plusmn 2047 8606 plusmn 1706

4 2731 plusmn 2458 6042 plusmn 2552 988 plusmn 749 7551 plusmn 2007 8579 plusmn 1636

5 2384 plusmn 2228 5977 plusmn 2472 1077 plusmn 815 7464 plusmn 1979 8592 plusmn 1624

6 2489 plusmn 2147 5890 plusmn 2572 1047 plusmn 835 7749 plusmn 1744 8663 plusmn 1541

7 2576 plusmn 2291 5844 plusmn 2509 1037 plusmn 814 7609 plusmn 1764 8642 plusmn 1574

8 2535 plusmn 2223 5859 plusmn 2525 1085 plusmn 874 7680 plusmn 1732 8687 plusmn 1460

9 2456 plusmn 2088 5965 plusmn 2445 1108 plusmn 890 7792 plusmn 1512 8713 plusmn 1416

10 2417 plusmn 1933 5949 plusmn 2537 1069 plusmn 917 7868 plusmn 1535 8654 plusmn 1525

Acknowledgments

This work was supported in part by the IT RampD program ofMSIPKEIT (KI10045461 Development of Cultural ContentsEvaluationTechnologyBased onReal-TimeBiosignal ofMul-tiple Subjects) in part by the IT RampD program of MOTIEMISPKEIT (10045452 Development of Multimodal Brain-Machine Interface SystemBased onUser Intent Recognition)and in part by the National Research Foundation of Korea(NRF) funded by the Ministry of Science ICT and FuturePlanning (NRF-2012R1A2A2A03045395)

References

[1] A Goshtasby ldquoTemplate matching in rotated imagesrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol7 no 3 pp 338ndash344 1985

[2] J Frank S Mannor J Pineau and D Precup ldquoTime seriesanalysis using geometric templatematchingrdquo IEEETransactionson Pattern Analysis and Machine Intelligence vol 35 no 3 pp740ndash754 2013

[3] S Omachi and M Omachi ldquoFast template matching withpolynomialsrdquo IEEETransactions on Image Processing vol 16 no8 pp 2139ndash2149 2007

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

4 Journal of Applied Mathematics

Valu

e

Time

Matching

120572

120573

119834

bc

d

(a)

Valu

e

Time

Warping

120572

120573

119834 119834998400

b c

d

(b)

Warping

Time

Valu

e

120572

120573

119834

119834998400

b

cd

(c)Figure 2 Schematic illustrations for elucidating dynamic time warping and positional warping for one-dimensional data matching (a) twosignals 120572 (solid line) and 120573 (dashed line) are compared and considered a pair of corresponding points (b) Time warping in DTW a is warpedto a1015840 by time shifting (c) Positional and time warping in DPW a is warped to a1015840 to be overlapped onto b

25 Dynamic Positional Warping (DPW) DPW was orig-inally proposed for accurate quantification of differencesbetween two-dimensional data such as an objectrsquos contouror handwritten characters by searching similar subsequencesrecursively [27] When employed for one-dimensional datathe DPW distance between time series signals 119860 and 119861 canbe written as follows

119889dtw = 120591 (119871119860 119871119861) (9)

120591 (119894 119895) =10038161003816100381610038161003816119860 (119894) minus 119860 (119894prev) minus 119861 (119895) minus 119861 (119895prev)

10038161003816100381610038161003816+ 120596 (119894 119895)

(10)

119894prev = 119894 minus 119862119860 (119888min (119894 119895)) (11)

119895prev = 119895 minus 119862119861 (119888min (119894 119895)) (12)

119888min (119894 119895) = arg min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (13)

120596 (119894 119895) = min119888

120593 (119894 minus 119862119860 (119888) 119895 minus 119862119861 (119888)) (14)

where most notations are the same as those used in theoriginal DTW equations ((6) and (7)) In these equations119894prev and 119895prev represent preceding corresponding points thatminimize 120591(119894 119895) As shown in (9) and (10) the forms ofthe equations are the same as those of conventional DTW

equations except with regard to distance calculation betweentwo points Note that 119860(119894prev) and 119861(119895prev) are substituted for119860(1) and 119861(1) respectively in (10)

Figure 2 compares the mechanisms of DPW and DTWin one-dimensional data-matching applications When twosignals are compared and points a and b are matched as acorresponding pair (Figure 2(a)) DTW shifts a subsequencethat begins with a on the time axis such that the shifted pointis moved to the same time index as the subsequence startingwith b (Figure 2(b)) This process denoted as time warpingallows for distance calculation between points c and d byplacing them closely on time axis In the case of DPW uponmatching a and b the subsequence starting from a is warpedso that a is overlapped onto b Please note this subsequencewarping costs the distance (on the axis of ordinate) betweenthe two points a and b while the warping cost on the timeaxis is free (refer to [27] for more detailed description on theoriginal DPWmethod)

3 Results and Discussion

Receiver operating characteristic (ROC) curves were used tocompare pattern-detection performances among the varioustemplate matching approaches introduced in Section 2 Toevaluate ROC curves recall rates were evaluated with respect

Journal of Applied Mathematics 5

0 10 20 30 40 50 60 70 80 90 10010

20

30

40

50

60

70

80

90

100

Recall ()

Prec

ision

()

RMSECorrelationKurtosis

DTWDPW

Figure 3 ROC curves of five different methods

to fixed precision rates for each iteration of each participantThen for each precision rate recall rates were averaged acrossall the iterations and participants Figure 3 showsROCcurvesillustrating detection accuracies for five different methodsDPW showed the highest accuracy among all methodsinvestigated with an accuracy of 82 for equal precisionand recall rates DPW accuracy was 10 higher than thatfor conventional DTW (where accuracy rating was 72) andeven higher than those for conventional distance metrics(RMSE 49 correlation 34 and Kurtosis 11) Theseresults demonstrate that positional warping as has been usedfor two-dimensional pattern recognition problems mightbe also effective in one-dimensional pattern recognitionproblems

The extremely low accuracies of RMSE and correlationmay be surprising considering that both distance metricsare so commonly used for template matching applicationsThe poor performances found for both metrics are thoughtto partly originate from high target-pattern shape variationsIt is also possible that these poor performances were theresult of the chosen task being more difficult than typicaltasks Since the templates in the current task were selectedrandomly from ground-truth datasets there may have beenmany templates with irregular shapes Despite these difficultconditions the proposed DPW approach showed muchhigher detection accuracy than the DTW approach suggest-ing that DPW might be used as a new and powerful methodfor extracting specific signal patterns for EEG applications

Table 1 summarizes the best detection accuracies among20 iterations evaluated for each participant Accuracy wascalculated as the percentage of precision or recall for equalprecision and recall values in ROC curves When ROCcurveswere evaluated for each participant and best accuracieswere selected among the 20 iteration results the conven-tional methods based on correlation coefficients or RMSEsyielded better accuracies than the results shown in Figure 3

Nevertheless DPW still outperformed the other metricsranking the highest for 22 of 24 participants The averageddetection accuracy for DPW (9610) was 362 higher thanthat for DTW (9238)

In addition the influence of the number of templates ondetection accuracy was investigated The detection accuracywas evaluated by increasing the number of templates and thenaveraging across all iterations and participants (Table 2) Theresults show a weak influence of the number of templates ondetection accuracy Except for correlation accuracy did notchange significantly as the number of templates increasedInstead the standard deviations ofDTWandDPWdecreasedsignificantly demonstrating the possibility for more stablepattern detection by the use of sufficient numbers of tem-plates in DTW and DPW

4 Conclusion

In this paper we investigated whether DPW originally devel-oped for two-dimensional pattern recognition could be suc-cessfully employed for one-dimensional pattern recognitionTo validate our alternative hypothesis that DPW is effectivefor one-dimensional data analysis DPW was applied to theproblem of EEG eye-blink artifact detection DPW outper-formed conventional template matching methods includingDTW demonstrating that this positional warping methodwhich warps signals on both ordinate and abscissa axes isalso effective in one-dimensional pattern recognition Thisstudy suggests the possibility of applying DPW tomany othertypes of signal patterns and applicationsWe are also planningto combine DPW with other methodologies in our futurestudies

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

6 Journal of Applied Mathematics

Table 1 Best accuracies () evaluated for each participant among results from 20 iterations Best accuracy values for each participant are inbold font

Subject ID Correlation RMSE Kurtosis DTW DPW1 8696 6132 2286 9497 98552 8425 9067 3946 9760 98283 4919 6083 1598 7742 85274 6902 8438 1577 9365 95415 4928 7369 1845 8350 92396 2667 8444 1333 9000 91557 8072 9280 3095 9464 98668 8819 9286 4800 9801 100009 6296 9877 3134 9877 993810 7183 7133 1794 9357 951111 4000 8667 2071 9155 1000012 6132 9174 1324 9328 992613 5748 4188 1510 7921 965614 6083 7889 3019 9143 971415 6389 7607 1501 9436 986516 8063 9418 3405 9684 989517 6087 5401 2279 8428 808218 4030 8638 2400 9737 987219 6501 7208 1837 8981 949520 1759 7667 1769 9333 949421 7920 9167 2213 9251 979422 6311 4163 2510 9188 967023 6555 9023 2308 10000 980824 4099 9753 2071 9917 9917Average 6108 7878 2318 9238 9610

Table 2 Artifact detection accuracies () with respect to the number of templates for equal precision and recall

Number of templates Correlation RMSE Kurtosis DTW DPW1 4954 plusmn 2245 6165 plusmn 2842 965 plusmn 563 7758 plusmn 2244 8394 plusmn 2352

2 3437 plusmn 2754 6255 plusmn 2551 1174 plusmn 1101 6829 plusmn 2959 7823 plusmn 3035

3 2842 plusmn 2593 6160 plusmn 2508 1020 plusmn 721 7638 plusmn 2047 8606 plusmn 1706

4 2731 plusmn 2458 6042 plusmn 2552 988 plusmn 749 7551 plusmn 2007 8579 plusmn 1636

5 2384 plusmn 2228 5977 plusmn 2472 1077 plusmn 815 7464 plusmn 1979 8592 plusmn 1624

6 2489 plusmn 2147 5890 plusmn 2572 1047 plusmn 835 7749 plusmn 1744 8663 plusmn 1541

7 2576 plusmn 2291 5844 plusmn 2509 1037 plusmn 814 7609 plusmn 1764 8642 plusmn 1574

8 2535 plusmn 2223 5859 plusmn 2525 1085 plusmn 874 7680 plusmn 1732 8687 plusmn 1460

9 2456 plusmn 2088 5965 plusmn 2445 1108 plusmn 890 7792 plusmn 1512 8713 plusmn 1416

10 2417 plusmn 1933 5949 plusmn 2537 1069 plusmn 917 7868 plusmn 1535 8654 plusmn 1525

Acknowledgments

This work was supported in part by the IT RampD program ofMSIPKEIT (KI10045461 Development of Cultural ContentsEvaluationTechnologyBased onReal-TimeBiosignal ofMul-tiple Subjects) in part by the IT RampD program of MOTIEMISPKEIT (10045452 Development of Multimodal Brain-Machine Interface SystemBased onUser Intent Recognition)and in part by the National Research Foundation of Korea(NRF) funded by the Ministry of Science ICT and FuturePlanning (NRF-2012R1A2A2A03045395)

References

[1] A Goshtasby ldquoTemplate matching in rotated imagesrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol7 no 3 pp 338ndash344 1985

[2] J Frank S Mannor J Pineau and D Precup ldquoTime seriesanalysis using geometric templatematchingrdquo IEEETransactionson Pattern Analysis and Machine Intelligence vol 35 no 3 pp740ndash754 2013

[3] S Omachi and M Omachi ldquoFast template matching withpolynomialsrdquo IEEETransactions on Image Processing vol 16 no8 pp 2139ndash2149 2007

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

Journal of Applied Mathematics 5

0 10 20 30 40 50 60 70 80 90 10010

20

30

40

50

60

70

80

90

100

Recall ()

Prec

ision

()

RMSECorrelationKurtosis

DTWDPW

Figure 3 ROC curves of five different methods

to fixed precision rates for each iteration of each participantThen for each precision rate recall rates were averaged acrossall the iterations and participants Figure 3 showsROCcurvesillustrating detection accuracies for five different methodsDPW showed the highest accuracy among all methodsinvestigated with an accuracy of 82 for equal precisionand recall rates DPW accuracy was 10 higher than thatfor conventional DTW (where accuracy rating was 72) andeven higher than those for conventional distance metrics(RMSE 49 correlation 34 and Kurtosis 11) Theseresults demonstrate that positional warping as has been usedfor two-dimensional pattern recognition problems mightbe also effective in one-dimensional pattern recognitionproblems

The extremely low accuracies of RMSE and correlationmay be surprising considering that both distance metricsare so commonly used for template matching applicationsThe poor performances found for both metrics are thoughtto partly originate from high target-pattern shape variationsIt is also possible that these poor performances were theresult of the chosen task being more difficult than typicaltasks Since the templates in the current task were selectedrandomly from ground-truth datasets there may have beenmany templates with irregular shapes Despite these difficultconditions the proposed DPW approach showed muchhigher detection accuracy than the DTW approach suggest-ing that DPW might be used as a new and powerful methodfor extracting specific signal patterns for EEG applications

Table 1 summarizes the best detection accuracies among20 iterations evaluated for each participant Accuracy wascalculated as the percentage of precision or recall for equalprecision and recall values in ROC curves When ROCcurveswere evaluated for each participant and best accuracieswere selected among the 20 iteration results the conven-tional methods based on correlation coefficients or RMSEsyielded better accuracies than the results shown in Figure 3

Nevertheless DPW still outperformed the other metricsranking the highest for 22 of 24 participants The averageddetection accuracy for DPW (9610) was 362 higher thanthat for DTW (9238)

In addition the influence of the number of templates ondetection accuracy was investigated The detection accuracywas evaluated by increasing the number of templates and thenaveraging across all iterations and participants (Table 2) Theresults show a weak influence of the number of templates ondetection accuracy Except for correlation accuracy did notchange significantly as the number of templates increasedInstead the standard deviations ofDTWandDPWdecreasedsignificantly demonstrating the possibility for more stablepattern detection by the use of sufficient numbers of tem-plates in DTW and DPW

4 Conclusion

In this paper we investigated whether DPW originally devel-oped for two-dimensional pattern recognition could be suc-cessfully employed for one-dimensional pattern recognitionTo validate our alternative hypothesis that DPW is effectivefor one-dimensional data analysis DPW was applied to theproblem of EEG eye-blink artifact detection DPW outper-formed conventional template matching methods includingDTW demonstrating that this positional warping methodwhich warps signals on both ordinate and abscissa axes isalso effective in one-dimensional pattern recognition Thisstudy suggests the possibility of applying DPW tomany othertypes of signal patterns and applicationsWe are also planningto combine DPW with other methodologies in our futurestudies

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

6 Journal of Applied Mathematics

Table 1 Best accuracies () evaluated for each participant among results from 20 iterations Best accuracy values for each participant are inbold font

Subject ID Correlation RMSE Kurtosis DTW DPW1 8696 6132 2286 9497 98552 8425 9067 3946 9760 98283 4919 6083 1598 7742 85274 6902 8438 1577 9365 95415 4928 7369 1845 8350 92396 2667 8444 1333 9000 91557 8072 9280 3095 9464 98668 8819 9286 4800 9801 100009 6296 9877 3134 9877 993810 7183 7133 1794 9357 951111 4000 8667 2071 9155 1000012 6132 9174 1324 9328 992613 5748 4188 1510 7921 965614 6083 7889 3019 9143 971415 6389 7607 1501 9436 986516 8063 9418 3405 9684 989517 6087 5401 2279 8428 808218 4030 8638 2400 9737 987219 6501 7208 1837 8981 949520 1759 7667 1769 9333 949421 7920 9167 2213 9251 979422 6311 4163 2510 9188 967023 6555 9023 2308 10000 980824 4099 9753 2071 9917 9917Average 6108 7878 2318 9238 9610

Table 2 Artifact detection accuracies () with respect to the number of templates for equal precision and recall

Number of templates Correlation RMSE Kurtosis DTW DPW1 4954 plusmn 2245 6165 plusmn 2842 965 plusmn 563 7758 plusmn 2244 8394 plusmn 2352

2 3437 plusmn 2754 6255 plusmn 2551 1174 plusmn 1101 6829 plusmn 2959 7823 plusmn 3035

3 2842 plusmn 2593 6160 plusmn 2508 1020 plusmn 721 7638 plusmn 2047 8606 plusmn 1706

4 2731 plusmn 2458 6042 plusmn 2552 988 plusmn 749 7551 plusmn 2007 8579 plusmn 1636

5 2384 plusmn 2228 5977 plusmn 2472 1077 plusmn 815 7464 plusmn 1979 8592 plusmn 1624

6 2489 plusmn 2147 5890 plusmn 2572 1047 plusmn 835 7749 plusmn 1744 8663 plusmn 1541

7 2576 plusmn 2291 5844 plusmn 2509 1037 plusmn 814 7609 plusmn 1764 8642 plusmn 1574

8 2535 plusmn 2223 5859 plusmn 2525 1085 plusmn 874 7680 plusmn 1732 8687 plusmn 1460

9 2456 plusmn 2088 5965 plusmn 2445 1108 plusmn 890 7792 plusmn 1512 8713 plusmn 1416

10 2417 plusmn 1933 5949 plusmn 2537 1069 plusmn 917 7868 plusmn 1535 8654 plusmn 1525

Acknowledgments

This work was supported in part by the IT RampD program ofMSIPKEIT (KI10045461 Development of Cultural ContentsEvaluationTechnologyBased onReal-TimeBiosignal ofMul-tiple Subjects) in part by the IT RampD program of MOTIEMISPKEIT (10045452 Development of Multimodal Brain-Machine Interface SystemBased onUser Intent Recognition)and in part by the National Research Foundation of Korea(NRF) funded by the Ministry of Science ICT and FuturePlanning (NRF-2012R1A2A2A03045395)

References

[1] A Goshtasby ldquoTemplate matching in rotated imagesrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol7 no 3 pp 338ndash344 1985

[2] J Frank S Mannor J Pineau and D Precup ldquoTime seriesanalysis using geometric templatematchingrdquo IEEETransactionson Pattern Analysis and Machine Intelligence vol 35 no 3 pp740ndash754 2013

[3] S Omachi and M Omachi ldquoFast template matching withpolynomialsrdquo IEEETransactions on Image Processing vol 16 no8 pp 2139ndash2149 2007

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

6 Journal of Applied Mathematics

Table 1 Best accuracies () evaluated for each participant among results from 20 iterations Best accuracy values for each participant are inbold font

Subject ID Correlation RMSE Kurtosis DTW DPW1 8696 6132 2286 9497 98552 8425 9067 3946 9760 98283 4919 6083 1598 7742 85274 6902 8438 1577 9365 95415 4928 7369 1845 8350 92396 2667 8444 1333 9000 91557 8072 9280 3095 9464 98668 8819 9286 4800 9801 100009 6296 9877 3134 9877 993810 7183 7133 1794 9357 951111 4000 8667 2071 9155 1000012 6132 9174 1324 9328 992613 5748 4188 1510 7921 965614 6083 7889 3019 9143 971415 6389 7607 1501 9436 986516 8063 9418 3405 9684 989517 6087 5401 2279 8428 808218 4030 8638 2400 9737 987219 6501 7208 1837 8981 949520 1759 7667 1769 9333 949421 7920 9167 2213 9251 979422 6311 4163 2510 9188 967023 6555 9023 2308 10000 980824 4099 9753 2071 9917 9917Average 6108 7878 2318 9238 9610

Table 2 Artifact detection accuracies () with respect to the number of templates for equal precision and recall

Number of templates Correlation RMSE Kurtosis DTW DPW1 4954 plusmn 2245 6165 plusmn 2842 965 plusmn 563 7758 plusmn 2244 8394 plusmn 2352

2 3437 plusmn 2754 6255 plusmn 2551 1174 plusmn 1101 6829 plusmn 2959 7823 plusmn 3035

3 2842 plusmn 2593 6160 plusmn 2508 1020 plusmn 721 7638 plusmn 2047 8606 plusmn 1706

4 2731 plusmn 2458 6042 plusmn 2552 988 plusmn 749 7551 plusmn 2007 8579 plusmn 1636

5 2384 plusmn 2228 5977 plusmn 2472 1077 plusmn 815 7464 plusmn 1979 8592 plusmn 1624

6 2489 plusmn 2147 5890 plusmn 2572 1047 plusmn 835 7749 plusmn 1744 8663 plusmn 1541

7 2576 plusmn 2291 5844 plusmn 2509 1037 plusmn 814 7609 plusmn 1764 8642 plusmn 1574

8 2535 plusmn 2223 5859 plusmn 2525 1085 plusmn 874 7680 plusmn 1732 8687 plusmn 1460

9 2456 plusmn 2088 5965 plusmn 2445 1108 plusmn 890 7792 plusmn 1512 8713 plusmn 1416

10 2417 plusmn 1933 5949 plusmn 2537 1069 plusmn 917 7868 plusmn 1535 8654 plusmn 1525

Acknowledgments

This work was supported in part by the IT RampD program ofMSIPKEIT (KI10045461 Development of Cultural ContentsEvaluationTechnologyBased onReal-TimeBiosignal ofMul-tiple Subjects) in part by the IT RampD program of MOTIEMISPKEIT (10045452 Development of Multimodal Brain-Machine Interface SystemBased onUser Intent Recognition)and in part by the National Research Foundation of Korea(NRF) funded by the Ministry of Science ICT and FuturePlanning (NRF-2012R1A2A2A03045395)

References

[1] A Goshtasby ldquoTemplate matching in rotated imagesrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol7 no 3 pp 338ndash344 1985

[2] J Frank S Mannor J Pineau and D Precup ldquoTime seriesanalysis using geometric templatematchingrdquo IEEETransactionson Pattern Analysis and Machine Intelligence vol 35 no 3 pp740ndash754 2013

[3] S Omachi and M Omachi ldquoFast template matching withpolynomialsrdquo IEEETransactions on Image Processing vol 16 no8 pp 2139ndash2149 2007

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

Journal of Applied Mathematics 7

[4] J-H Chen C-S Chen and Y-S Chen ldquoFast algorithm forrobust template matching with M-estimatorsrdquo IEEE Transac-tions on Signal Processing vol 51 no 1 pp 230ndash243 2003

[5] K Peng L Chen S Ruan andGKukharev ldquoA robust algorithmfor eye detection on gray intensity face without spectaclesrdquoJournal of Computer Science amp Technology vol 5 no 3 pp 127ndash132 2005

[6] R Wagner and H L Galiana ldquoEvaluation of three templatematching algorithms for registering images of the eyerdquo IEEETransactions on Biomedical Engineering vol 39 no 12 pp 1313ndash1319 1992

[7] Z Lin and L S Davis ldquoShape-based human detection andsegmentation via hierarchical part-template matchingrdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol32 no 4 pp 604ndash618 2010

[8] T-C Fu F-L Chung R Luk and C-M Ng ldquoStock time seriespattern matching template-based vs rule-based approachesrdquoEngineering Applications of Artificial Intelligence vol 20 no 3pp 347ndash364 2007

[9] S D Connell and A K Jain ldquoTemplate-based online characterrecognitionrdquo Pattern Recognition vol 34 no 1 pp 1ndash14 2001

[10] M Faundez-Zanuy ldquoOn-line signature recognition based onVQ-DTWrdquo Pattern Recognition vol 40 no 3 pp 981ndash992 2007

[11] Y Li Z Ma W Lu and Y Li ldquoAutomatic removal of the eyeblink artifact from EEG using an ICA-based template matchingapproachrdquo Physiological Measurement vol 27 no 4 pp 425ndash436 2006

[12] A Aarabi K Kazemi R Grebe H A Moghaddam and FWallois ldquoDetection of EEG transients in neonates and olderchildren using a system based on dynamic time-warping tem-plate matching and spatial dipole clusteringrdquo NeuroImage vol48 no 1 pp 50ndash62 2009

[13] E Olejarczyk A Jozwik W Zmyslowski et al ldquoAutomaticdetection and analysis of the EEG sharp wave-slow wavepatterns evoked by fluorinated inhalation anestheticsrdquo ClinicalNeurophysiology vol 123 no 8 pp 1512ndash1522 2012

[14] H Nolan R Whelan and R B Reilly ldquoFASTER fully auto-mated statistical thresholding for EEG artifact rejectionrdquo Jour-nal of Neuroscience Methods vol 192 no 1 pp 152ndash162 2010

[15] A Delorme T Sejnowski and S Makeig ldquoEnhanced detectionof artifacts in EEG data using higher-order statistics andindependent component analysisrdquo NeuroImage vol 34 no 4pp 1443ndash1449 2007

[16] T A Camilleri K P Camilleri and S G Fabri ldquoAutomaticdetection of spindles and K-complexes in sleep EEG usingswitching multiple modelsrdquo Biomedical Signal Processing andControl vol 10 pp 117ndash127 2014

[17] G Wang G Worrell L Yang C Wilke and B He ldquoInterictalspike analysis of high-density eeg in patients with partialepilepsyrdquoClinical Neurophysiology vol 122 no 6 pp 1098ndash11052011

[18] M S Aldrich E AGarofalo and I Drury ldquoEpileptiform abnor-malities during sleep in Rett syndromerdquoElectroencephalographyand Clinical Neurophysiology vol 75 no 5 pp 365ndash370 1990

[19] L Rabiner and BH Juang Fundamentals of Speech RecognitionPrentice Hall New York NY USA 1993

[20] C Myers L R Rabiner and A E Rosenberg ldquoFully automatedstatistical thresholding for EEG artifact rejectionrdquo IEEE Trans-actions on Acoustics Speech and Signal Processing 1980

[21] N Alajlan I El Rube M S Kamel and G Freeman ldquoShaperetrieval using triangle-area representation and dynamic spacewarpingrdquo Pattern Recognition vol 40 no 7 pp 1911ndash1920 2007

[22] H Sahbi and N Boujemaa ldquoRobust face recognition usingdynamic space warpingrdquo in Biometric Authentication MTistarelli J Bigun andA K Jain Eds vol 2359 of LectureNotesin Computer Science pp 121ndash132 Springer 2002

[23] H Feng and C C Wah ldquoOnline signature verification usinga new extreme points warping techniquerdquo Pattern RecognitionLetters vol 24 no 16 pp 2943ndash2951 2003

[24] Y-S Jeong M K Jeong and O A Omitaomu ldquoWeighteddynamic time warping for time series classificationrdquo PatternRecognition vol 44 no 9 pp 2231ndash2240 2011

[25] B S Raghavendra D Bera A S Bopardikar and R NarayananldquoCardiac arrhythmia detection using dynamic time warping ofECG beats in e-healthcare systemsrdquo in Proceedings of the IEEEInternational Symposium on a World of Wireless Mobile andMultimedia Networks (WoWMoM rsquo11) pp 1ndash6 June 2011

[26] M Parizeau and R Plamondon ldquoComparative analysis ofregional correlation dynamic time warping and skeletal treematching for signature verificationrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 12 no 7 pp 710ndash716 1990

[27] W-D Chang and J Shin ldquoDynamic positional warpingdynamic time warping for online handwritingrdquo InternationalJournal of Pattern Recognition and Artificial Intelligence vol 23no 5 pp 967ndash986 2009

[28] H-C Huang and B H Jansen ldquoEEG waveform analysis bymeans of dynamic time-warpingrdquo International Journal of Bio-Medical Computing vol 17 no 2 pp 135ndash144 1985

[29] W-D C W D Chang and J S J Shin ldquoDPW approach forrandom forgery problem in online handwritten signature ver-ificationrdquo in Proceedings of the 4th International Conference onNetworked Computing and Advanced Information Management(NCM rsquo08) vol 1 pp 347ndash352 September 2008

[30] S Kim and J McNames ldquoAutomatic spike detection based onadaptive templatematching for extracellular neural recordingsrdquoJournal of Neuroscience Methods vol 165 no 2 pp 165ndash1742007

[31] T Akiyama M Osada M Isowa et al ldquoHigh kurtosis ofintracranial electroencephalogram as a marker of ictogenicityin pediatric epilepsy surgeryrdquo Clinical Neurophysiology vol 123no 1 pp 93ndash99 2012

[32] L Canuet R Ishii M Iwase et al ldquoMEG-SAMkurtosis analysisin the localization of the epileptogenic tuber in tuberoussclerosis a case reportrdquo International Congress Series vol 1300pp 653ndash656 2007

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Enhanced Template Matching Using Dynamic Positional Warping …cone.hanyang.ac.kr/BioEST/Kor/papers/JAM_2014_jwd.pdf · 2008-02-14 · ResearchArticle Enhanced Template Matching Using

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of