/
Interactive DeWeathering of an Image using Physical Models Srinivasa G Interactive DeWeathering of an Image using Physical Models Srinivasa G

Interactive DeWeathering of an Image using Physical Models Srinivasa G - PDF document

calandra-battersby
calandra-battersby . @calandra-battersby
Follow
475 views
Uploaded On 2014-12-19

Interactive DeWeathering of an Image using Physical Models Srinivasa G - PPT Presentation

Narasimhan and Shree K Nayar Computer Science Dept Columbia University New York NY 10027 Email srinivas nayar cscolumbiaedu Abstract Images of scenes acquired in bad weather have poor con trasts and colors It is known that the degradation of image q ID: 26451

Narasimhan and Shree

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Interactive DeWeathering of an Image usi..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Interactive(De)WeatheringofanImageusingPhysicalModelsSrinivasaG.NarasimhanandShreeK.NayarComputerScienceDept.,ColumbiaUniversity,NewYork,NY10027E-mail:srinivas,nayar@cs.columbia.eduAbstractImagesofscenesacquiredinbadweatherhavepoorcon-trastsandcolors.Itisknownthatthedegradationofimagequalityduetobadweatherisexponentialinthedepthsofthescenepoints.Therefore,restoringscenecolorsandcontrastsfromasingleimageofthesceneisinherentlyunder-constrained.Recently,ithasbeenshownthat RGB O FigureDichromaticatmosphericscatteringmodel.Theofascenepointonafoggyorhazyday,isalinearcombinationofthedirectionofdirecttransmission(clearday)color,andthedirectionofairlight(fogorhaze)color. Thedichromaticatmosphericscatteringmodel[3]statesthatthecolorofascenepointinfogorhaze,observedbyacolorcamera,isgivenbyalinearcombinationofthedirectionofairlight(fogorhaze)color,andtheofthecolorofthescenepointasseenonaclearday(seeillustrationin“gure1).Mathematically,(1)istheskybrightness,isradianceofthescenepointonaclearday,isthescatteringcoecientoftheatmosphereandisthedepthofthescenepoint.Notethatthedichromaticmodelassumesthatthescat-teringcoecientisthesameforallthecolorchan-nels.Also,observethattheproblemofdeweatheringanimage,bycomputingcleardaycolorssolelyfromobservedcolorvectorsisseverelyunder-constrained.Thecontrastormonochromemodel[4]givesamathe-maticalexpressionfortheintensityofascenepointinbadweather,asrecordedbyamonochromecamera:(2)Ascanbeseenfromboththemodels,thecolorandcontrastofascenepointdegradeexponentiallywithitsdepthfromtheobserver.Hence,traditionalspacein-varianttechniquesforcolorandcontrastenhancementcannotbeusedtosatisfactorilydeweatherimages.Inthefollowingsections,wedescribeourinteractivetech-niquesforimagedeweatheringusingsimpleinputsfromtheuser. Notethatthesemodelsarebasedonsingle-scatteringandhencearenotvalidforturbulenceandaerosolblurringandscat-teringbypollutants.Iftheatmosphereisnon-homogeneousalongthelineofsight,willbeafunctionofdepth.Thenscaledisreplacedbyopticalthicknessdx.3DichromaticColorTransferConsiderascenewithpointsatdierentdepthsbutwithsimilarcleardaycolors.Forinstance,treesatdier-entdistances,orbuildingsatdierentdepths,mayhavesimilarcolordirections(althoughtheirmagnitudesmayvary)onaclearday.Inthisscenario,thecolorsofnearscenepointsarelesscorruptedbybadweatherascom-paredtothedistantscenepoints.Wenowdescribeanalgorithmtotransfercolorsfromnearbyregionstore-placecolorsofregionsthataremosteectedbybadweather,inaphysicallyconsistentmanner.Inotherwords,weimposeconstraintsbasedonthedichromaticmodel(1)toselectcolorsofnearscenepointstoreplacecolorsoffarscenepoints.3.1InteractiveStepOnlytwomanualinputsarenecessaryforthecolortransferalgorithm.First,weselectanearbygoodŽregionintheimage,wherecolorsarenotcorrupted(or,minimallyaltered)bybadweather,asshownbythewhiterectanglein“gure2(a).Then,wemarkaregion(say,sky)thatmostresemblesthecolorofairlight,asshownbytheblackrectanglein“gure2(a).Theaver-agecolorwithinthisregioniscomputedtoestimatetheofairlightcolor.3.2AutomatedStepForeachpixel,withcolor,intheweathereectedre-gion,wesearchforthebestmatchingcolorinthegoodŽregion.ThesearchisrestrictedtoasetofpixelsinthegoodŽregionthatsatisfythedichromaticplanarity(1),Fromthisset,wechooseapixelwhosecolorisfar-thest(intermsofangle)fromthefogcolor,usingInordertocomputethemagnitudeofthecolorusedtoreplacethepixel,weusethedichromaticmodel(1)todecomposethescenecolorintotwocomponents:Finally,wereplacethecolorofthepixelbythedeweatheredcolor,Notethattheambiguitiesinthedichromaticmodelarebrokenduetothepresenceofsimilarcoloredscenepointsatdierentdistances.Thisalgorithmdoesnotrequireanyinformationregard-ingscenedepthsoratmosphericconditions.Further,it Ifsucharegiondoesnotexistintheimage,thentheusermayprovidethehueoftheskyandassumetheskyintensitytobethemaximumintensityintheimage.Anotherwayofcomputingthecolorofairlightisbyintersectingdichromaticplanesoftwodierentuserprovidedscenecolors[3]. (a)Input:Mistyimage(b)Output:Colorcorrectedimage UserselectedGoodcolorregionUserselectedAirlightcolor FigureColorcorrectionbydichromaticcolortransfer.(a)Inputmistyimageconsistingofgreenbushesatdierentdistances.AregionofgoodŽcolorismarkedinthewhiterectangle.Aregionthatmostresemblesthecolorofmistismarkedintheblackrectangle.(b)ColorsfromtheneargoodŽregionaretransferedtofartherregions.Noticethebluishcolorsofthefartherbushesreplacedbygreenishcolors. doesnotassumehomogeneityoftheatmosphereovertheentire“eldofview.Theresultofapplyingthismethodisshownin“gure2(b).Noticethesigni“cantchangeinthecolorsofthefarbushes.4DeweatheringusingDepthHeuristicsAlimitationofthecolortransfermethodisthatallcol-orsintheweathereectedregionmaynothavecorre-spondingcolorsinthegoodŽcolorregion.Inthissec-tion,wedescribedeweatheringusingheuristicsonscenedepths.Notethatsubtleweathereectswithinsmalldepthrangesarenotcapturedbyacamerawithlimiteddynamicrange(say,8bits).Therefore,precisedistancesarenotrequiredforeectivedeweathering.Moreover,inmanycases,itmaybepossibletoinputapproximatetrendsŽinthedepthsofscenepoints(say,thedirectionofincreasingdepths).Forinstance,ascenewithastreetalongtheviewingdirectioniscommoninsurveillanceortrackingscenarios(see“gure6).Thedeweatheringal-gorithmisdetailedbelow.4.1InteractiveStepWeselectaregionoftheskytoobtaintheskyintensity(andskycolordirection,iftheinputisacolorim-age).Then,thedepthtrendŽisinteractivelyspeci“edinthefollowingmanner.First,weinputtheapproxi-matelocationofavanishingpointalongthedirectionofincreasingdistanceintheimage(seeredcirclein“g-ure4).Thedistancesofthescenepointsareinverselyrelatedtotheirimagedistancestothevanishingpoint.Next,weinputtheapproximateminimumandmaxi-mumdistancesandinterpolatedistances(say,usingalinearorquadraticfunction)forpointsinbetween.Forillustrationpurposes,weusedminmin(3)1)isthefractionalimagedistancefromapixeltothevanishingpoint.ForandforminTheresultingdepthtrendisshownin“gure3(a).4.2AutomatedStepConsiderthemodelgiveninequation2.Ateverypixel,thedepthestimateisknown,andtheskybrightnessismeasured.Generally,theatmosphereconditionremainsconstant(orvariesslowly)oversmalldistancerangesand“eldsofviewthatarerelevanttocomputervisionapplications.Ifweassumehomogeneityoftheat-mosphere,thenthescatteringcoecientisconstantforallpixelsintheimage.Then,notethatdierentvaluesofthescatteringcoecientproducetheeectsofdierentdensitiesofbadweather(moderate,heavy,etc.).Thus,bycontinuouslychanging(imagineasliderinAdobePhotoshop),wecanprogressivelyes-timatethecleardayradiancesateachpixelas,s,EŠE(1ŠeŠd)]ed.(4)Similarly,notethatthedichromaticmodel(equation1)canbeusedtorestorecolorsinanRGBimage.There-fore,whilethecolortransfermethodcanbeappliedonlytocolorimages,thismethodcanbeappliedtobothcolorandgray-scaleimages.Inthiscase,thehomogeneityoftheatmospherebreakstheambiguityindeweatheringanTheresultsshownin“gures4,5and6illus-tratethatapproximatedepthinformationcanbeusedeectivelyforimagedeweathering.5RestorationusingPlanarDepthSegmentsIntheprevioussection,wedescribedaninteractivetech-niquewheredepthtrendscanbefollowed.However, 0.5 1 1.5 2 2.5 Sky region 1 1.5 2 2.5 3 1 1.5 2 2.5 3 (a)(b)(c)FigureDepthheuristicsusedtodeweatherimagesshownin“gures4,5and6respectively.Thevanishingpointcorrespondingtothedirectionofincreasingdistancesismarked.Approximateminimumandmaximumdistancesareinputtothealgorithmandtheintermediatedistancesareinterpolated.Thedepthsarenotusedforskyregions(emptyspaces). (a)Input:Mistyimage(c)Zoomed-inregionsof(a)(b)Output:Deweatheringtodifferentextents(bychoosingdifferentvaluesfor)(d)Contrastandcolorrestorationinzoomed-inregions. UserselectedVanishingPointUserselectedSkyBrightness FigureRestoringcleardayscenecolorsusingdepthheuristics.(a)Inputimagecapturedinmist.Thecolorsandcontrastsofscenepoints,especiallyinfartherregions,arecorruptedseverely.(b)Twoimagesillustratingdierentamountsofmistremovedfromtheimagein(a).TheseimageswerecomputedusingthedepthtrendŽshownin“gure3(a).(c)Zoomedinregionsselectedfrom(a)atdierentdepthsshowingdierentamountsofmist.(d)Correspondingzoomedinregionsofthedeweatheredimages.Noticethesigni“cantcolorandcontrastenhancement. (a)Input:Mistyimage(c)Zoomed-inregionsof(a)(b)Output:Deweatheringtodifferentextents(bychoosingdifferentvaluesfor)(d)Contrastandcolorrestorationinzoomed-inregions. UserselectedVanishingPointUserselectedSkyBrightnessFigureRestoringcleardayscenecolorsusingdepthheuristics.(a)Inputimagecapturedinmist.Thecolorsandcontrastsofscenepoints,especiallyinfartherregions,arecorruptedseverely.(b)Twoimagesillustratingdierentamountsofmistremovedfromtheimagein(a).TheseimageswerecomputedusingthedepthtrendŽshownin“gure3(b).(c)Zoomedinregionsselectedfrom(a)atdierentdepthsshowingdierentamountsofmist.(d)Correspondingzoomedinregionsofthedeweatheredimages.Noticethesigni“cantcolorandcontrastenhancement. urbansceneswithstrongdepthdiscontinuitiesandse-vereocclusions(inducedbydierentbuildings)arenotsuitableforthepreviousapproachwheredepthtrendsweresmoothlyinterpolated.Insuchcases,itisbet-tertoprovidearoughdepthsegmentationofthescene.Recallthatprecisedepthinformationisnotneededtodeweatherimages.Forinstance,thebrightnesslevelsoffogforafrontalplanarsurfaceareapproximatelyequaltothebrightnesslevelsforacurvedsurfaceatthesamedistance.Thus,planardepthsegmentsshouldsucefordeweatheringinurbanscenes(see“gure7(b)).Thedeweatheringalgorithmissimilartotheonepre-sentedintheprevioussection.Thedepths,however,areprovidedasapproximateplanes.Inourexperiments,weusedimagesfromtheColumbiaWeatherandIllumina-tionDatabase(WILD)[2].Orthographicdepthswereobtainedfromsatelliteorthophotos(see“gure7(b)).Onceagain,theskybrightnesswasmeasuredbyse-lectingaregionofthesky.Theimagescanbedeweath-eredbycomputingcleardaysceneradiancesorcolorsdependingonwhetheragray-scaleoracolorim-ageisinputtothealgorithm.Resultsofdeweatheringamistysceneisshownin“gure7(c).Noticethesignif-icantincreaseincontrastsofthescenepointsatvariousdepths.Insummary,theaboveresultsdemonstratethatweathereectscanbesucientlyremovedfromimagesevenwhenonlyapproximatedepthsareknown. (a)Input:Foggyimage(c)Zoomed-inregionsof(a)(b)Output:Deweatheringtodifferentextents(bychoosingdifferentvaluesfor)(d)Contrastrestorationinzoomed-inregions. UserselectedVanishingPointUserselectedSkyBrightnessFigureRestoringcleardayscenecontrastsusingdepthheuristics.(a)Inputgray-scaleimagecapturedinfog.Thecontrastsofscenepoints,especiallyinfartherregions,aredegradedseverely.(b)Twoimagesillustratingdierentamountsoffogremovedfromtheimagein(a).TheseimageswerecomputedusingthedepthtrendŽshownin“gure3(c).(c)Zoomedinregionsselectedfrom(a)atdierentdepthsshowingdierentamountsoffog.(d)Correspondingzoomedinregionsofthedeweatheredimages.Noticethesigni“cantcontrastenhancement. (a)Input:Mistyimage (b)Input:Planardepthsegments (c)Output:Contrastenhancedimage.FigureContrastrestorationusingplanardepthseg-ments.(a)Amistyimage.(b)Planardepthsobtainedfromsatelliteorthophotos.(c)Outputoftherestorationalgo-rithm.Noticetheincreaseinclarityinthefartherbuild-ings.TheinputimageandthedepthswereobtainedfromtheColumbiaWeatherandIlluminationdatabase(WILD). 6AddingWeatherEectstoImagesThusfarwepresentedalgorithmstoremoveweatheref-fectsfromasingleimage.However,incomputergraph-icsapplications,itmayberequiredtoaddatmosphericeectstoimages.Wenowdemonstratetheadditionofweathereectstoasinglephotographusingamanuallyprovidedapproximatedepthmap.Weaddtwotypesofscatteringeectstoanimage.Notethattheintensityofalightraydiminisheswhenitisscatteredbyanatmosphericparticle.Hence,thenumberofscatteringeventseachlightraycanundergoandstillbedetectablebythecamera,issmall.Hence,singlescatteringmodels(equations1and2)sucetoaddweathereectstoimagesofsurfacesinthescene.However,weobservedistinctglowsaroundbrightlightsourcesinthescene.Theseglowsareduetothemul-tiplescatteringoflightintheatmosphere.Recently,NarasimhanandNayar[5]developedananalyticmodelfortheglowaroundapointlightsource.Inthissec-tion,weusethismodelandpresentanalgorithmtoaddweathereectstoclearday(ornight)sceneswithbothlightsourcesandsurfaces.6.1InteractiveStepWemanuallyprovidedepthheuristicsandtheskyinten-sities,asdescribedintheprevioussections.Then,wesegmentthelightsourcesintheimage.Thisstepcanalsobedoneautomaticallyusingasimplethresholdingoperationonimageintensities.6.2AutomatedStepThisstepconsistsoftwopartscorrespondingtothead-ditionofsinglescatteringeectstosurfacesandmultiplescatteringeectstolightsources.Thepixelintensitiesofnon-lightsourceregionsofthescenecorrespondtothecleardaysurfaceradiances.Bysubstitutingdierentvaluesforthescatteringcoecientinequation(2),wesimulatedierentdensitiesofweathertotheregioncorrespondingtosurfaces.Toaddmultiplescatteringeects(glow)aroundeachlightsource,weperformthefollowingoperations.TheglowT,µ)aroundapointlightsourcewithradiantintensityisderivedin[5],T,µlog (5)isthecosineoftheraydirection,opticalthick-isaLegendrepolynomialoforder,andd,1]iscalledforwardscatteringpa-rameter.Dierentvaluesofgeneratedierenttypesofweatherconditions(fog,mist,haze,etc.).Theglowaroundapointsourcecanbeviewedsimplyasapointspreadfunction(PSF).Toaddaglowaroundanarealightsource,thecomputedPSFisconvolvedwiththeshapeofthelightsource.Fi-nally,wecombinethecontributionsofbothsingleandmultiplescattering(glows)torenderarealisticappear-anceofasceneinbadweather.Wedemonstratethistechniqueusingascenephotographedintheeveningcontainingabrightlamp(“gure8).The“nalexpres-sionusedtorenderweathereectstothisimageis,is,ReŠT+E(1ŠeŠT)](1Šµ)+I(T,µ(6) (a)Input:Cleareveningimage (b)Output:SingleScattering(minT=1.05) (c)Output:MildMist(q=0.8,minT=1.05) (d)Output:DenseFog(q=0.9,minT=2.0) Figure8:Addingweathereectstoaphotograph.(a)OriginalPhotograph.(b)Hazyimagerenderedusingsinglescattering(dichromaticmodel).(c)and(d)Dierentglowsareaddedtothelamp.Notethatmultiplescatteringeectsduetolightsourcesaresigni“cantascomparedtosinglescatteringeects. denotestheDiracdeltafunction.Twodif-ferentamountsofmistandfog(=[09],min=[10])wereaddedtotheimagein“gure8(a).Theseresultsareillustratedin“gures8(c)and(d).No-ticetherealisticglowingappearanceofthelampandthenaturalattenuationofthebackgroundsurfacebright-nesses.Also,comparetheresultwithonlysinglescat-teringshownin“gure8(b).7SummaryWepresentedsimpleinteractivetoolstoremoveweathereectsfrom,andaddweathereectsto,asingleimage.Ourmethodsdonotrequirepreciseinformationaboutthesceneortheweathercondition,anddonotrequirechangesinweatherconditionsbetweenimageacquisi-tions.Thethreemethodspresentedareeasy-to-useandcaneectivelyrestorecleardaycolorsandcontrastsfrompoorweatherimages.Wealsopresentedanalgorithmtoaddweathereects(bothsingleandmultiplescattering)toimages.Althoughweshowedfourspeci“cexamples,itisclearthatsuchsimpletechniquescanbeusedformostscenesthatoccurofteninpractice.References[1]N.S.Kopeika.ASystemEngineeringApproachtoImag-ing.SPIEPress,1998.[2]S.G.Narasimhan,C.Wang,andS.K.Nayar.Alltheimagesofanoutdoorscene.InProc.ECCV,2002.[3]S.G.NarasimhanandS.K.Nayar.Visionandtheatmo-sphere.IJCV,48(3):233…254,August2002.[4]S.G.NarasimhanandS.K.Nayar.Contrastrestorationofweatherdegradedimages.PAMI,25(6),June2003.[5]S.G.NarasimhanandS.K.Nayar.Sheddinglightontheweather.InProc.CVPR,2003.[6]J.P.OakleyandB.L.Satherley.Improvingimagequal-ityinpoorvisibilityconditionsusingaphysicalmodelfordegradation.IEEETrans.onImageProcessing,7,February1998.[7]Y.Y.Schechner,S.G.Narasimhan,andS.K.Nayar.In-stantdehazingofimagesusingpolarization.InProc.,2001.[8]K.TanandJ.P.Oakley.Physicsbasedapprachtocolorimageenhancementinpoorvisibilityconditions.JOSA,18(10):2460…2467,October2001.