srencode [-w wavelet] [-b boundary] [-pw pcpfile] [-nl levels] [-q stepsize] [-d dead_zone] [-vo] imgfile bitstream
srdecode [-w wavelet] [-b boundary] [-pw pcpfile] bitstream imgfile
srencode codes an image, imgfile, using the stack-run (SR) algorithm by Tsai et al. The SR algorithm involves a 2D DWT followed by uniform scalar quantization of the wavelet coefficients. Runs of the zero index are identified and are run-length encoded. The SR algorithm then uses a 4-symbol alphabet to code the binary digits of the runs and the quantizer indices of the nonzero coefficients (the "stacks"). The stream of symbols from this 4-symbol alphabet is then coded with arithmetic entropy coding.
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 rate-distortion performance of the SR algorithm is determined by the stepsize of the uniform scalar quantizer, specified with the -q option. Additionally, an optional dead zone may be applied to the uniform scalar quantizer. That is, the size of the quantizer bin centered at zero may be enlarged so that more wavelet coefficients are quantized to zero, consequently increasing the likelihood of longer runs (see squniform(1) for more details).
srencode 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 SR given by Tsai et al. does not include perceptual weighting as allowed by srencode (the -pw option). Refer to imgdwt(1) and QccWAVPerceptualWeights(3) for details on the implementation of perceptual weighting.
Note: srencode currently achieves rate-distortion performance slightly below that reported by Tsai et al. For instance, when coding the "Barbara" image at 0.5 bits/pixel, srencode achieves a PSNR about 0.5dB below the reported figure. The reasons for this performance gap are currently being investigated.
srdecode performs the corresponding decoding using the SR algorithm, decoding the bitstream made by srencode and producing a reconstructed image, imgfile. For sane results, wavelet, boundary, and pcpfile should be the same as they were for srencode.
M.-J. Tsai, J. D. Villasenor, and F. Chen, "Stack-Run Image Coding," IEEE Transactions on Circuits and Systems for Video Technology, vol. 6, no. 5, pp. 519-521, October 1996.
M.-J. Tsai, J. D. Villasenor, and F. Chen, "Stack-Run Coding for Low Bit Rate Image Communication," Proceedings IEEE International Conference on Image Processing, pp. 681-684, September 1996.