4Two-dimensionalFaceRecognition4.1FeatureLocalizationBeforediscussingthemethodsofcomparingtwofacialimageswenowtakeabrieflookatsomeatthepreliminaryprocessesoffacialfeaturealignment.Thisprocesstypicallyconsistsoftwostages:facedetectionandeyelocalization.Dependingontheapplication,ifthepositionofthefacewithintheimageisknownbeforehand(foracooperativesubjectinadooraccesssystemforexample)thenthefacedetectionstagecanoftenbeskipped,astheregionofinterestisalreadyknown.Therefore,wediscusseyelocalizationhere,withabriefdiscussionoffacedetectionintheliteraturereview.Theeyelocalizationmethodisusedtoalignthe2Dfaceimagesofthevarioustestsetsusedthroughoutthissection.However,toensurethatallresultspresentedarerepresentativeofthefacerecognitionaccuracyandnotaproductoftheperformanceoftheeyelocalizationroutine,allimagealignmentsaremanuallycheckedandanyerrorscorrected,priortotestingandevaluation.Wedetectthepositionoftheeyeswithinanimageusingasimpletemplatebasedmethod.Atrainingsetofmanuallypre-alignedimagesoffacesistaken,andeachimagecroppedtoanareaaroundbotheyes.Theaverageimageiscalculatedandusedasatemplate.Figure4-1Theaverageeyes.Usedasatemplateforeyedetection.Botheyesareincludedinasingletemplate,ratherthanindividuallysearchingforeacheyeinturn,asthecharacteristicsymmetryoftheeyeseithersideofthenose,provideausefulfeaturethathelpsdistinguishbetweentheeyesandotherfalsepositivesthatmaybepickedupinthebackground.Althoughthismethodishighlysusceptibletoscale(i.e.subjectdistancefromthecamera)andalsointroducestheassumptionthateyesintheimageappearnearhorizontal.Somepreliminaryexperimentationalsorevealsthatitisadvantageoustoincludetheareaofskinjustbeneaththeeyes.Thereasonbeingthatinsomecasestheeyebrowscancloselymatchthetemplate,particularlyifthereareshadowsintheeye-sockets,buttheareaofskinbelowtheeyeshelpstodistinguishtheeyesfromeyebrows(theareajustbelowtheeyebrowscontaineyes,whereastheareabelowtheeyescontainsonlyplainskin).Awindowispassedoverthetestimagesandtheabsolutedifferencetakentothatoftheaverageeyeimageshownabove.Theareaoftheimagewiththelowestdifferenceistakenastheregionofinterestcontainingtheeyes.Applyingthesameprocedureusingasmallertemplateoftheindividualleftandrighteyesthenrefineseacheyeposition.Thisbasictemplate-basedmethodofeyelocalization,althoughprovidingfairlypreciselocalizations,oftenfailstolocatetheeyescompletely.However,weareabletoimproveperformancebyincludingaweightingscheme.Eyelocalizationisperformedonthesetoftrainingimages,whichisthenseparatedintotwosets:thoseinwhicheyedetectionwassuccessful;andthoseinwhicheyedetectionfailed.Takingthesetofsuccessfullocalizationswecomputetheaveragedistancefromtheeyetemplate(Figure4-2top).Notethattheimageisquitedark,indicatingthatthedetectedeyescorrelatecloselytotheeyetemplate,aswewouldexpect.However,brightpointsdooccurnearthewhitesoftheeye,suggestingthatthisareaisofteninconsistent,varyinggreatlyfromtheaverageeyetemplate.Figure4-2–Distancetotheeyetemplateforsuccessfuldetections(top)indicatingvarianceduetonoiseandfaileddetections(bottom)showingcrediblevarianceduetomiss-detectedfeatures.Inthelowerimage(Figure4-2bottom),wehavetakenthesetoffailedlocalizations(imagesoftheforehead,nose,cheeks,backgroundetc.falselydetectedbythelocalizationroutine)andonceagaincomputedtheaveragedistancefromtheeyetemplate.Thebrightpupilssurroundedbydarkerareasindicatethatafailed...