?? qccspiht3dencode.3
字號:
.TH QCCSPIHT3DENCODE 1 "QCCPACK" "".SH NAMEQccSPIHT3DEncode, QccSPIHT3DDecode \-encode/decode an image cube using the 3D-SPIHT algorithm.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "int QccSPIHT3DEncode(const QccIMGImageCube *" image ", const QccIMGImageCube *" mask ", QccBitBuffer *" buffer ", int " transform_type ", int " zerotree_type ", int " temporal_num_levels ", int " spatial_num_levels ", const QccWAVWavelet *" wavelet ", int " target_bit_cnt ", int " arithmetic_coded );.sp.BI "int QccSPIHT3DEncode2(QccWAVSubbandPyramid3D *" image_subband_pyramid ", QccWAVSubbandPyramid3D *" mask_subband_pyramid ", int " transform_type ", int " zerotree_type ", double " image_mean ", QccBitBuffer *" buffer ", int " target_bit_cnt ", int " arithmetic_coded );.sp.BI "int QccSPIHT3DDecodeHeader(QccBitBuffer *" buffer ", int *" transform_type ", int *" zerotree_type ", int *" temporal_num_levels ", int *" spatial_num_levels ", int *" num_frames ", int *" num_rows ", int *" num_cols ", double *" image_mean ", int *" max_coefficient_bits ", int *" arithmetic_coded );.sp.BI "int QccSPIHT3DDecode(QccBitBuffer *" buffer ", QccIMGImageCube *" image ", const QccIMGImageCube *" mask ", int " transform_type ", int " zerotree_type ", int " temporal_num_levels ", int " spatial_num_levels ", const QccWAVWavelet *" wavelet ", double " image_mean ", int " max_coefficient_bits ", int " target_bit_bit ", int " arithmetic_coded );.sp.BI "int QccSPIHT3DDecode2(QccBitBuffer *" buffer ", QccWAVSubbandPyramid3D *" image_subband_pyramid ", QccWAVSubbandPyramid3D *" mask_subband_pyramid ", int " transform_type ", int " zerotree_type ", int " temporal_num_levels ", int " spatial_num_levels ", int " max_coefficient_bits ", int " target_bit_cnt ", int " arithmetic_coded );.SH DESCRIPTION.SS Encoding.LP.B QccSPIHT3DEncode()encodes an image cube,.IR image ,using a 3D generalization of theSet Partitioning In Hierarchical Trees (SPIHT) algorithm.The original SPIHT algorithm was developed for 2D images bySaid and Pearlman; it was latter extended to 3D byKim, Pearlman, and Xiong.In essence, the 3D-SPIHT algorithm involves a 3D DWT followed by a progressive "bitplane" coding of the wavelet coefficients using azerotree-like quantization structure..LP.I imageis the image cube to be coded and.I bufferis the output bitstream..I buffermust be of.B QCCBITBUFFER_OUTPUTtype and opened via a prior call to.BR QccBitBufferStart (3)..LP.BR QccSPIHT3DEncode ()supports the use of both wavelet-packet and dyadic wavelet-transformdecompositions.Furthermore a variety of zerotree structures are available.If.IR transform_typeis.BR QCCWAVSUBBANDPYRAMID3D_DYADIC ,a dyadic DWT is used; if.IR transform_typeis.BR QCCWAVSUBBANDPYRAMID3D_PACKET ,a wavelet-packet DWT is used.If.IR zerotree_typeis.BR QCCSPIHT3D_ZEROTREE_DYADIC ,a dyadic zerotree structure is used; if.IR zerotree_typeis.BR QCCSPIHT3D_ZEROTREE_PACKET ,a symmetric wavelet-packet zerotree structure is used; while if.IR zerotree_typeis.BR QCCSPIHT3D_ZEROTREE_ASPACKET ,an asymmetric wavelet-packet zerotree structure is used.See "DYADIC VS. WAVELET-PACKET TRANSFORMS AND ZEROTREES"below for more detail..IR temporal_num_levels and.IR spatial_num_levelsgive the number of levels of wavelet decomposition to performfor both transform types; for a dyadic transform,.IR temporal_num_levels must equal.IR spatial_num_levels .Furthermore, if.IR zerotree_typeis.BR QCCSPIHT3D_ZEROTREE_DYADICor.BR QCCSPIHT3D_ZEROTREE_PACKET ,.IR temporal_num_levels must equal.IR spatial_num_levels ..I waveletis the wavelet to use for decomposition..LPThe bitstream output from the 3D-SPIHT encoder is embedded, meaning thatany prefix of the bitstream can be decoded to give a valid representation of the image. The 3D-SPIHT encoder essentially producesoutput bits until the number of bits output reaches.IR target_bit_cnt ,the desired (target) total length of the output bitstream in bits,and then it stops.Note that this is the bitstream length in bits, not the rate of the bitstream(which would be expressed in bits per voxel)..LPAs originally described by Said and Pearlman,the 2D-SPIHT algorithm uses arithmetic coding of symbols as a final output stepto improve coding efficiency. Alternatively, arithmetic coding can besuppressed, producing what Said and Pearlman call "binary-uncoded"output.The QccPack 3D-SPIHT implementation supports both arithmetic-codedand binary-uncoded output modes..I arithmetic_codedis a flag passed to.BR QccSPIHT3DEncode()that indicates whether arithmetic coding should be performed(1 = arithmetic coding, 0 = binary-uncoded)..LP.BR QccSPIHT3DEncode()optionally supports the use of a shape-adaptive DWT (SA-DWT) rather thanthe usual DWT. That is, .BR QccSPIHT3DEncode()can call.BR QccWAVSubbandPyramid3DShapeAdaptiveDWT (3)as the wavelet transform rather than the usual.BR QccWAVSubbandPyramid3DDWT (3).The use of a SA-DWT is indicated by a non-NULL.IR mask ;if .I maskis NULL, then the usual DWT is used.In the case of a SA-DWT,.I mask gives the transparency mask which indicates which voxels of the imageare non-transparent and thus have data that is to be transformed.Refer to .BR QccWAVSubbandPyramid3DShapeAdaptiveDWT (3)for more details on the calculation of this SA-DWT.See "SHAPE-ADAPTIVE CODING" below for details on how the 3D-SPIHTalgorithm handles shape-adaptive coding..LPThe routine.BR QccSPIHT3DEncode2()provides an alternative interface to 3D-SPIHT encoding.Specifically,.BR QccSPIHT3DEncode2()functions indentically to.BR QccSPIHT3DEncode()described above, except that both the image cube and optional mask areassumed to have had a 3D DWT applied to them prior to calling.BR QccSPIHT3DEncode2() .As a consequence, the image cube and mask are passed to.BR QccSPIHT3DEncode2()in the wavelet domain as.IR image_subband_pyramidand.IR mask_subband_pyramid .We note that most applications should opt for.BR QccSPIHT3DEncode()rather than.BR QccSPIHT3DEncode2() ;however,.BR QccSPIHT3DEncode()is implemented essentially as a call to an appropriate 3D DWTfollowed by a call to.BR QccSPIHT3DEncode2() .If .BR QccSPIHT3DEncode2()is used, it is the responsibility of the calling routineto perform the appropriate 3D DWT prior to calling.BR QccSPIHT3DEncode2() ..SS Decoding.LP.B QccSPIHT3DDecodeHeader()decodes the header information in a bitstream previously produced by.BR QccSPIHT3DEncode() .The input bitstream is.I bufferwhich must be of.B QCCBITBUFFER_INPUTtype and opened via a prior call to.BR QccBitBufferStart (3)..LPThe header information is returned in.I transform_type(either.BR QCCWAVSUBBANDPYRAMID3D_DYADIC or.BR QCCWAVSUBBANDPYRAMID3D_PACKET to indicate a dyadic or wavelet-packet transform decomposition, respectively),.I zerotree_type.RB ( QCCSPIHT3D_ZEROTREE_DYADIC ,.BR QCCSPIHT3D_ZEROTREE_PACKET ,or.BR QCCSPIHT3D_ZEROTREE_ASPACKET ,.BR to indicate a dyadic, symmetric-packet, or asymmetric-packetzerotree structure, respectively),.I temporal_num_levels(number of levels of wavelet decomposition in the temporal direction),.I spatial_num_levels(number of levels of wavelet decomposition in the spatial directions),.I num_frames(size of the image cube in the temporal direction),.I num_rows(vertical size of image cube),.I num_cols(horizontal size of image cube),.I image_mean(the mean value of the original image cube),.I max_coefficient_bits(indicates the precision, in number of bits, of the wavelet coefficientwith the largest magnitude),and.I arithmetic_coded(indicates whether the to data stream to follow is arithmetic-coded or not)..LP.B QccSPIHT3DDecode()decodes the bitstream.IR buffer ,producing the reconstructed image cube,.IR image .The bitstream must already have had its header read by a prior callto.B QccSPIHT3DDecodeHeader()(i.e., you call.B QccSPIHT3DDecodeHeader() first and then.BR QccSPIHT3DDecode() ).If.I target_bit_cntis.BR QCCENT_ANYNUMBITS ,then decoding stops when the end of the input bitstream is reached;otherwise, decoding stops when.I target_num_bitsfrom the input bitstream have been decoded..LPIf a SA-DWT was used in 3D-SPIHT encoding, then the original transparencymask should be passed to .BR QccSPIHT3DDecode()as.IR mask .That is,.I maskshould be the same transparency mask (untransformed) that was passed to.BR QccSPIHT3DEncode() .Note that.BR QccSPIHT3DDecode()will transform this.I maskvia a Lazy wavelet transform, and then pass the transformed maskto .BR QccWAVSubbandPyramid3DInverseShapeAdaptiveDWT (3).If the usual, full-volume DWT was used in encoding, then.I maskshould be a NULL pointer.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -