tarpencode [-w wavelet] [-b boundary] [-nl levels] [-m mask] [-vo] [-a alpha] rate imgfile bitstream
tarpdecode [-w wavelet] [-b boundary] [-m mask] [-r rate] bitstream imgfile
tarpencode codes an image, imgfile, using the tarp algorithm by Simard et al. The tarp algorithm involves a 2D DWT followed by a progressive "bitplane" coding of the wavelet coefficients using a Parzen-window technique to estimate probability of significance and nonadaptive arithmetic coding to code significance-map and refinement information. See QccWAVTarpEncode(3) for more detail on the algorithm.
The transform is either the usual discrete wavelet transform (DWT) or a shape-adaptive DWT (SA-DWT); see imgdwt(1) for complete details. Option -w specifies the wavelet, option -b specifies the boundary extension, and option The -m option gives the image file to be used as a transparency mask for the SA-DWT. mask must be a grayscale image in which black in this image indicates transparency, white indicates full opacity, and gray tones are degrees of translucence (see QccAlpha(3) ). If the -m option is not given, the usual DWT is used.
The desired bitrate of the output bitstream is specified by rate, which is expressed in bits per pixel of the original image. tarpencode normally prints to stdout a small amount of information concerning this target bitrate and the actual bitrate achieved. Usually these rates are identical, but may differ slightly. If the -vo (value-only) option is given, all printed output is suppressed except for the actual bitrate.
tarpdecode performs the corresponding decoding using the tarp algorithm, decoding the bitstream made by tarpencode and producing a reconstructed image, imgfile. For sane results, wavelet, and boundary should be the same as they were for tarpencode, and mask should be the same if an SA-DWT was used as the transform. If a decoding rate is specified with the -r option, then tarpdecode stops decoding when rate bits per pixel from the input bitstream have been decoded. Otherwise, decoding stops when the end of the input bitstream is reached.
tarpencode and tarpdecode call QccWAVTarpEncode(3) and QccWAVTarpDecode(3) , respectively, to perform tarp encoding and decoding. Refer to the man pages for these functions for more information on the details of the QccPack implementation of the tarp algorithm.
P. Simard, D. Steinkraus, and H. Malvar, "On-Line Adaptation in Image Coding with a 2-D Tarp Filter", in Proceedings of the IEEE Data Compression Conference, J. A. Storer and M. Cohn, Eds., Snowbird, UT, April 2002, pp. 422-431.