Table of Contents

NAME

spihtencode, spihtdecode - encode/decode an image using the SPIHT algorithm

SYNOPSIS

spihtencode [-w wavelet] [-b boundary] [-pw pcpfile] [-nl num_levels] [-noac] [-m mask] [-rd rd_file] [-vo] rate imgfile bitstream

spihtdecode [-w wavelet] [-b boundary] [-pw pcpfile] [-m mask] [-r rate] bitstream imgfile

OPTIONS

-w wavelet
String. Name of the wavelet file (FBK or LFT format); default = "CohenDaubechiesFeauveau.9-7.lft"
-b boundary
String. Type of boundary extension; default = "symmetric".
-pw pcpfile
String. Name of file containing perceptual weights.
-nl num_levels
Integer. Number of levels of dyadic decomposition; default value is 5 levels.
-noac
Do not use arithmetic coding during encoding; i.e., produce "binary-uncoded" output. Default is to use arithmetic coding.
-m mask
String. Name of file containing the transparency mask for shape-adaptive coding. Default is to not use a mask.
-rd rd_file
String. Name of file to which to output the rate-distortion profile. Default is to not output the rate-distortion profile.
-r rate
Float. Rate at which to stop decoding. Default is to decode until end of input bitstream is reached.
-vo
Print only the value of the rate to stdout (terse output); default is verbose output.

DESCRIPTION

spihtencode codes an image, imgfile, using the Set Partitioning In Hierarchical Trees (SPIHT) algorithm by Said and Pearlman. The SPIHT algorithm involves a 2D DWT followed by a progressive "bit-plane" coding of the wavelet coefficients using a zerotree-like quantization structure.

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 -pw indicates whether perceptual weighting is to be used. 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. spihtencode 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.

The SPIHT algorithm normally uses arithmetic coding of symbols as a final output step to improve coding efficiency. Alternatively, arithmetic coding can be suppressed, producing what is called "binary-uncoded" output. spihtencode supports both arithmetic-coded and binary-uncoded output modes. If option -noac is specified, no arithmetic coding is used (i.e., binary-uncoded output). Otherwise, the output is arithmetic-coded.

Note: the SPIHT algorithm as described originally by Said and Pearlman in their ITCSVT paper does not employ perceptual weighting as allowed by spihtencode (the -pw option). Refer to imgdwt(1) and QccWAVPerceptualWeights(3) for details on the implementation of perceptual weighting. Additionally, note that the concept of shape-adaptive coding arose in the recent MPEG-4 standard and was not considered in the original work by Said and Pearlman.

The -rd option is used to provide the name of the file to which to output the rate-distortion profile. Briefly, the rate-distortion profile is a collection of numerous points on the rate-distortion curve that is estimated during encoding from distortion calculations in the wavelet-domain; see QccWAVspihtEncode(3) for more details on the calculations involved. If the -rd option is not given, no rate-distortion profile is output.

spihtdecode performs the corresponding decoding using the SPIHT algorithm, decoding the bitstream made by spihtencode and producing a reconstructed image, imgfile. For sane results, wavelet, boundary, and pcpfile should be the same as they were for spihtencode, and mask should be the same if an SA-DWT was used as the transform. spihtdecode automatically determines whether arithmetic decoding is needed or not. If a decoding rate is specified with the -r option, then spihtdecode 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.

spihtencode and spihtdecode call QccWAVspihtEncode(3) and QccWAVspihtDecode(3) , respectively, to perform SPIHT encoding and decoding. Refer to the man pages for these functions for more information on the details of the QccPack implementation of the SPIHT algorithm and how it compares to the original SPIHT coder developed by Said and Pearlman for their results.

SEE ALSO

QccWAVspihtEncode(3) , QccWAVspihtDecode(3) , imgdwt(1) , QccWAVPerceptualWeights(3) , QccWAVSubbandPyramid(3) , QccPackWAV(3) , QccPackIMG(3) , QccPack(3)

A. Said and W. A. Pearlman, "A New, Fast, and Efficient Image Codec Based on Set Partitioning in Hierarchical Trees," IEEE Transactions on Circuits and Systems for Video Technology, vol. 6, no. 3, pp. 243-250, June 1996.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads