Академический Документы
Профессиональный Документы
Культура Документы
ECE802
Spring2010
TwoDimensionalWavelets
Forimageprocessingapplicationsweneed
waveletsthataretwodimensional.
Thisproblemreducesdowntodesigning
2Dfilters.
Wewillfocusonaparticularclassof2D
filters:separablefilters(canbedirectly
designedfromtheir1Dcounterparts)
2DScalingFunctions
The theories of multiresolution analysis and
wavelets can be generalized to higher dimensions.
In practice the usual choice for a two-dimensional
scaling function or wavelet is a product of two
one-dimensional functions. For example,
( x, y ) ( x) ( y )
2DWaveletFunctions
( x), ( y )
Sincebothsatisfythedilation
equation, h(k , l ) h(k )h(l )
Wecananalogouslyconstructthewavelets.
However,nowinsteadof1wavelet
function,wehave3waveletfunctions:
The corresponding dilation equations are:
whereg(I)(k,l)=h(k)g(l),g(II)(k,l)=g(k)h(l),
g(III)(k,l)=g(k)g(l).
Example:2DHaar
2DHaarscaling:
2DHaarwavelets:
Subspaces
V2jisthetwodimensionalsubspaceatscale
j.
Asjincreases,wegetL2(R2).
V j2 V j V j
V 2 j 1 V j2 W j2
2Dwaveletdecomposition
Theapproximationanddetailcoefficients
arecomputedinasimilarway:
Thereconstructionis:
FilterbankStructure:
Decomposition
FilterbankStructure:
Reconstruction
TheThreeFrequencyChannels
We can interpret the decomposition as a breakdown of the signal
into spatially oriented frequency channels.
Decomposition of
frequency support
Arrangement of wavelet
representations
WaveletDecomposition:Example
LENA
LH
HL
HH
WaveletExample2
high pass
high pass
high pass
Applications:EdgeDetectionin
Images
Application:ImageDenoising
UsingWavelets
NoisyImage:
DenoisedImage:
DenoisingImages
DenoisingDaubechiesface:
Transformtheimagetothewaveletdomain
usingCoifletswiththreevanishingmoments
Applyathresholdattwostandarddeviations
Inversetransformtheimage.
ImageDenoisingUsingWavelets
CalculatetheDWToftheimage.
Thresholdthewaveletcoefficients.Thethreshold
maybeuniversalorsubbandadaptive.
ComputetheIDWTtogetthedenoisedestimate.
Softthresholdingisusedinthedifferent
thresholdingmethods.Visuallymorepleasing
images.
VisuShrink
ApplyDonohosuniversalthreshold,
2 log M
Misthenumberofpixels.
Thethresholdisusuallyhigh,overly
smoothing.
SUREShrink
Subbandadaptive,adifferentthresholdis
calculatedforeachdetailsubband.
Choosethethresholdthatwillminimizethe
unbiasedestimateoftherisk:
Thisoptimizationisstraightforward,orderthe
waveletcoefficientsintermsofmagnitudeand
choosethethresholdasthewaveletcoefficientthat
minimizestherisk.
BayesShrink
Adaptivedatadriventhresholdingmethod
Assumethatthewaveletcoefficientsin
eachsubbandisdistributedasaGeneralized
GaussianDistribution(GGD)
Findthethresholdthatminimizedthe
Bayesianrisk.
GGD
Shapeparameter,std..
BayesShrink
Choosethethresholdthatwillminimizethe
Bayesianrisk.
Thereisnoclosedformforthethreshold.
BayesShrinkEmpiricalThreshold
Anempiricalthresholdisusedinpractice
thatisveryclosetotheoptimumthreshold.
AdaptstotheSNRineachsubband.
Comparisons
ImageEnhancement
Imagecontrastenhancementwithwavelets,
especiallyimportantinmedicalimaging
Makethesmallcoefficientsverysmalland
thelargecoefficientsverylarge.
Applyanonlinearmappingfunctiontothe
coefficients.
Experiments
DenoisingandEnhancement
ApplyDWT
Shrinktransformcoefficientsinfinerscales
toreducetheeffectofnoise
Emphasizefeatureswithinacertainrange
usinganonlinearmappingfunction
PerformIDWTtoreconstructtheimage.
Examples
Original
DenoisedDenoisingwithEnhancement
EdgeDetection
Edgescorrespondtothesingularitiesintheimageandare
relatedtothelocalmaximaofwaveletcoefficients.
Foredgedetection,asmoothingfunction(suchasaspline)
andtwowaveletfunctionsaredefined.
Waveletfunctionsareusuallythefirstandsecondorder
derivativesofthesmoothingfunction.
Examples:
Keepthedetailcoefficientsanddiscardtheapproximation
coefficients
Edgescorrespondtolargecoefficients
Applications
Computervision
Imageprocessinginthehumanvisualsystemhasacomplicated
hierarchicalstructurethatinvolvesseverallayersofprocessing.
Ateachprocessinglevel,theretinalsystemprovidesavisual
representationthatscalesprogressivelyinageometricalmanner.
Intensitychangesoccuratdifferentscalesinanimage,sothattheir
optimaldetectionrequirestheuseofoperatorsofdifferentsizes.
Therefore,avisionfilterhavetwocharacteristics:itshouldbea
differentialoperator,anditshouldbecapableofbeingtunedtoactat
anydesiredscale.
Waveletsareidealforthis
FBIFingerprintCompression
Asinglefingerprintisabout700,000pixels,
andrequiresabout0.6MBytes.
ImageCompressionand
Wavelets
WhyCompression?
Uncompressedimagestaketoomuchspace,
requirelargerbandwidthfortransmissionand
longertimetotransmit
Examples:
512x512grayscaleimage:262KB
512x512colorimage:786KB
Thecommonprinciplebeyondcompressionisto
reduceredundancy:spatialandspectral
redundancy
TypesofCompression
Lossyvs.Lossless:Lossycompression
discardsredundantinformation,achieves
highercompressionratios.Lossless
compressioncanreconstructtheoriginal
image.
Predictivevs.TransformCoding
ComponentsofaCoder
SourceEncoder:Transformtheimage
DFT,DCT,DWT(lineartransforms)
Quantizer:Scalarvs.Vector(lossycoding)
EntropyEncoder:Compressesthequantized
values(lossless)
OriginalJPEG
UseDCTtotransformtheimage(realpart
ofDFT)
OriginalJPEG
Transformeach8x8blockusingDCT
Sinceadjacentpixelsarehighlycorrelated,
mostofthecoefficientsareconcentratedat
lowerfrequencies.
QuantizetheDCTcoefficients(uniform
quantization)andthenentropyencodefor
furthercompression
DisadvantagesofDCT:Why
wavelets?
DCTbasedJPEGuses
blocksofimage,thereis
stillcorrelationacross
blocks.
Blockboundariesare
noticeableinsomecases
Blockingartifactsatlow
bitrates
Canoverlaptheblocks
Computationally
expensive
WasJPEGnotgoodenough?
JPEGisbasedon
DCT.
Equalsubbands.
Atlowbitrates,there
isasharpdegradation
withimagequality.
43:1compressionratio
WhyWavelets?
Noneedtoblocktheimage
Morerobustundertransmissionerrors
Facilitatesprogressivetransmissionofthe
image(Scalability)
FeaturesofJPEG2000
MultipleResolution:Decomposestheimageintoamultipleresolution
representation.
Progressivetransmission:Bypixelandresolutionaccuracy,referredto
asprogressivedecodingandsignaltonoiseratio(SNR)scalability:
Thisway,afterasmallerpartofthewholefilehasbeenreceived,the
viewercanseealowerqualityversionofthefinalpicture.
Losslessandlossycompression
Randomcodestreamaccessandprocessing:JPEG2000supports
spatialrandomaccessorregionofinterestaccessatvaryingdegreesof
granularity.Thiswayitispossibletostoredifferentpartsofthesame
pictureusingdifferentquality.
Errorresilience:JPEG2000isrobusttobiterrorsintroducedbynoisy
communicationchannels,duetothecodingofdatainrelativelysmall
independentblocks.
JPEG2000 Basics
General block diagram of the JPEG 2000 (a) encoder and (b) decoder
WaveletsinImageCoding
Orthogonalvs.Biorthogonal:
JPEG2000usesbiorthogonalfilters
Losslessandlossycompression
CohenDaubechiesFeavaufilters9/7
CDF5/3forlosslesscompression(integer)
Filtersaresymmetric/antisymmetric
Nearlyorthogonal
Symmetricextensionsoftheinputdata
StepsinJPEG2000
Tiling:Theimageissplitintotiles,rectangularregionsoftheimagethatare
transformedandencodedseparately.Tilescanbeanysize.Dividingtheimage
intotilesisadvantageousinthatthedecoderwillneedlessmemorytodecode
theimageanditcanopttodecodeonlyselectedtilestoachieveapartial
decodingoftheimage.Usingmanytilescancreateablockingeffect.
WaveletTransform:EitherCDF9/7orCDF5/3biorthogonalwavelet
transform.
Quantization:Scalarquantization
Coding:Thequantizedsubbandsaresplitintoprecincts,rectangularregionsin
thewaveletdomain.Theyareselectedinawaythatthecoefficientswithin
themacrossthesubbandsformapproximatelyspatialblocksintheimage
domain.Precinctsaresplitfurtherintocodeblocks.Codeblocksarelocatedin
asinglesubbandandhaveequalsizes.Theencoderhastoencodethebitsof
allquantizedcoefficientsofacodeblock,startingwiththemostsignificant
bitsandprogressingtolesssignificantbitsbyEBCOTscheme.
DWTforImageCompression
ImageDecomposition
Parent
Children
Descendants:corresponding
coeff.atfinerscales
Ancestors:corresponding
coeff.atcoarserscales
LL3
HL3
LH3
HH3
HL2
LH2
HL1
HH2
LH1
HH1
DWTforImageCompression
ImageDecomposition
Feature1:
Energydistribution
concentratedinlow
frequencies
Feature2:
Spatialselfsimilarityacross
subbands
LL3
HL3
LH3
HH3
LH2
HL2
HL1
HH2
LH1
HH1
DWTforImageCompression
DifferencesfromDCTTechnique
Inconventionaltransformcoding:
Anomaly(edge)producesmanynonzerocoeff.
insignificantenergy
TCallocatestoomanybitstotrend,fewbitslefttoanomalies
ProblematVeryLowBitrateCoding:blockartifacts
DWT
Trends&anomaliesinformationavailable
Majordifficulty:finedetailcoefficientsassociatedwithanomalies
thelargestno.ofcoeff.
Problem:howtoefficientlyrepresentpositioninformation?
EmbeddedZerotreeWavelet
Compression(EZW)
Thezerotreeisbasedonthe
hypothesisthatifawavelet
coefficientatacoarsescaleis
insignificant,thenallwavelet
coefficientsofthesameorientation
inthesamespatiallocationatfiner
scalesarelikelytobeinsignificant.
Naturalimagesingeneralhave
alowpassspectrum.Whenan
imageiswavelettransformed,
theenergyinthesubbands
decreaseswiththescalegoes
highersothewavelet
coefficientwill,onaverage,be
smallerinthehigherlevels.
EZW
1.
2.
3.
WecansetathresholdT,ifthewavelet
coefficientislargerthanT,thenencodeit
as1,otherwisewecodeitas0.
1willbereconstructedasT(oranumber
largerthanT)and0willbereconstructed
as0.
WethendecreaseTtoalowervalue,
repeat1and2.Sowegetfinerandfiner
reconstructeddata.
Therearecoefficientsindifferent
subbandsthatrepresentthesame
spatiallocationintheimagedepicted
byaquadtree.
Ifawaveletcoefficientatacoarsescaleis
insignificantwithrespecttoagiven
thresholdT,i.e.|c|<Tthenallwavelet
coefficientsofthesameorientationatfiner
scalesarealsolikelytobeinsignificant
withrespecttoT.
EZWImageCoding
EmbeddedCoding
Having all lower bit rate codes of the same
image embedded at the beginning of the bit
stream
Bitsaregeneratedinorderofimportance
Encoder can terminate encoding at any point,
allowingatargetratetobemetexactly
Suitableforapplicationswithscalability
EZWAlgorithm
First step: The DWT of the entire 2D image will be computed by
FWT
Second step: Progressively EZW encodes the coefficients by
decreasingthethreshold
Allthecoefficientsarescannedinaspecialorder
If the coefficient is a zero tree root, it will be encoded as ZTR. All its
descendantsdontneedtobeencodedtheywillbereconstructedaszero
atthisthresholdlevel
If the coefficient itself is insignificant but one of its descendants is
significant,itisencodedasIZ(isolatedzero).
If the coefficient is significant then it is encoded as POS (positive) or
NEG(negative)dependsonitssign.
Thirdstep:Arithmeticcodingisusedtoentropycodethesymbols
EZWImageCoding
ZerotreeofDWTCoefficients
Significancemap:Binarydecisionastoapixel=0ornot
Totalencodingcost=costofencodingsignificancemap+costof
encodingnonzerovalues
Anelementofzerotree:
Acoeff.:itselforsomeofitsdescendantsaresignificantw.r.t.thresholdT
Zerotree root: An element of zerotree, & not a descendant of a zero
elementatacoarserscale
Isolatedzero:Insignificant,buthassomesignificantdescendant
SetPartitioninginHierarchical
Trees(SPIHT)
ModifyEZW.
Ordercoefficientsbymagnitudeand
transmitthemostsignificantbits.
Progressivetransmission.
Progression
ProgressionbyQuality
RegionofInterestCoding
Codedifferentregionsofinterestwith
differentquality
Scalecoefficientssuchthatthebits
correspondingtoROIareinthehigherbit
plane.
Scalability
SNRscalabilityandspatialscalability
Theabilitytoachievecodingofmorethan
onequality
Resiliencetotransmissionerrors,noneedto
knowtargetbitrate/resolution,noneedfor
multiplecompressions
SNRScalability
Thebitstreamcanbedecompressedatdifferent
qualitylevels(SNR)
Decompressed image bike at (a) 0.125 b/p, (b) 0.25 b/p, (c) 0.5 b/p
SpatialScalability
Thebitstreamcanbedecompressedatdifferent
resolutionlevel