00part3Flag fintintintg 0h3 MandatoryNo Explanation IndicatesforeachsegmentthepresenceofPart3header0Part3headerabsent1Part3headerpresent Default 1 00part4Flag fintintin ID: 816895
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.
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.pgm2part3Flagfint[int[int[...]]]gh3Mandatory:NoExplanation:IndicatesforeachsegmentthepresenceofPart3header.0-Part3headerabsent1-Part3headerpresentDefault:1part4Flagfint[int[int[...]]]gh4Mandatory:NoExplanation:IndicatesforeachsegmentthepresenceofPart4header.0-Part4headerabsent1-Part4headerpresentDefault:1segByteLimitfint[int[in
t[...]]]gblMandatory:NoExplanatio
t[...]]]gblMandatory:NoExplanation:Maximumnumberofbytesthatcanbeusedinasegment.ThevalueofSegByteLimitsincludesbytesusedfortheheader,andisappliedtothesubsequentsegmentsuntilanewvalueisgiven.Valueshouldbeintheinterval(0,134217728]anditisexpressedmod(134217728)Default:134217728DCStopfint[int[int[...]]]gdcMandatory:NoExplanation:IndicateswhethercompressedoutputstopsaftercodingofquantizedDCcoefcients.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0bitPlaneStopfint[int[int[...]]]gbpMandatory:NoExplanation:OnlyusedwhenDCStopequals0.Indicatesthebitplaneindexwherethecodicationshouldstop.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0stageStopfint[int[int[...]]]gssMandatory:NoExplanation:Indicatesthestagewherethecodicationends.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.IfthreelevelsofDWTareapplied,then:1-stage12-stage23-stage34-stage4Default:ThesameofwaveletlevelsplusoneuseFillfint[int[int[...]]]gufMandatory:
NoExplanation:Specieswhetherll
NoExplanation:SpecieswhetherllbitswillbeusedtoproduceSegByteLimitbytesineachsegment.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0blocksPerSegmentfint[int[int[...]]]gbsMandatory:NoExplanation:IndicatesthenumberofblockscontainedinasegmentDefault:1048576optDCSelectfint[int[int[...]]]gdsMandatory:NoExplanation:IndicatesthemethodusedtoselectkparameterwhilecodingDCcomponentsDefault:1optACSelectfint[int[int[...]]]gasMandatory:NoExplanation:IndicatesthemethodusedtoselectkparameterwhilecodingBitDepthACBlockcom-ponentsDefault:14WTLevelsfint[int[int[...]]]gwlMandatory:NoExplanation:Discretewavelettransformlevelsforeachimagecomponent.Firstvalueisfortherstcomponent,secondvalueforthesecondcomponentandsoon.Ifonlyonevalueisspecied,wavelettransformlevelswillbethesameforallcomponents.Default:3imageExtensionTypefint[int[int[...]]]gieMandatory:NoExplanation:Indicatesthekindofextensionthathasbeenappliedtotheeachcomponentoftheimageinorder
tomakeitabletobecompressedusingTER.Ifonl
tomakeitabletobecompressedusingTER.Ifonlyonevalueisspecied,imageextensiontypewillbethesameforallcomponents.Validvaluesare:0-Repeatinglastvalue1-Symmetricexpansion2-NoextensionDefault:0WTOrderfint[int[int[...]]]gwoMandatory:NoExplanation:OrderinwhichtheDiscretewavelettransformisperformedoverthespatialdimen-tions.Firstvalueisfortherstcomponent,secondvalueforthesecondcomponentandsoon.Ifonlyonevalueisspecied,wavelettransformorderwillbethesameforallcomponents.0-Horizontal-Vertical1-Vertical-Horizontal2-OnlyhorizontalDefault:0gaggleDCSizefint[int[int[...]]]ggdMandatory:NoExplanation:SizeofagaggleforDCcomponentsineachsegmentoftheimage.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thesizeofDCgaggleswillbethesameforallsegments.0valuemeansthatalltheblocksofthesegmentareinthesamegaggleDefault:16gaggleACSizefint[int[int[...]]]ggaMandatory:NoExplanation:SizeofagaggleforACcomponentsineachsegmentoftheimage.Firstvalueisfortherstsegment,secondvaluefo
rthesecondsegmentandsoon.Ifonlyonevaluei
rthesecondsegmentandsoon.Ifonlyonevalueisspecied,thesizeofACgaggleswillbethesameforallsegments.0valuemeansthatalltheblocksofthesegmentareinthesamegaggleDefault:16idDCfint[int[int[...]]]gidMandatory:NoExplanation:NumberwhichindicateshowoftentheIDDCappears.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDDCwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:0idACfint[int[int[...]]]giaMandatory:NoExplanation:NumberwhichindicateshowoftentheIDACappears.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDACwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:06truncationPointsfint[int[int[...]]]gtpMandatory:NoExplanation:Foreachsegmentspeciestheavailabletruncationpoints.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thetruncationpointswillbethesameforallsegments.Vali
dvaluesare:0-any1-endofbitplane(bitPlane
dvaluesare:0-any1-endofbitplane(bitPlaneStop)2-endofresolutionlevel(stageStop)3-endofgaggleDefault:0adjustHeaderParametersfint[int[int[...]]]gapMandatory:NoExplanation:Foreachsegmentspeciestheparametersthatshouldbeadjusted.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,theasjustedparameterswillbethesameforallsegments.Validvaluesare:0-Noadjustement1-AdjustsegByteLimitanduseFillafterinterleavingDefault:0compressionOrderfint[int[int[...]]]gcoMandatory:NoExplanation:Thisparameterspeciesthewayofcreatingeachencodedsegment.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,itwillbethesameforallsegments.Validvaluesare:0-Fromthehighesttothelowestbitplane1-FromthesrttothelastblockDefault:0shiftTypefintgstMandatory:NoExplanation:Levelshiftisapreprocessingoperationforunsignedchannelstoconverttheminsignedchannels.Itcanbeperformedinsomediferentways:0-Nolevelshift1-JPEG2000standardlevelshifting(onlynon-neg
ativechannels)2-Rangecentersubstract3-Av
ativechannels)2-Rangecentersubstract3-Averagesubstract4-Specicvaluessubstract(see-svparameter)Default:0shiftChannelsfboolean[boolean[boolean[...]]]gscMandatory:NoExplanation:Specicationinwhichchannelslevelshiftwillbeapplied.Eachvaluespeciesachannel(0istherstimagechannel).Default:trueshiftValuesfint[int[int[...]]]gsvMandatory:NoExplanation:Substractedvaluesineachimagechannel.Ifonlyoneisspecied,thevaluewillbeusedforallimagechannelotherwiserstvalueisfortherstcomponent,secondvalueisforthesecondcomponent,andsoon.Default:nullcoefcientsApproximationfint[int[int[...]]]gcaMandatory:NoExplanation:Thisparameterspeciestheapproximationtobeappliedtocoefcientsofeachchan-nel.Firstvalueisfortherstchannel,secondvalueforthesecondchannelandsoon.Ifonlyonevalueisspecied,itwillbethesameforallchannels.Validvaluesare:0-Casttointeger1-Round2-Floor3-CeilDefault:08stageStopfint[int[int[...]]]gssMandatory:NoExplanation:Indicatesthestagewherethecodi
2;cationends.Ifonlyonevalueisspecied
2;cationends.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.IfthreelevelsofDWTareapplied,then:1-stage12-stage23-stage34-stage4Default:ThesameofwaveletlevelsplusoneuseFillfint[int[int[...]]]gufMandatory:NoExplanation:SpecieswhetherllbitswillbeusedtoproduceSegByteLimitbytesineachsegment.Ifonlyonevalueisspecied,typewillbeusedforallimagesegments.Default:0blocksPerSegmentfint[int[int[...]]]gbsMandatory:NoExplanation:IndicatesthenumberofblockscontainedinasegmentDefault:1048576WTTypefint[int[int[...]]]gwtMandatory: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:4signedPixelsfint[int[int[...]]]gspMandatory:NoExplanation:Foreachsegment(entireimageimageintheRecommendation)speciesiftheinputpixelsaresignedorunsignedquantities.Default:0transposeImgfint[int[int[...]]]gtiMandatory:NoExplanation:Indicateswhetherthechannel(entireimageintheRecommendation)shouldbetrans-posedafterreconstructionDefault:0codeWordLengthfint[int[int[...]]]gclMandatory:NoExplanation:Indicatedthecodedwordlengthforeachsegment.Validvaluesare:0-8-bitword1-16-bitword2-24-bitword3-32-bitwordDefault:010idDCfint[int[int[...]]]gidMandatory:NoExplanation:NumberwhichindicateshowoftentheIDDCappears.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDDCwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:0idACfint[int[int[...]]]giaMandatory:NoExplanation:NumberwhichindicateshowoftentheIDACappears.Firstvalueisfortherstsegment,secondval
ueforthesecondsegmentandsoon.Ifonlyoneva
ueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,thefrequencyofIDACwillbethesameforallsegments.0valuemeansthatonlyanIDDCisusedforthesegmentDefault:0entropyACfint[int[int[...]]]geaMandatory:NoExplanation:IntegerarraywhichindicatestheentropycoderselectedforcodingACcomponentsforeachsegment.Firstvalueisfortherstsegment,secondvalueforthesecondsegmentandsoon.Ifonlyonevalueisspecied,theACentropycoderwillbethesameforallsegments.Validvaluesare:0-NoentropycodeforACcomponents1-CCSDSRecommendedentropycoderDefault:1resolutionLevelsfint[int[int[...]]]grlMandatory:NoExplanation:Highestresolutionleveltobecodedforeachimagecomponent.0meansthatonlyLLsubbandwillbecompressed,1isLL+(HL1+LH1+HH1),2isLL+(HL1+LH1+HH1)+(HL2+LH2+HH2)andsoon.Valuesmustbebetween0toWTlevels.IfavalueisgreaterthanthenumberofWTlevelsitwillbeunderstoodthatallresolutionlevelsofthecomponentaretobecompressed.Ifonlyonevalueisspecied,itwillbeusedforallimagecomponents.Default:sameofWTlevelsspeciedverboseComputationfbooleangvcMandatory:
NoExplanation:Showsomeinformationabout
NoExplanation:Showsomeinformationabouttimeandusedmemoryforeachcompressionstage.Valueisaboolean:0indicatesNOshowand1indicatesshow.Default:0verboseParametersfbooleangvpMandatory:NoExplanation:ShowTERencodingparameters.Valueisaboolean:0indicatesNOshowand1indicatesshow.Default:0verboseMessagesfbooleangvmMandatory:NoExplanation:ShowTERdecodermessages,forinstanceiftheleendsunexpectedly.Valueisaboolean:0indicatesNOshowand1indicatesshow.Default:0padRowsfint[int[int[...]]]gprMandatory: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-wt4part2Flag10part3Flag10part4Flag10blocksPerSegment64-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-g15121024200pixelBitDepth12-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-wt4part2Flag10part3Flag10part4Flag10blocksPerSegment64-oworkDir/sar16bit.raw.tersegByteLimit3072useFill1Thisexecutioncreatesalewhereeachsegmentsizeislimitedto3072bytes,incasethesizeofthesegmentinlowerthat3072,itiscompletedwithzerosuptotherequiredsize.Todecompresstheleandrecovertheoriginalimagerun:#./TERdecode-iworkDir/sar16bit.raw.ter-g1512512200-oworkDir/sar16bit.raw.ter.rawCOMPRESSIONUSINGCUSTOMWEIGHTS#TERcode-iworkDir/marstest.raw-g1512512100-wt4part2Flag10part3Flag10part4Flag10blocksPerSegment64pixelBitDepth8-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-wt4blocksPerSegment64part2Flag10part3Flag10part4Flag10-dc1ThisexecutionproducesaencodedlewhereonlyDCcomponentsareencoded.Todecompresstheleandrecovertheoriginalimagerun:#TERdecode-iworkDir/marstest.raw.ter-oworkDir/marstest.raw.ter.raw-g1512512100COMPRESSIONUPTOAFIXEDBITPLANEANDSTAGE#TERcode-iworkDir/marstest.raw-g1512512100-oworkDir/marstest.raw.ter-wt4blocksPerSegment64part2Flag10part3Flag10part4Flag10-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.pgmrecommendationno14