sfqdecode [-w wavelet] [-b boundary] [-pw pcpfile] bitstream imgfile
sfqencode codes an image, imgfile, using the space-frequency-quantization (SFQ) algorithm of Xiong et al. The SFQ algorithm involves a 2D DWT followed by the identification of zerotrees based on a rate-distortion criterion. The zerotree structure indicates which wavelet coefficients are "insignificant." Coding these insignificant coefficients costs more in bit rate than the possible gain in distortion performance; consequently, these insignificant coefficients are set to zero. Uniform scalar quantization followed by arithmetic entropy coding is used to code all remaining significant coefficients.
The DWT is performed as described for imgdwt(1) . Option -w specifies the wavelet, option -b specifies the boundary extension, and option -pw indicates whether perceptual weighting is to be used. See imgdwt(1) for more details.
The SFQ algorithm operates using a Lagrangian cost formulation of the form J = D + lambda * R where D is distortion, R is rate, and lambda is the Lagrangian rate-distortion parameter given by the -l option. lambda determines the balance between rate and distortion in the algorithm: large values of lambda emphasize reduction of bit rate over distortion; small values of lambda produce codings with lower distortion but at a consequently higher rate. Varying lambda from 0 to infinity will trace out the rate-distortion performance curve of the SFQ algorithm for a particular input image and for a particular scalar-quantizer stepsize; a single lambda thus specifies an operating point on this rate-distortion curve.
The performance of the SFQ algorithm depends not only on lambda but also on the chosen scalar-quantizer stepsizes. The option -hpq specifies the scalar-quantizer stepsize to be used in the coding of the highpass subbands; the baseband, coded independently from the highpass subbands, uses the stepsize given by the -bbq option. If a highpass stepsize is not specified (i.e., no -hpq option given), sfqencode determines an "optimal" stepsize by searching in a set of 245 stepsizes between 7.6 and 32. The optimal stepsize is the one in the set found to minimize the rate-distortion cost criterion J (see above). Note: this search process essentially implies coding the highpass subbands 245 times and choosing the best coding; it is consequently quite slow. A similar search is performed for the baseband stepsize in the case that the -bbq option is not given.
sfqencode normally prints to stdout a small amount of information concerning the encoding being performed, most notably the bit rate, expressed in bits per pixel, achieved by the program. If the -vo (value-only) option is given, this printed output is suppressed except for the bit rate.
Note: the original presentation of SFQ given by Xiong et al. describes a method for predicting portions of the zerotree for high-frequency subbands based on the zerotree for lower-frequency subbands. sfqencode, as currently implemented, does not perform this zerotree prediction.
Note: the original presentation of SFQ given by Xiong et al. does not include perceptual weighting as allowed by sfqencode (the -pw option). Refer to imgdwt(1) and QccWAVPerceptualWeights(3) for details on the implementation of perceptual weighting.
Note: sfqencode currently achieves rate-distortion performance slightly below that reported by Xiong et al. For instance, when coding the "Barbara" image at 0.5 bits/pixel, sfqencode achieves a PSNR about 1dB below the reported figure. The reasons for this performance gap are currently being investigated, although it is probably due in part to the lack of tree prediction as described above.
Z. Xiong, K. Ramchandran, and M. T. Orchard, "Space-Frequency Quantization for Wavelet Image Coding," IEEE Transactions on Image Processing, vol. 6, no. 5, pp. 677-693, May 1997.