This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
MORPHOLOGICAL CODING OF COLOR IMAGES BY VECTORCONNECTED FILTERS
Thispaperdealswith theuseof thevectorlevelingsfor cod-ing color images. This classof morphologicalconnectedfilters suppressesdetailsbut preserves the contoursof theremainingobjects.If thecolor imagesarefilteredby inde-pendentlyleveling eachcolor component,new colorsmaybe introduced.In orderto avoid this drawback,a total or-der mustbe imposedon the color vectors. A comparativestudyhasbeendrawn for variouslexicographicalordersinthe RGB andthe HLS color systems.Thesefilters canbeespeciallyusefulasa preprocessingstepfor improving thecompressionof color images.
1. INTRODUCTION
Themorphologicalconnectedfilters have thenicepropertyto suppressdetailsbut preserve thecontoursof theremain-ing objects. Levelings are a subclassof symmetriccon-nectedoperatorsthathave originally beendefinedandstud-ied for grey toneimages[7]. Several extensionsto vectorspaceshave beenproposed:pseudo-scalarand autarkicallevelings[2], separablelevelings[8] andnon-separablelev-elings[12]. In this paper, we dealwith the implementationof vector levelings in completetotally orderedlatticesbyusinglexicographicalorderswhicharedefinedon theRGBcolor spaceandonanimprovedHLS system(recentlypro-posed[5]). After a comparative studyof the performanceof differentorders,thesecolorfiltersareappliedto themor-phologicalcodingof color images.
2. MATHEMATICAL MORPHOLOGY IN COLORCOMPLETE TOTALLY ORDERED LATTICES
Mathematicalmorphologyis anon-linearimageprocessingapproachwhich is basedontheapplicationof latticetheoryto spatialstructures[10]. In practice,thedefinitionof mor-phologicaloperatorsneedsatotally orderedcompletelatticestructure( ����� or ����� for every pair � and � ; andeveryfinite subsethasa supremumandan infimum) [11]: thereareno pair of pointsfor which the orderis uncertain.The
applicationof mathematicalmorphologyto color imagesisdifficult dueto thevectorialnatureof thecolordata.Manyresearchworkshave beencarriedout on theapplicationofmathematicalmorphologyto color images[6, 3, 4, 9]. Themostcommonlyadoptedapproachis basedon the useofa lexicographicalorderwhich imposesa total orderon thevectors.Let ��� �� � ��� � � � � � � � � and ��� � � � � � � � � � � ���betwo arbitraryvectors( ��� ����� � ), anexampleof lexico-graphicalorder maybe
In thiscasethepriority is givento thefirst component,thento thesecond,etc. Obviously, it is possibleto defineotherordersfor imposinga dominantroleto any otherof thevec-tor components.As previous works have shown [9], thedrawbackof thesekindsof ordersis thatmostof vectorpairsaresortedby thechosenfirst component.Thereis a simplewayin ordertomakethelexicographicalordermoreflexible(reducingtheexcessive dependenceof thefirst component)which involvesthe linear reductionof the dynamicmarginof thefirst component,applyingadivisionby aconstantandroundingoff. Therefore,we can proposean 0�1 moduluslexicographicalorder
The choiceof the value for 0 controls the degreeof in-fluenceof the first componentwith regard to the others(above all thesecondone). Theseorderscanbeappliedtothe color spaces.Let 8�� 9���:� � ;"� 9�� � � <"� 9�� � � =>� 9�� � and8�� 9��?� � @A� 9�� � � B�� 9�� � � CD� 9�� � be the color valuesof thepixel 9 from the color image 8 in the RGB andHLS colorspacesrespectively.
The use of a lexicographical order directly in theRGB spacerequiresthat one of the color must be ar-bitrarily elevated to a dominant role. To avoid this,a first approach entails calculating the E�F G and the
H/I J of the three RGB values for every pixel; i.eK4L M N L O�N�P H�Q R L S T,L O�N U S V"L O�N U S W,L O�N N and X L M N L O�N'PH/I J L S T,L O�N U S V"L O�N U S W,L O�N N . Then for every pair of pixelsOand Y wecanbuild a lexicographicalorderwherethefirst
componentis givenbyK
, the secondoneis associatedtoX and,ifK4L O�N7P'K4L Y N and X L O�N�P X L Y N thenthechoice
of the RGB componentsdoesnot have a significantinflu-ence;e.g. the greencomponentcanbe takeninto accountthen the red andfinally the blue (
K'U X U S V"U S T"U S W ). Wenamedthis order
K X[Z�\>]_^ . Preliminarytestsshowedthattheapplicationof morphologicaloperatorsbasedontheK X`ZA\>]_^ latticeyieldsstrangevisualeffects.In ordertoimprove thevisualeffects,we proposean a�Z moduluslex-icographicalorderwherethe first componentis givenby afunctionof ordering b ,
b L O�N�P�c�d e�f S T"L O�NDghe�i S V"L O�N�g�e j S W>L O�N k gL l Z cDN d H�Q R L S T,L O�N U S V"L O�N U S W,L O�N N ZH/I J L S T,L O�N U S V"L O�N U S W,L O�N N k U m_n�c�n�l oIn the function b thereare a linear combinationof RGBcomponents(i.e., a luminancevalue) and the H�Q R Z H/I Jof the components(i.e., a saturationvalue), weightedbyc
. After deeptests,we have found that the valuese�fPm o p U e�iAP.m o q U e j�P.m o l
andc�P.m o r
yield very goodvi-sualeffects.Dueto thefact thatthe luminancegivesmuchimportanceto the greencomponent,the othercomponentsfor orderingcanbe: thered,thenthegreenandfinally, theblue( b U S T,U S V&U S W ). A similar approachhasbeenusedforthe interpolationof color images[6]. The order is calledbDZ�\>]_^,s andin Figure1 areshown twoexamplesof colorlevelingwith thisorder.
The more homogenousHLS 3D-polarcoordinatecolorrepresentationmay be usedto defineotherinterestinglex-icographicalorders. For this space,we adoptedthe lat-tices introducedin [3]. The hue is an angularcompo-nent, thereforein order to be able to definea total orderwe must choicea hue origin t�u (typically associatedtothe dominantcolor), i. e. using only the hue,
O�v Y ifS w�L O�N g t�u,x S w�L Y N g t�u . Having thisconstraint,wecandefinetwo a�Z moduluslexicographicalorders:luminance-based y�z7t�s { w�| (luminance,saturationand centredhue)andsaturation-basedz7y�t�s { w�| (saturation,luminanceandcentredhue). We have implementedalsoa lexicographicalorderwith thehuecomponentin thefirst level however, aspointedout in [3], thehue-basedorderis veryunstable.Theauthorsproposeda solutionwhich is basedon a weightingof the hue by the saturation,i.e.
S }w L O�NP~S w�L O�N Z�t�uifS wAL O�N Z�t�u�� m � or
S }w L O�N�P�p q m ��g.S wAL O�N Zt�u ifS w�L O�N Z�t�u v?m � and the following weighting,S } }w L O�N,P�� � �DL S }w L O�N U � m L l Z S �DL O�N N N U m/n�S }w L O�N>v�� m orS } }w L O�N�P I J � L S }w L O�N U � m L lDg�S ��L O�N N N U � m_n�S }w L O�N&v�l r m orS } }w L O�N�P'� � �7L S }w L O�N U � m L p Z S �DL O�N N N U l r mAn'S }w L O�N&v'� � m
orS } }w L O�N�P I J � L S }w L O�N U � m L p>g'S �7L O�N N N U � � m`n.S }w L O�N/v
p q m. Now it is possibleto define the hue-basedordert� z7y , with thehueweightedvalue
S } }w L O�N asfirst compo-nent(
O�v Y ifS } }w L O�N x S } }w L Y N , thenthesaturationandthen
theluminance).Theapplicationof y�z7t�s { w�| yieldsthebestvisualeffectsandconsequentlyit is the mostindicatedforcoding.Theuseof thesaturationaspriority for orderingcanbe interestingfor featureextraction,segmentation,etc. [5]but the visual effectsareannoying.Theuseof the t� z7yresultsin inconvenientvisual artefacts,mainly due to thefact that the influenceof thechoicefor a dominantcolor isvery important.This last latticemaybeinterestingfor em-phasisinga particularcolor or for removing color regionsbut hardlyfor coding.
(a)
(b) (c)
(d) (e)
Fig. 1. Exampleof color levelingsusingthe lexicographicorder b&Z�\>]_^,s � f u onLennaimage:(a)Referenceimage,M. (b) Marker (ASF of size � ), � f . (c) Leveled image,� L M�U � f N . (d) Marker (ASF of size
l � ), � i . (e) Leveledimage,
� L M�U � i N .
3. ALGORITHMIC FRAMEWORK
Oncetheseordershavebeendefined,themorphologicalop-eratorsaredefinedin thestandardway. Thevectorerosionof a color image
Apart from thevisualeffects(asubjectiveevaluation)of thedifferentlexicographicalordersdiscussedabove, anobjec-tive evaluationof the obtainedlevelings hasbeencarriedout. Five color imageshave selectedand for every im-age,six levelings have beencomputedusing as markers:three
´>µ7¶’s of size � �¾½ , ¿ À and ¿ ½ ( ¦ is an square)
andthree Á> ¶ of size ÃÄ`à , ¿ ¿�Ä�¿ ¿ and ¿ ¿�Ä�¿ ¿ ap-plied two times. Moreover, this seriesof filters hasbeenobtainedfor anexampleof eachof thepresentedfive lexi-cographicalorders(noticethatthe Á> ¶ markers,obtainedfrom theRGB components,arealwaysthesame).For theÅ�Æ moduluslexicographicalorders,the value of Å � ¿ Àhasshown to achieve robust andnice levelings. The ori-gin of the hue hasbeenimposedto Ç�È � À É . Then forevery pair of initial image/ leveledimage,two parametersof quality have beencalculated:the Signal-to-NoiseRatioµ7ÊË
and the Percentageof Reductionin the NumberofFlat Zones
ASF, � �'½ Í ³ Í ¸ Í&ÎÏÍ&ÐÑÍ"Òµ7ÊË(dB) 21,9 22,1 22,4 17,4 17,8¶_Ì,Ë(%) 37,1 37,5 38,0 40,0 39,4
ASF, � � ¿ À Í ³ Í ¸ Í&ÎÏÍ&ÐÑÍ"Òµ7ÊË(dB) 18,3 18,7 19,1 15,5 14,3¶_Ì,Ë(%) 44,3 44,8 45,3 46,4 46,4
ASF, � � ¿ ½ Í ³ Í ¸ Í&ÎÏÍ&ÐÑÍ"Òµ7ÊË(dB) 16,6 16,7 17,2 13,9 14,3¶_Ì,Ë(%) 48,9 49,8 50,1 51,7 49,6
Table 1. Averagevaluesofµ7ÊË
and¶_Ì,Ë
using´>µ7¶
asmarkersfor the levelingsandwhere Í ³ � Â�Ó Æ Ë>Ô ¦ ,Í ¸ �$Õ Æ Ë>Ô ¦,Ö × ³ È , Í&Î4�$Ø µ Ç Ö × ³ È Ù Ú�Û × È Ü , Í&Ð4�µ Ø Ç Ö × ³ È Ù Ú�Û × È Ü and Í"Ò"� ÇÝ µ Ø Ú�Û × È Ü .
VMF, Þ ß Þ Í ³ Í ¸ Í&ÎÑÍ&ÐÏÍ"Òµ7ÊË(dB) 23,8 24,1 24,0 22,3 22,2¶_Ì,Ë(%) 33,6 34,1 31,0 26,9 31,1
µ Ø Ç and ÇÝ µ Ø which arehowever the worstlatticeswith respectto
µ7ÊË. A goodbalanceis givenby
thelattices Õ Æ Ë>Ô ¦ and Ø µ Ç , with resultsa little bit bet-ter for Ø µ Ç . In thecaseof Á>Â ¶ ’s,owing to thefact thatthemediansarecomputedin theRGB space,thevaluesofµ7ÊË
and¶_Ì,Ë
area little betterfor Õ Æ Ë>Ô ¦ althoughthevaluesfor Ø µ Ç areclearlyupperthanfor
The most widespreadimage compressionalgorithms asJPEG(or MPEGfor videosequences)arebasedona trans-form coding scheme. It partitionsan image into blocks,computesthediscretecosinetransform(DCT)of eachblockandcodeseachDCT componentaccordingto aquantizationschemeasa function of the magnitudeof the component.Thecompressionis greatestfor constantor slowly varyingblockssincethesecanbedescribedby justa few DCT com-ponents.Thebestcolor levelingsmaybeusefulfor thepre-processingof imagesfor JPEGcompression.The idea isto simplify theoriginal imageasmuchaspossiblewithoutlosing meaningfulcontent. Obviously, the size of the re-movedstructuresis givenby thesizeof themarkerfunctionused.Figure2 depictsanexampleof this approachusinga
(a) (b)
(c) (d)
Fig. 2. Application to compressionby JPEGon Carmenimage:(a) Initial image(rasterfile 196662bytes),(b) com-pressedinitial imagewith quality â ã ä (6477bytes),(c) lev-eledimage,(d) compressedleveledimagewith quality â ã ä(5742bytes).
levelingon å�æ7ç�è éDê ë with a ì_í�î�ê ê ï�ê ê . In theleveledim-age,smalldetailshave beenremoved (seetheblackpupilsof baby Carmenand the letterson the books)but, in thecompressedinitial imagethesedetailsbecomediffusedandthereforetheir suppressionmay be useful in orderto havea clearimage.Themostinterestingis thesizereductionofð ñ ä whenapplyingthecompressionon the leveledimage.For an imagemoreabundantin details,the sizereductioncanbereallysignificant;for instancethesameleveling andthe samecompressionquality appliedto the standardBa-boonimageyield areductionof
ñ ã ä andfor thelevelingofLennaimagefrom Figure1(e) the reductionis upperthanñ ò ä .
6. CONCLUSION
We discussedtheuseof lexicographicalordersin theRGBandHLS color spacesfor theimplementationof vectorlev-elings. It canbeconcludedthat themostinterestinglatticefor morphologicalsimplificationandcodingof colorimagesis å�æ7ç�è éDê ë (luminance,saturation,centredhue)sincebe-sidesnicevisualeffects,it yieldsa goodperformancewithregardto the æ7óô andthe enlargementof flat zones.Weshowed the performanceof vectoriallevelingsfor improv-ing theJPEGcompressionof color images.
7. REFERENCES
[1] J. Astola,P. Haavisto andY. Nuevo, “VectorMedianFilters,” in Proc.of theIEEE, Vol. 78,No. 4, pp.678–689,1990.
[2] C.GomilaandF. Meyer, “Levelingsin VectorSpaces,”in Proc. of IEEE Conferenceon ImageProcessing,Kobe,Japan,October24-28,1999.
[3] A. Hanbury, “Mathematicalmorphologyin the HLScolour space,” in Proc. 12th BMVC, British Ma-chine Vision Conference, Manchester, 10-13Septem-ber2001,pp.II-451-460.
[4] A. Hanbury andJ. Serra,“Mathematicalmorphologyin the CIELAB space,” ImageAnalysisand Stereol-ogy, 21,201–206,2002.
[5] A. Hanbury and J. Serra, “A 3D-polar coordinatecolour representationsuitable for image analysis,”submittedto ComputerVisionandImageUnderstand-ing, November2002,39p.
[6] M. Iwanowski andJ.Serra,“Morphologicalinterpola-tion andcolor images,” in Proc. of ICIAP’99, Venice,Italy, September27-29,1999.
[7] F. Meyer, “The levelings,” in (H. Heijmansand J.RoerdinkEds.)MathematicalMorphologyandIts Ap-plicationsto ImageProcessing, pp.199–206,Kluwer,1998.
[8] F. Meyer, “Vector levelings and flattenings,” in (J.Goutsias,L. VincentandD.S.Bloomberg Eds.)Math-ematicalMorphologyand Its Applicationsto ImageProcessing, pp.51–60,Kluwer, 2000.
[9] F. Ortiz,F. Torres,J.AnguloandS.Puente,“Compara-tivestudyof vectorialmorphologicaloperationsin dif-ferentcolor spaces,” in Proc. SPIEAlgorithms,Tech-niquesand ActiveVision, Vol. SPIE 4572,pp. 259–268,2001.
[10] J.Serra,“ImageAnalysisandMathematicalMorphol-ogy. Vol I,” and “Image Analysis and MathematicalMorphology.Vol II: TheoreticalAdvances,” AcademicPress,London,1982and1988.
[11] J.Serra,“AnamorphosesandFunctionLattices(Mul-tivaluedMorphology),” in (E. DoughertyEd.),Math-ematical Morphology in Image Processing, MarcelDekker, 483–523,1992.
[12] F. ZanogueraandF. Meyer, “On the implementationof non-separablevector levelings,” in (H. Talbot andR.BeareEds.)MathematicalMorphology,Proc.of IS-MM’02, pp. –, Sydney, Australia,April 2002,CSIROPublishing.