/
2UsageTERisdividedin2applications:theencoderandthedecoder.Bothprograms 2UsageTERisdividedin2applications:theencoderandthedecoder.Bothprograms

2UsageTERisdividedin2applications:theencoderandthedecoder.Bothprograms - PDF document

camstarmy
camstarmy . @camstarmy
Follow
344 views
Uploaded On 2020-11-18

2UsageTERisdividedin2applications:theencoderandthedecoder.Bothprograms - PPT Presentation

00part3Flag fintintintg 0h3 MandatoryNo Explanation IndicatesforeachsegmentthepresenceofPart3header0Part3headerabsent1Part3headerpresent Default 1 00part4Flag fintintin ID: 816895

default int mandatory explanation int default explanation mandatory fint raw 150 ter ifonlyonevalueisspeci oworkdir iworkdir firstvalueisforthe tercode marstest terdecode

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "2UsageTERisdividedin2applications:theenc..." 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

2UsageTERisdividedin2applications:theenc
2UsageTERisdividedin2applications:theencoderandthedecoder.Bothprogramsareencapsulatedinjarlesinthedist/directoryandcanbeexecutedseparatelyusingtheJVM.Eachapplicationacceptsitsownparameterswhichcanbepassedassimplecommandarguments,i.e.java-jardist/TERcode.jar-iinputImage.pgm.ThedistributionincorporatesashellscriptbothfortheencoderandthedecodercalledTERcodeandTERdecodetofacilitateexecutionsinaGNU/Linuxenvironment.TERmayuseagreatamountofmemory.Hence,itisrecommendedtosetthemaximumamountofmemorythattheapplicationcanallocate(usuallythesameasyoucomputerRAM)viathe-XmxparameteroftheJVM,i.e.java-Xmx512m-jardist/TERcode.jar-iinputImage.TheusageofTERisverysimple.Tocompressanimageyoucanusetheencoderwithsomespecicparameters.AllthefunctionalitiesofTERareexplainedwiththeapplicationparameters,soitisrecommendedtoreadthemtoknowwhatyoucando.Donotworryifyouselectincompatibleparametersorfunctionalities;theapplicationdetectstheseproblemsanddisplayswarningmessagestotheuser.Whenyouhaveacompressedcodestream,youcanusethedecodertorecovertheoriginalimageandsaveitwithothercommonform

ats.TERdecodercanmanagecodestreamscompli
ats.TERdecodercanmanagecodestreamscompliantwiththeCCSDSRecommendationforImageDataCodinggeneratedbyotherapplications.HowevernotalltheoptionsdenedintheRecommendedStandardareimplemented.TERdecodercanalsomanagespecicTERlesnotcompilantwiththeRecommendation.Insuchcases,itisrequiredthattheuserindicatesthattheleisnotcompilantandthatpassestothedecodertheparametersusingbytheencoderasprogramparameters.Atypicaluseoftheapplicationisasfollows:#TERcode-ilena.pgm-olenaCompressed.ter#TERdecode-ilenaCompressed.ter-olenaRecovered.pgmorifyoudonotusetheshellscripts:#java-Xmx512m-jardist/TERcode.jar-ilena.pgm-olenaCompressed#java-Xmx512m-jardist/TERdecode.jar-ilenaCompressed.ter-olenaRecovered.pgm2��part3Flagfint[int[int[...]]]g�h3Mandatory:NoExplanation:IndicatesforeachsegmentthepresenceofPart3header.0-Part3headerabsent1-Part3headerpresentDefault:1��part4Flagfint[int[int[...]]]g�h4Mandatory:NoExplanation:IndicatesforeachsegmentthepresenceofPart4header.0-Part4headerabsent1-Part4headerpresentDefault:1��segByteLimitfint[int[in

t[...]]]g�blMandatory:NoExplanatio
t[...]]]g�blMandatory:NoExplanation:Maximumnumberofbytesthatcanbeusedinasegment.ThevalueofSegByteLimitsincludesbytesusedfortheheader,andisappliedtothesubsequentsegmentsuntilanewvalueisgiven.Valueshouldbeintheinterval(0,134217728]anditisexpressedmod(134217728)Default:134217728��DCStopfint[int[int[...]]]g�dcMandatory:NoExplanation:IndicateswhethercompressedoutputstopsaftercodingofquantizedDCcoefcients.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0��bitPlaneStopfint[int[int[...]]]g�bpMandatory:NoExplanation:OnlyusedwhenDCStopequals0.Indicatesthebitplaneindexwherethecodicationshouldstop.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0��stageStopfint[int[int[...]]]g�ssMandatory:NoExplanation:Indicatesthestagewherethecodicationends.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.IfthreelevelsofDWTareapplied,then:1-stage12-stage23-stage34-stage4Default:Thesameofwaveletlevelsplusone��useFillfint[int[int[...]]]g�ufMandatory:

NoExplanation:Specieswhetherll
NoExplanation:SpecieswhetherllbitswillbeusedtoproduceSegByteLimitbytesineachsegment.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0��blocksPerSegmentfint[int[int[...]]]g�bsMandatory:NoExplanation:IndicatesthenumberofblockscontainedinasegmentDefault:1048576��optDCSelectfint[int[int[...]]]g�dsMandatory:NoExplanation:IndicatesthemethodusedtoselectkparameterwhilecodingDCcomponentsDefault:1��optACSelectfint[int[int[...]]]g�asMandatory:NoExplanation:IndicatesthemethodusedtoselectkparameterwhilecodingBitDepthACBlockcom-ponentsDefault:14��WTLevelsfint[int[int[...]]]g�wlMandatory:NoExplanation:Discretewavelettransformlevelsforeachimagecomponent.Firstvalueisfortherstcomponent,secondvalueforthesecondcomponentandsoon.Ifonlyonevalueisspecied,wavelettransformlevelswillbethesameforallcomponents.Default:3��imageExtensionTypefint[int[int[...]]]g�ieMandatory:NoExplanation:Indicatesthekindofextensionthathasbeenappliedtotheeachcomponentoftheimageinorder

tomakeitabletobecompressedusingTER.Ifonl
tomakeitabletobecompressedusingTER.Ifonlyonevalueisspecied,imageextensiontypewillbethesameforallcomponents.Validvaluesare:0-Repeatinglastvalue1-Symmetricexpansion2-NoextensionDefault:0��WTOrderfint[int[int[...]]]g�woMandatory:NoExplanation:OrderinwhichtheDiscretewavelettransformisperformedoverthespatialdimen-tions.Firstvalueisfortherstcomponent,secondvalueforthesecondcomponentandsoon.Ifonlyonevalueisspecied,wavelettransformorderwillbethesameforallcomponents.0-Horizontal-Vertical1-Vertical-Horizontal2-OnlyhorizontalDefault:0��gaggleDCSizefint[int[int[...]]]g�gdMandatory:NoExplanation:SizeofagaggleforDCcomponentsineachsegmentoftheimage.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thesizeofDCgaggleswillbethesameforallsegments.0valuemeansthatalltheblocksofthesegmentareinthesamegaggleDefault:16��gaggleACSizefint[int[int[...]]]g�gaMandatory:NoExplanation:SizeofagaggleforACcomponentsineachsegmentoftheimage.Firstvalueisfortherstsegment,secondvaluefo

rthesecondsegmentandsoon.Ifonlyonevaluei
rthesecondsegmentandsoon.Ifonlyonevalueisspecied,thesizeofACgaggleswillbethesameforallsegments.0valuemeansthatalltheblocksofthesegmentareinthesamegaggleDefault:16��idDCfint[int[int[...]]]g�idMandatory:NoExplanation:NumberwhichindicateshowoftentheIDDCappears.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDDCwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:0��idACfint[int[int[...]]]g�iaMandatory:NoExplanation:NumberwhichindicateshowoftentheIDACappears.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDACwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:06��truncationPointsfint[int[int[...]]]g�tpMandatory:NoExplanation:Foreachsegmentspeciestheavailabletruncationpoints.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thetruncationpointswillbethesameforallsegments.Vali

dvaluesare:0-any1-endofbitplane(bitPlane
dvaluesare:0-any1-endofbitplane(bitPlaneStop)2-endofresolutionlevel(stageStop)3-endofgaggleDefault:0��adjustHeaderParametersfint[int[int[...]]]g�apMandatory:NoExplanation:Foreachsegmentspeciestheparametersthatshouldbeadjusted.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,theasjustedparameterswillbethesameforallsegments.Validvaluesare:0-Noadjustement1-AdjustsegByteLimitanduseFillafterinterleavingDefault:0��compressionOrderfint[int[int[...]]]g�coMandatory:NoExplanation:Thisparameterspeciesthewayofcreatingeachencodedsegment.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,itwillbethesameforallsegments.Validvaluesare:0-Fromthehighesttothelowestbitplane1-FromthesrttothelastblockDefault:0��shiftTypefintg�stMandatory:NoExplanation:Levelshiftisapreprocessingoperationforunsignedchannelstoconverttheminsignedchannels.Itcanbeperformedinsomediferentways:0-Nolevelshift1-JPEG2000standardlevelshifting(onlynon-neg

ativechannels)2-Rangecentersubstract3-Av
ativechannels)2-Rangecentersubstract3-Averagesubstract4-Specicvaluessubstract(see”-sv”parameter)Default:0��shiftChannelsfboolean[boolean[boolean[...]]]g�scMandatory:NoExplanation:Specicationinwhichchannelslevelshiftwillbeapplied.Eachvaluespeciesachannel(0istherstimagechannel).Default:true��shiftValuesfint[int[int[...]]]g�svMandatory:NoExplanation:Substractedvaluesineachimagechannel.Ifonlyoneisspecied,thevaluewillbeusedforallimagechannelotherwiserstvalueisfortherstcomponent,secondvalueisforthesecondcomponent,andsoon.Default:null��coefcientsApproximationfint[int[int[...]]]g�caMandatory:NoExplanation:Thisparameterspeciestheapproximationtobeappliedtocoefcientsofeachchan-nel.Firstvalueisfortherstchannel,secondvalueforthesecondchannelandsoon.Ifonlyonevalueisspecied,itwillbethesameforallchannels.Validvaluesare:0-Casttointeger1-Round2-Floor3-CeilDefault:08��stageStopfint[int[int[...]]]g�ssMandatory:NoExplanation:Indicatesthestagewherethecodi&#

2;cationends.Ifonlyonevalueisspecied
2;cationends.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.IfthreelevelsofDWTareapplied,then:1-stage12-stage23-stage34-stage4Default:Thesameofwaveletlevelsplusone��useFillfint[int[int[...]]]g�ufMandatory:NoExplanation:SpecieswhetherllbitswillbeusedtoproduceSegByteLimitbytesineachsegment.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0��blocksPerSegmentfint[int[int[...]]]g�bsMandatory:NoExplanation:IndicatesthenumberofblockscontainedinasegmentDefault:1048576��WTTypefint[int[int[...]]]g�wtMandatory:NoExplanation:Discretewavelettransformtypeforeachimagecomponent.Firstvalueisfortherstcomponent,secondvalueforthesecondcomponentandsoon.Ifonlyonevalueisspecied,waveletetransformtypewillbethesameforallcomponents.Validvaluesare:0-Nowavelettransform1-Integer(Reversible)5/3DWT2-RealIsorange(irreversible)9/7DWT(JPEG2000standard)3-RealIsonorm(irreversible)9/7DWT(CCSDS-Recommended)4-Integer(Reversible)9/7MDWT(CCSDS-Recommended)5-Integer5/3DWT(classicconstruction)6-Integer

9/7DWT(classicconstruction)Default:4&
9/7DWT(classicconstruction)Default:4��signedPixelsfint[int[int[...]]]g�spMandatory:NoExplanation:Foreachsegment(entireimageimageintheRecommendation)speciesiftheinputpixelsaresignedorunsignedquantities.Default:0��transposeImgfint[int[int[...]]]g�tiMandatory:NoExplanation:Indicateswhetherthechannel(entireimageintheRecommendation)shouldbetrans-posedafterreconstructionDefault:0��codeWordLengthfint[int[int[...]]]g�clMandatory:NoExplanation:Indicatedthecodedwordlengthforeachsegment.Validvaluesare:0-8-bitword1-16-bitword2-24-bitword3-32-bitwordDefault:010��idDCfint[int[int[...]]]g�idMandatory:NoExplanation:NumberwhichindicateshowoftentheIDDCappears.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDDCwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:0��idACfint[int[int[...]]]g�iaMandatory:NoExplanation:NumberwhichindicateshowoftentheIDACappears.Firstvalueisfortherstsegment,secondval

ueforthesecondsegmentandsoon.Ifonlyoneva
ueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDACwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:0��entropyACfint[int[int[...]]]g�eaMandatory:NoExplanation:IntegerarraywhichindicatestheentropycoderselectedforcodingACcomponentsforeachsegment.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,theACentropycoderwillbethesameforallsegments.Validvaluesare:0-NoentropycodeforACcomponents1-CCSDSRecommendedentropycoderDefault:1��resolutionLevelsfint[int[int[...]]]g�rlMandatory:NoExplanation:Highestresolutionleveltobecodedforeachimagecomponent.0meansthatonlyLLsubbandwillbecompressed,1isLL+(HL1+LH1+HH1),2isLL+(HL1+LH1+HH1)+(HL2+LH2+HH2)andsoon.Valuesmustbebetween0toWTlevels.IfavalueisgreaterthanthenumberofWTlevelsitwillbeunderstoodthatallresolutionlevelsofthecomponentaretobecompressed.Ifonlyonevalueisspecied,itwillbeusedforallimagecomponents.Default:sameofWTlevelsspecied��verboseComputationfbooleang�vcMandatory:

NoExplanation:Showsomeinformationabout
NoExplanation:Showsomeinformationabouttimeandusedmemoryforeachcompressionstage.Valueisaboolean:0indicatesNOshowand1indicatesshow.Default:0��verboseParametersfbooleang�vpMandatory:NoExplanation:ShowTERencodingparameters.Valueisaboolean:0indicatesNOshowand1indicatesshow.Default:0��verboseMessagesfbooleang�vmMandatory:NoExplanation:ShowTERdecodermessages,forinstanceiftheleendsunexpectedly.Valueisaboolean:0indicatesNOshowand1indicatesshow.Default:0��padRowsfint[int[int[...]]]g�prMandatory:NoExplanation:Integerarraythatindicatesforeachchannelthenumberofpaddingrowstobedeletedaftertheinversewavelettransform.Ifonlyonevalueisspecied,padRowswillbethesameforallchannels.Default:0124ExamplesLOSSLESSCOMPRESSIONUSINGASINGLESEGMENT#TERcode-iworkDir/mars512x32.raw-g132512100-oworkDir/mars512x32.terThisexecutionwillgenerateale(compilantwiththeRecommendation)calledmars512x32.ter.ThedefaultmodeofTERislosslesscompressionusingasinglesegmentandemployingpart2,3and4agforthesegment.Todecompresstheleandrecovert

heoriginalimagerun:#TERdecode-iworkDir/m
heoriginalimagerun:#TERdecode-iworkDir/mars512x32.ter-oworkDir/mars512x32.ter.raw-g132512100Iftheuserwantstostoretheimageinaknownformat,forexample'pgm'format,thenthereisnotneededthegeometryoftheoutputimage.Theusercouldrun:#TERdecode-iworkDir/mars512x32.ter-oworkDir/mars512x32.ter.pgmLOSSLESSCOMPRESSIONUSINGMORETHANONESEGMENT#TERcode-iworkDir/sar16bit.raw-g1512512200-wt4–part2Flag10–part3Flag10–part4Flag10–blocksPerSegment64-oworkDir/sar16bit.raw.terThisexecutionwillgenerateale(compilantwiththeRecommendation)calledsar16bit.raw.ter.Thewaveletemployedistheinteger9/7,eachsegmentcontains64blocksandonlytherstsegmentcontainsthepart2,3and4header.AllothersegmentshaveonlyPart1header.Todecompresstheleandrecovertheoriginalimagerun:#./TERdecode-iworkDir/sar16bit.raw.ter-g1512512200-oworkDir/sar16bit.raw.ter.rawLOSSYCOMPRESSION#TERcode-iworkDir/foc.raw-g15121024200–pixelBitDepth12-–blocksPerSegment128wt3-oworkDir/foc.raw.terThisexectionusestheoat9/7wavelettransform,thensomelossisproducewhencoefcientsaretransformed.Todecompre

sstheleandrecovertheoriginalimagerun
sstheleandrecovertheoriginalimagerun:#TERdecode-iworkDir/foc.raw.ter-oworkDir/foc.raw.ter.raw-g15121024200COMPRESSIONUSINGAFIXEDSEGBYTELIMIT#./TERcode-iworkDir/sar16bit.raw-g1512512200-wt4–part2Flag10–part3Flag10–part4Flag10–blocksPerSegment64-oworkDir/sar16bit.raw.ter–segByteLimit3072–useFill1Thisexecutioncreatesalewhereeachsegmentsizeislimitedto3072bytes,incasethesizeofthesegmentinlowerthat3072,itiscompletedwithzerosuptotherequiredsize.Todecompresstheleandrecovertheoriginalimagerun:#./TERdecode-iworkDir/sar16bit.raw.ter-g1512512200-oworkDir/sar16bit.raw.ter.rawCOMPRESSIONUSINGCUSTOMWEIGHTS#TERcode-iworkDir/marstest.raw-g1512512100-wt4–part2Flag10–part3Flag10–part4Flag10–blocksPerSegment64–pixelBitDepth8-oworkDir/marstest.raw.ter-wg1-cw4442221111Thisexecutionproducesaencodedlewiththescalingfactorforeachsubbandofthetransformedimagegivenbytheuser.Todecompresstheleandrecovertheoriginalimagerun:#TERdecode-iworkDir/marstest.raw.ter-oworkDir/marstest.raw.ter.raw-g1512512100ONLYDCCOMPONENTSCO

MPRESSION#TERcode-iworkDir/marstest.raw-
MPRESSION#TERcode-iworkDir/marstest.raw-g1512512100-oworkDir/temp.coded-wt4–blocksPerSegment64–part2Flag10–part3Flag10–part4Flag10-dc1ThisexecutionproducesaencodedlewhereonlyDCcomponentsareencoded.Todecompresstheleandrecovertheoriginalimagerun:#TERdecode-iworkDir/marstest.raw.ter-oworkDir/marstest.raw.ter.raw-g1512512100COMPRESSIONUPTOAFIXEDBITPLANEANDSTAGE#TERcode-iworkDir/marstest.raw-g1512512100-oworkDir/marstest.raw.ter-wt4–blocksPerSegment64–part2Flag10–part3Flag10–part4Flag10-dc0-bp1-ss2Thisexecutionproducesaencodedlethateachsegmentisencodeduptothebitplane1andthestage2.Todecompresstheleandrecovertheoriginalimagerun:#TERdecode-iworkDir/marstest.raw.ter-g1512512100-oworkDir/marstest.raw.ter.rawCOMPRESSIONUSINGADIFFERENTANYNUMBEROFWAVELETLEVELS#TERcode-iworkDir/lena.pgm-wl5-wt3-oworkDir/lena.pgm.terThisexecutionproducesalethatisnotcompilantwiththeRecommendation.Todecompresstheleandrecovertheoriginalimagerun:#TERcode-iworkDir/lena.pgm.ter-wl5-wt3-oworkDir/lena.pgm.ter.pgm–recommendationno14

Related Contents


Next Show more