<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry id='dwsq1'>
<!--  @(#)dwsq.1 2001/04/02 NIST -->
<!--  I Image Group -->
<!--  Craig Watson and Michael D. Garris -->

<refmeta>
<refentrytitle>DWSQ</refentrytitle>
<manvolnum>1D</manvolnum>
<refmiscinfo class='date'>02 April 2001</refmiscinfo>
<refmiscinfo class='source'>NIST</refmiscinfo>
<refmiscinfo class='manual'>NFIS Reference Manual</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>dwsq</refname>
<refpurpose>decompresses a WSQ-encoded grayscale fingerprint image.</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>dwsq</command>    
    <arg choice='plain'><replaceable>&lt;outext&gt;&lt;imagefile&gt;</replaceable></arg>
    <arg choice='opt'>-raw_out </arg>
    <sbr/>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='B'>Dwsq</emphasis>
takes as input a file containing a WSQ-compressed grayscale fingerprint
image.  Once read into memory, the lossy-compressed pixmap is decoded
and reconstructed using Wavelet Scalar Quantization as described in the
FBI's Criminal Justice Information Services (CJIS) document,
"WSQ Gray-scale Fingerprint Compressions Specification," Dec. 1997.
This is the only fingerprint compression format accepted by the FBI IAFIS
system.</para>

<para>Upon completion, two different output image file formats are possible,
a NIST IHead file (the default) or a raw pixmap file (specified by the
<option>-raw_out</option> flag).  In addition, a specially formatted text
file, called a NISTCOM, is created with extension ".ncm".  The NISTCOM
file contains relevant image attributes associated with the decoded
and reconstructed output image.
(See NISTCOM OUTPUT below.)</para>

</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<para>All switch names may be abbreviated; for example,
<option>-raw_out</option> may be written <option>-r</option>.</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>&lt;outext&gt;</emphasis></term>
  <listitem>
<para>the extension of the decompressed output file.
To construct the output filename, <command>dwsq</command> takes the
input filename and replaces its extension with the one
specified here.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;image file&gt;</emphasis></term>
  <listitem>
<para>the input WSQ file to be decompressed.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-raw_out</option></term>
  <listitem>
<para>specifies that the decoded and reconstructed image should be
stored to a raw pixmap file.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='nistcom_output'><title>NISTCOM OUTPUT</title>
<para>Upon successful completion, <command>dwsq</command>, creates a specially
formatted text file called a NISTCOM file.
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.  These attributes are collected and merged from two
different sources to represent the history and condition of
the resulting reconstructed image.  The first source is from an
optional NISTCOM comment block inside the WSQ-encoded input file.
This comment block can be used to hold user-supplied attributes.
The WSQ encoder, <emphasis remap='B'>cwsq</emphasis>, by convention inserts one of these
comment blocks in each compressed output file it creates.
(The utility <emphasis remap='B'>rdwsqcom</emphasis> can be used to scan a WSQ file for
any and all comment blocks.)
The second source of attributes comes from the decompression
process itself.  In general, attribute values from this second
source are given precedence over those from the first.</para>

<para>The NISTCOM output filename is constructed by combining the
basename of the input WSQ file with the extension ".ncm".
By creating the NISTCOM file, relevant attributes associated
with the decoded and reconstructed image are retained and
easily accessed.  This is especially useful when dealing with
raw pixmap files and creating image archives.  The following
is an example NISTCOM generated by <command>dwsq</command>:</para>

<!-- .RS -->
<para>NIST_COM 7
<!-- .br -->
PIX_WIDTH 500
<!-- .br -->
PIX_HEIGHT 500
<!-- .br -->
PIX_DEPTH 8
<!-- .br -->
PPI 500
<!-- .br -->
LOSSY 1
<!-- .br -->
COLORSPACE GRAY</para>

</refsect1>

<refsect1 id='examples'><title>EXAMPLES</title>
<para>From <emphasis remap='I'>test/imgtools/execs/dwsq/dwsq.src</emphasis>:</para>

<!-- .RS -->
<para><emphasis remap='B'>% dwsq raw finger.wsq -r</emphasis>
<!-- .br -->
decompresses a WSQ-encoded fingerprint image and stores
the reconstructed image to a raw pixmap file.  Note the
NISTCOM file, <emphasis remap='B'>finger.ncm</emphasis>, is also created.</para>

</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para><emphasis remap='B'>cwsq</emphasis>(1D),
<emphasis remap='B'>dpyimage</emphasis>(1D),
<emphasis remap='B'>rdwsqcom</emphasis>(1D),
<emphasis remap='B'>wrwsqcom</emphasis>(1D)</para>

</refsect1>

<refsect1 id='author'><title>AUTHOR</title>
<para>NIST/ITL/DIV894/Image Group</para>
</refsect1>
</refentry>

