CWSQ

Name

cwsq -- WSQ compresses grayscale fingerprint images.

Synopsis

cwsq <rbitrate><outext><imagefile>
[ -raw_in w,h,d, [ppi]] [commentfile]

DESCRIPTION

Cwsq takes as input a file containing an uncompressed grayscale fingerprint image. Two possible input file formats are accepted, NIST IHead files and raw pixmap files. If a raw pixmap file is to be compressed, then its image attributes must be provided on the command line as well. Once read into memory, the pixmap is lossy compressed using Wavelet Scalar Quantization as described in the FBI's Criminal Justice Information Services (CJIS) document, "WSQ Gray-scale Fingerprint Compressions Specification," Dec. 1997. The results are then written to an output file in a format dictated by this document. This is the only fingerprint compression format accepted by the FBI IAFIS system.

OPTIONS

All switch names may be abbreviated; for example, -raw_in may be written -r.

<r bitrate>

determines the amount of lossy compression.

Suggested settings:

r bitrate = 2.25 yields around 5:1 compression r bitrate = 0.75 yields around 15:1 compression

<outext>

the extension of the compressed output file. To construct the output filename, cwsq takes the input filename and replaces its extension with the one specified here.

<image file>

the input file, either an IHead file or raw pixmap file, containing the fingerprint image to be compressed.

-raw_in w,h,d,[ppi]

the attributes of the input image. This option must be included on the command line if the input is a raw pixmap file.

w

the pixel width of the pixmap

h

the pixel height of the pixmap

d

the pixel depth of the pixmap

ppi

the optional scan resolution of the image in integer units of pixels per inch.

comment file

an optional user-supplied ASCII comment file. (See COMMENT OPTIONS below.)

COMMENT OPTIONS

Upon successful compression, this utility generates and inserts in the compressed output file a specially formatted comment block, called a NISTCOM. A NISTCOM is a text-based attribute list comprised of (name, value) pairs, one pair per text line. The first line of a NISTCOM always has name = "NIST_COM" and its value is always the total number of attributes included in the list. The utility rdwsqcom scans a WSQ compressed file for any and all comment blocks. Once found, the contents of each comment block is printed to standard output. Using this utility, the NISTCOM provides easy access to relevant image attributes. The following is an example NISTCOM generated by cwsq:

NIST_COM 9 PIX_WIDTH 500 PIX_HEIGHT 500 PIX_DEPTH 8 PPI 500 LOSSY 1 COLORSPACE GRAY COMPRESSION WSQ WSQ_BITRATE 0.750000

Cwsq also accepts an optional comment file on the command line. If provided, the contents of this file are also inserted into the compressed output file. If the comment file is a NISTCOM attribute list, then its contents are merged with the NISTCOM internally generated by cwsq and a single NISTCOM is written to the compressed output file. Note that cwsq gives precedence to internally generated attribute values. If the user provides a non-NISTCOM comment file, then the contents of file are stored to a separate comment block in the output file. Using these comment options enables the user to store application-specific information in a WSQ file.

EXAMPLES

From test/imgtools/execs/cwsq/cwsq.src:

% cwsq .75 wsq finger.raw -r 500,500,8,500 compresses a raw fingerprint pixmap.

SEE ALSO

dpyimage(1D), dwsq(1D), rdwsqcom(1D), wrwsqcom(1D)

AUTHOR

NIST/ITL/DIV894/Image Group