?? qccwavzerotree.3
字號:
.TH QCCWAVZEROTREE 3 "QCCPACK" "".SH NAMEQccWAVZerotree \- data structure .B QccWAVZerotreeand corresponding.B ZTfile format for zerotree.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "int QccWAVZerotreeInitialize(QccWAVZerotree *" zerotree );.br.BI "int QccWAVZerotreeCalcSizes(QccWAVZerotree *" zerotree );.br.BI "int QccWAVZerotreeAlloc(QccWAVZerotree *" zerotree );.br.BI "void QccWAVZerotreeFree(QccWAVZerotree *" zerotree );.br.BI "int QccWAVZerotreePrint(const QccWAVZerotree *" zerotree );.SH DESCRIPTIONQccPack provides data structure.B QccWAVZerotreefor representing a zerotree map for a dyadic subband decomposition.This zerotree would identify tree-like regions of zeros ina corresponding subband pyramid (a separate.B QccWAVSubbandPyramidstructure).The zerotree structure can be read from and written to .BR ZT -formatfiles, or a.B QccWAVZerotreestructure can be used without file input or output..LPThe main component of a.B QccWAVZerotreestructure is an array of symbols, where each symbol in the arraycorresponds to a wavelet coefficient in a subband pyramid.The value of the symbol indicates whether the coefficientin the subband pyramid is a significant coefficient, aninsignificant coefficient, or a zerotree root.The zerotree structure is a popular method for the coding of two-dimensionalimages..SH "DATA STRUCTURE"The.B QccWAVZerotreedata structure is defined as:.RS.nftypedef struct{ QccString filename; QccString magic_num; int major_version; int minor_version; int image_num_cols; int image_num_rows; double image_mean; int num_levels; int num_subbands; int alphabet_size; int *num_cols; int *num_rows; char ***zerotree;} QccWAVZerotree;.fi.RE.LPThe fields of.B QccWAVZerotreeare as follows:.TP.I filenameThe name of the file..TP.IR magic_num ", " major_version ", " minor_versionThe magic number and version of the file..TP.IR image_num_cols ", " image_num_rowsThe size of the zerotree array (which is also the size of the originaltwo-dimensional image)..TP.IR image_meanThe mean of the original image..TP.IR num_levelsNumber of levels (scales) of dyadic subband decomposition in the subbandpyramid for which the zerotree is constructed..TP.IR num_subbandsThe number of subbands in the dyadic subband decomposition (equal to.RI 3* num_levels " + 1).".TP.IR alphabet_sizeNumber of distinct, non-null symbols that can occur in the.I zerotreearray (will be.BR QCCWAVZEROTREE_NUMSYMBOLS )..TP.IR num_cols ", " num_rowsThe number of columns and rows, respectively, of each subband of thedyadic subband pyramid. Both of these two arrays have.IR num_subbandsentries..TP.IR zerotreeThe array of symbols giving the zerotree map..LPThe .I zerotreearray contains a symbol for each coefficient in the correspondingsubband pyramid. The value of this symbol can be one of the following:.TP.B QCCWAVZEROTREE_SYMBOLSIGNIFICANTThe corresponding coefficient is significant..TP.B QCCWAVZEROTREE_SYMBOLINSIGNIFICANTThe corresponding coefficient is insignificant..TP.B QCCWAVZEROTREE_SYMBOLZTROOTThe corresponding coefficient is a zerotree root..LPAdditionally, QccPack provides the symbol.B QCCWAVZEROTREE_SYMBOLTEMPfor a temporary labeling of a zerotree symbol.Symbols can be marked as "null" symbolsuse the function.BR QccWAVZerotreeMakeNullSymbol (3)to do this, .BR QccWAVZerotreeMakeSymbolNonnull (3)to reverse the "null" marking,and .BR QccWAVZerotreeNullSymbol (3)to determine if a zerotree-array symbol is null or not..SH "FILE FORMAT"For reading and writing structuresof type.BR QccWAVZerotree ,QccPack provides the.B ZTfile format.This file format starts with an ASCII header followed bybinary data.The ASCII header consists of magic-number/revisioninformationfollowed by any amount of white space(space, `\\t' (tab), `\\n' (newline), `\\r' (carriage return)) and/orcomments lines (lines starting with `#'). Following this white space,additional ASCIIheader information is given, separated by blanks and newlines.binary data follows this ASCII header information.Note: one (and only one) newline .B mustimmediately follow the last component of ASCII header information before thestart of the binary data..LPThe.B ZTfile format consists of the following information:.RS.sp.BI ZT X.X.br.I "<white space>".br.I image_num_cols.br.I image_num_rows.br.I image_mean.br.I num_levels.br.I alphabet_size.br.I "<zerotree array>".br\|..br\|..br\|..br.sp.REwhere.B ZTis the magic number,.I X.Xis the version number,.I "<white space>"is white space and/or comment lines, and.IR image_num_cols ", " image_num_rows ", " image_mean ", " num_levels ", "and.IR alphabet_sizeare ASCII representations of the corresponding fields of the.B QccWAVZerotreestructure.Following the ASCII header information, the.I zerotree array is stored in binary with each zerotree symbol isstored as a 8-bit binary character..SH "ROUTINES".B QccWAVZerotreeInitialize()should be called before any use of a.B QccWAVZerotreestructure..B QccWAVZerotreeInitialize()initializes the fields of.I zerotreeto the following values:.RS.IR filename :.B NULLstring.br.IR magic_num :.B QCCZEROTREE_MAGICNUM.br.IR major_version ", " minor_version :initialized to output of .BR QccGetQccPackVersion (3).br.IR image_num_cols :0.br.IR image_num_rows :0.br.IR image_mean :0.br.IR num_levels :0.br.IR alphabet_size :.B QCCWAVZEROTREE_NUMSYMBOLS.br.IR num_cols :.B NULL.br.IR num_rows :.B NULL.br.IR zerotree :.B NULL.RE.LP.B QccWAVZerotreeCalcSizes()calculates the size of each subband in the corresponding subband pyramidand fills in values for the.I zerotree->num_colsand.I zerotree->num_rowsarrays.Both these arrays must be allocated with enough space for.I zerotree->num_subbandsentries prior to calling.BR QccWAVZerotreeCalcSizes() .In addition, the original image size must be assigned to.I zerotree->image_num_colsand.IR zerotree->image_num_rows ,and the number of levels of subband decomposition to.IR zerotree->num_levels ..LP.B QccWAVZerotreeAlloc()allocates space for.IR zerotree->num_cols ,.IR zerotree->num_rows ,and.IR zerotree->zerotree .Prior to calling.BR QccWAVZerotreeAlloc() ,.IR zerotree->num_subbands ,.IR zerotree->num_levels ,.IR zerotree->image_num_rows ,and.IR zerotree->image_num_colsmust contain valid values.Allocation of each of the arrays is performed only if the pointer for thearray is .BR NULL ..LP.B QccWAVZerotreeFree()frees the arrays allocated by.BR QccWAVZerotreeAlloc().LP.B QccWAVZerotreePrint()prints the contents of.I zerotreeto stdout..SH "RETURN VALUE"These routines return 0 on success, and 1 on failure..SH "SEE ALSO".BR QccWAVZerotreeNullSymbol (3),.BR QccWAVSubbandPyramid (3),.BR QccPackWAV (3),.BR QccPack (3).LPJ. M. Shapiro,"Embedded Image Coding Using Zerotrees of Wavelet Coefficients,".IR "IEEE Transactions on Signal Processing" ,vol. 41, no. 12, pp. 3445-3462, December 1993..SH AUTHORCopyright (C) 1997-2005 James E. Fowler.\" The programs herein are free software; you can redistribute them an.or.\" modify them under the terms of the GNU General Public License.\" as published by the Free Software Foundation; either version 2.\" of the License, or (at your option) any later version..\" .\" These programs are distributed in the hope that they will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the.\" GNU General Public License for more details..\" .\" You should have received a copy of the GNU General Public License.\" along with these programs; if not, write to the Free Software.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -