<?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='pcasys1'>
<!--  @(#)pcasys.1 2001/04/02 NIST -->
<!--  I Image Group -->
<!--  G. T. Candela &amp; Craig I. Watson -->

<refmeta>
<refentrytitle>PCASYS</refentrytitle>
<manvolnum>1A</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>pcasys</refname>
<refpurpose>fingerprint classifier demo, non-graphical version</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>pcasys</command>    
    <arg choice='opt'><replaceable>prsfile</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='B'>Pcasys</emphasis>
is the non-graphical fingerprint classifier demo program.  It reads a
sequence of image files, each depicting one box as scanned from a
fingerprint card, and classifies each fingerprint, using a Multi-Layer
Perceptron (MLP) or Probabilistic (PNN) Neural Network, to one of six
pattern-level classes: Arch, Left loop, Right loop, Scar, Tented
arch, and Whorl. The type of classifier MLP or PNN is chosen in the
parameters file <filename>pcasys/parms/pcasys.prs</filename>.  Pcasys optionally makes an
output file, containing a results line for each fingerprint and a
summary at the end showing the error rate and the "confusion matrix",
and it optionally writes progress messages to the standard output.</para>

<para>The graphical version, pcasysx, is recommended as being much more
interesting than this version.  However, pcasys is suitable if (1)
the X Window System, which pcasysx requires, is not installed, or (2)
greatest classification speed is desired.  (The graphical displays take
a significant amount of additional time.)</para>

<para>Pcasys will look in the default location <emphasis remap='I'>pcasys/parms</emphasis>
for the default parameter files it needs.  There are prototype
and weights files in <emphasis remap='I'>pcasys/weights/{mlp|pnn}</emphasis> that are needed
by the MLP and PNN classifiers. If NFIS was installed in a
location other than <filename>/usr/local/nfis</filename> the INSTALL_DIR in
<emphasis remap='I'>include/little.h</emphasis> will need to be changed and the code
recompiled.  Also, the current default location for the 2700 sample
fingerprint images is <emphasis remap='I'>test/pcasys/data/images</emphasis>.  If the user wants
to save disk space, these images could be left on a mounted CDROM and a link
made from the images directory on the CDROM to the image directory where
the software is installed.</para>
</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>[prsfile]</emphasis></term>
  <listitem>
<para>A file containing one or more parameter values that are to override
the default values.  To find out what the parameters are, and as
examples of the format of a parameters file, consult the default
parameters files that pcasys reads, namely <emphasis remap='I'>pcasys/parms/oas.prs</emphasis>
and <emphasis remap='I'>pcasys/parms/pcasys.prs</emphasis> which are described in the section
PARAMETER FILES. Each line, in the parms file
consists of a parameter name followed by a value; a pound sign
indicates that the rest of its line is a comment.  If pcasys is run
with no argument, i.e. not specifying a user parameters file, then it
uses the default values of all parameters.</para>
  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='parameter_files'><title>PARAMETER FILES</title>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>pcasys/parms/oas.prs</emphasis></term>
  <listitem>
<para>Contains default values of the parameters that affect the making of
orientation arrays (oas): these are the parms of the segmentor
(sgmnt), the image enhancer (enhnc), the ridge-valley orientation
finder (rors), the registration program (r92a), and the
registration-implementing pixelwise orientations reaverager (rgar).
The values used for these parms when making the oas used in
optimizing the classifier should also be used when running the
finished classifier.
<emphasis remap='B'>See the </emphasis><emphasis remap='I'>mkoas</emphasis><emphasis remap='B'> man page for more information about the parameters
in this file.</emphasis></para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>pcasys/parms/pcasys.prs</emphasis></term>
  <listitem>
<para>Contains default values of the remaining parameters of pcasys.
Also look at <emphasis remap='I'>pcasys.mlp</emphasis> and <emphasis remap='I'>pcasys.pnn</emphasis> for examples on
using each classifier.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RS -->
<para><emphasis remap='B'>Default settings in </emphasis><emphasis remap='I'>pcasys/parms/pcasys.prs</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>network_type </emphasis><literal>2</literal></term>
  <listitem>
<para>Set classifier as (1) PNN (Probabilistic Neural Net) or
(2) MLP (Multi-layer Perceptron).</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>trnsfrm_nrows_use </emphasis><literal>128</literal></term>
  <listitem>
<para>How many (first) rows of the transform matrix to use, and hence, how
many features to make for the feature vector of each incoming fingerprint,
and also how many (first) features to use of each prototype feature
vector when running the classifier:</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>trnsfrm_matrix_file </emphasis><emphasis remap='I'>pcasys/weights/mlp/mlp_tmat.bin</emphasis></term>
  <listitem>
<para>File used by the demo to transform the orientation array of an
incoming fingerprint into the low-dimensional feature vector that
will be sent to the classifier.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>cls_str </emphasis><emphasis remap='I'>ALRSTW</emphasis></term>
  <listitem>
<para>Class string used in graphics mode to display the
ouput activations.  Should be same size as number of outputs
(ie. pnn_nclasses or number outputs in mlp_wts file).  Must be
some combination of "ALRSTW".  For PNN, these must be the same
classes as used in the prototype files and be in the same order 
as when the prototype were optimized.</para>

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

<para><emphasis remap='I'>pnn (Probabilistic Neural Net) parameters:</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>pnn_nprotos_use </emphasis><literal>24300</literal></term>
  <listitem>
<para>How many first feature vectors to use, from the set of prototypes.
The value 24300 corresponds to the entire provided set, corresponding
to volumes 1 - 9 "f" rollings of Special Database 14.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pnn_nclasses </emphasis><literal>6</literal></term>
  <listitem>
<para>How many different classes there are.  For the fingerprint
pattern-level classification problem, there are 6: A, L, R, S, T, and W.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pnn_osf </emphasis><literal>1.368750</literal></term>
  <listitem>
<para>Overall smoothing factor for the PNN.  May be optimized using optosf.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pnn_protos_fvs_file </emphasis><emphasis remap='I'>pcasys/weights/pnn/profvs.bin</emphasis></term>
  <listitem>
<para>Prototype feature vectors file.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pnn_protos_classes_file </emphasis><emphasis remap='I'>pcasys/weights/pnn/procls.asc</emphasis></term>
  <listitem>
<para>Prototype classes file.</para>

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

<para><emphasis remap='I'>MLP (Multi-layer Perceptron) network parameters:</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>mlp_wts_file </emphasis><emphasis remap='I'>pcasys/weights/mlp/mlp_wts.bin</emphasis></term>
  <listitem>
<para>MLP weights file.</para>

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

<para><emphasis remap='I'>Parameters used by the pseudoridge tracer:</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_slthresh0 </emphasis><literal>0.0</literal></term>
  <listitem>
<para>If squared-length of an orientation vector (in the fine grid used
by pseudo) is &lt; this value, then the vector is zeroed before the
(possible) application of smoothing iterations.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_slthresh1 </emphasis><literal>0.04</literal></term>
  <listitem>
<para>If, after (possible) smoothing iterations, the squared-length of
an orientation vector is &lt; this value, then this location is marked
as bad, meaning that no pseudoridge is allowed to start here and
if one arrives here, tracing stops at this point.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_smooth_cwt </emphasis><literal>0.0</literal></term>
  <listitem>
<para>Center-weight for each iteration of smoothing of the orientation grid.
An iteration consists of replacing each vector with the weighted
average of itself and its four neighbors, with itself getting this
much weight and its neighbors equally dividing the remaining weight
(sum of weights is 1).</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_stepsize </emphasis><literal>1.0</literal></term>
  <listitem>
<para>Length of one step in the production of a pseudoridge, which is actually
a polygon.  A value of 1. corresponds to the spacing between vectors
in the (finer) orientation array used by pseudo.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_max_tilt </emphasis><literal>45</literal></term>
  <listitem>
<para>Max allowed tilt of a candidate concave-upward's vertex (point of
sharpest turning) from a horizontal that corresponds to exact
uprightness.  In degrees.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_min_side_turn </emphasis><literal>70</literal></term>
  <listitem>
<para>Minimum cumulative turn that each side of concave-upward must have.
In degrees.</para>

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

<para><emphasis remap='I'>Limits for the block of starting positions in
pseudoridge tracing:</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_initi_s </emphasis><literal>11</literal></term>
  <listitem>
<para>Small limit, vertical. (TOP)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_initi_e </emphasis><literal>46</literal></term>
  <listitem>
<para>Large limit, vertical. (BOTTOM)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_initj_s </emphasis><literal>11</literal></term>
  <listitem>
<para>Small limit, horizontal. (LEFT)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_initj_e </emphasis><literal>50</literal></term>
  <listitem>
<para>Large limit, horizontal. (RIGHT)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_maxsteps_eachdir </emphasis><literal>200</literal></term>
  <listitem>
<para>Maximum number of steps that tracer ever takes in either of the two
directions from starting point.  (Controls the amount of memory
needed to store a pseudoridge, and more importantly, such a limit
is needed to prevent possible infinitely looping pseudridges in
some whorls.)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_nsmooth </emphasis><literal>3</literal></term>
  <listitem>
<para>How many iterations of smoothing.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>pseudo_maxturn </emphasis><literal>40</literal></term>
  <listitem>
<para>Maximum turn that is allowed to occur in a single step (in degrees).
An attempted turn sharper than this causes tracing to stop.</para>

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

<para><emphasis remap='I'>Used by the combine routine.</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>combine_clash_confidence </emphasis><literal>.9</literal></term>
  <listitem>
<para>This is the confidence value combine assigns if pseudo
finds a concave-upward (causing hyp class to be whorl) but PNN
thinks the print is not a whorl:</para>

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

<para><emphasis remap='I'>PCASYS I/O parameters.</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>demo_images_list </emphasis><emphasis remap='I'>pcasys/parms/first20.txt</emphasis></term>
  <listitem>
<para>List of fingerprint images to run the demo on.  The default list
here lists the first 20 fingerprints of the provided demo set, which
consists of the 2700 fingerprints of volume 10 "s" rollings of
NIST Special Database 14. <emphasis remap='I'>pcasys/parms/all.txt</emphasis> list all
2700 files.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>outfile </emphasis><emphasis remap='I'>pcasys.out</emphasis></term>
  <listitem>
<para>Output file to be produced.  If no output file is wanted, set
this to /dev/null.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>clobber_outfile </emphasis><emphasis remap='I'>n</emphasis></term>
  <listitem>
<para>If n, then if outfile already exists, exit with an error message.
If y, then overwrite outfile if it already exists.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>verbose </emphasis><emphasis remap='I'>y</emphasis></term>
  <listitem>
<para>If y, then write progress messages to stdout.</para>

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

<refsect1 id='examples'><title>EXAMPLE(S)</title>
<para>From <emphasis remap='I'>test/pcasys/execs/pcasys/pcasys.src</emphasis>:</para>

<!-- .RS -->
<para><emphasis remap='B'>% pcasys</emphasis>
<!-- .br -->
Runs the pcasys demo using the default settings found in
<emphasis remap='I'> pcasys/parms/pcasys.prs</emphasis>.</para>

<para><emphasis remap='B'>% pcasys myprsfile</emphasis>
<!-- .br -->
Runs the pcasys demo using parameters set in <emphasis remap='I'>myprsfile</emphasis>
to change the value of the default settings.</para>
</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para>pcasysx (1A)</para>


</refsect1>

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

