EECS 556 - Image Processing - W 09 Interpolation: - Interpolation Techniques - B Splines
EECS 556 - Image Processing - W 09 Interpolation: - Interpolation Techniques - B Splines
Interpolation
Interpolationtechniques
Bsplines
Whatisimageprocessing?
Imageprocessingistheapplicationof2Dsignalprocessing
methodstoimages
Imagerepresentationandmodeling
Imageenhancement
Imagerestoration/imagefiltering
Compression
(computervision)
Imageenhancement
Accentuatecertaindesiredfeaturesfor
subsequentanalysisordisplay.
Contraststretching/dynamicrangeadjustment
Colorhistogramnormalization
Noisereduction
Sharpening
Edgedetection
Cornerdetection
Imageinterpolation
Whatisinterpolation?
givenadiscretespaceimagegd[n,m]
Thiscorrespondstosamplesofsomecontinuous
spaceimagega(x,y)
ComputevaluesoftheCSimagega(x,y)at(x,y)
locationsotherthanthesamplelocations.
ga(x,y)
gd[n,m]
gd[n,m]
Whatisinterpolation?
Interpolationiscriticalfor:
Displaying
Imagezooming
Warping
Coding
Motionestimation
Isperfectrecoveryalwayspossible?
No,(neveractually),unlesssomeassumptions
onga(x,y)aremade
Thereareuncountableinfinitecollectionof
functionsga(x,y)thatagreewithgd[n,m]at
thesamplepoints
Whataretheseassumptions?
ga mustbebandlimited
SamplingratemustsatisfyNyquist theorem
ga mustbebandlimited
Thereexists
suchthat
SamplingratemustsatisfyNyquist
theorem
IdealUniformRectilinearSampling
2Duniformlysampledgrid
IdealUniformRectilinearSampling
ga(x,y)
gs(x,y)
Howtorecoverga ?
ga(x,y,)
Howtorecoverga ?
Sinc interpolation
Wecanrecoverga(x,y)byinterpolatingthe
samplesgd[n,m]usingsinc functions
Interpolation
Sampledgs
MATLABsinterp2
Whatstheproblemwithsinc
interpolation?
Realworldimagesneednotbeexactlyband
limited.
Unboundedsupport
Summationsrequireinfinitelymanysamples
Computationallyveryexpensive
Linearinterpolation
sinc interpolationformula
Linearinterpolation:
h(x,y)=interpolationkernel
Whythisisalinearinterpolation?
Linearfunctionofthesamplesgd[n,m]
Linearinterpolation
Consideralternativelinearinterpolation
schemesthataddressissueswith:
Unboundedsupport
Summationsrequireinfinitelymanysamples
Computationallyveryexpensive
Basicpolynomialinterpolation
Herekernelsthatarepiecewisepolynomials
Zeroorderornearestneighborinterpolation
Usethevalueatthenearestsamplelocation
Kernelsarezeroorderpolynomials
Nearestneighborinterpolation
Linearorbilinearinterpolation
tri functionisapiecewiselinearfunctionofits
(spatial)arguments
/2
/2
Linearorbilinearinterpolation
Foranypoint(x,y),wefindthefournearestsamplepoint
fitapolynomialoftheform
Estimatealphasfromsystemof4equationsin4unknowns:
Linearorbilinearinterpolation
Linearorbilinearinterpolation
LinearinterpolationbyDelaunay
triangulation
Usealinearfunctionwithin
eachtriangle(threepoints
determineaplane).
MATLABsgriddata with
thelinearopt
Whatstheproblemzeroorderor
bilinearinterpolation?
neitherthezeroorderorbilinearinterpolator
aredifferentiable.
Theyarenotcontinuousandsmooth
Desirablepropertiesofinterpolators
selfconsistency:
Continuousandsmooth(differentiable):
Shortspatialextenttominimizecomputation
Desirablepropertiesofinterpolators
Frequencyresponseapproximatelyrect().
symmetric
Shiftinvariant
Minimumsidelobes toavoidringingartifacts
Continuousandsmooth
Largesidelobes
Nonsmooth
Smallsidelobes
Nonsmooth;nonshiftinvariant
Polynomialinterpolation
Cubic
interpolationkernel:
Quadratic
Bsplines
Bspline interpolation
Motivation:
norderdifferentiable
Shortspatialextenttominimizecomputation
Background
Splines arepiecewisepolynomialswithpiecesthat
aresmoothlyconnectedtogether
Thejoiningpointsofthepolynomialsarecalledknots
Background
Foraspline ofdegreen,eachsegmentisapolynomial
ofdegreen
Doi needn+1coefficienttodescribeeachpiece?
Additionalsmoothnessconstraintimposesthecontinuityof
thespline anditsderivativesuptoorder(n1)attheknots
onlyonedegreeoffreedompersegment!
Bspline expansion
Splines areuniquelycharacterizedintermsof
aBspline expansion
integershiftsofthecentralBspline ofdegreen
=centralBspline =basis(B)spline
Bsplines
Symmetrical
bellshapedfunctions
constructedfromthe(n+1)foldconvolution
Bsplines
Bsplines
norderBspline:
Derivedusing:
Bspline
UsingcubicBsplines isapopularchoice:
Important:compactlysupported!
CubicBspline anditsunderlyingcomponents
support
Bspline expansion
Eachspline isunambiguously
characterizedbyitssequenceof
Bspline coefficientsc(k)
PropertiesofBspline expansion
Discretesignalrepresentation!(eventhoughthe
underlyingmodelisacontinuousrepresentation).
Easytomanipulate;
E.g.,derivatives:
Bspline interpolation
Sofar:Bspline modelofagiveninputsignal
s(x)
sd[n]
Interpolationproblem:findcoefficientsc(k)
suchthatspline functiongoesthroughthe
datapointsexactly
Thatis,reconstructsignalusingaspline representation!
Reconstructsignalusingaspline
representation
sd [n]
Bspline interpolation
Relationshipbetweencoefficientsandsamples
sd [n]
=discreteBspline kernel
ObtainedbysamplingtheBspline ofdegreenexpandedbya
factorofm(m=1)
CardinalBspline interpolation
Cardinalsplines
2Dsplines inimages
tensorproductbasisfunctions
Bspline interpolation
Conclusion:
norderdifferentiable
Shortspatialextenttominimize
computation
Generalimagespatialtransformations
transformthespatialcoordinatesofanimagef(x,y)
sothat(afterbeingtransformed),itbettermatches
anotherimage
Ex:warpingbrainimagesintoastandardcoordinate
systemtofacilitateautomaticimageanalysis
imagespatialtransformations
Generalimagespatialtransformations
Formoftransformations:
Shift only g(x,y)=f(xx0,yy0)
Affineg(x,y)=f(ax+by,cx +dy)
thinplatesplines (describessmoothwarpings using
controlpoints)
Generalspatialtransformation(e.g.,morphingor
warpinganimage)
MATLABsinterp2orgriddata functions
Interpolationiscritical!