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

<refmeta>
<refentrytitle>MKOAS</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>mkoas</refname>
<refpurpose>makes orientation arrays from fingerprint images.</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>mkoas</command>    
    <arg choice='plain'><replaceable>&lt;prsfile&gt;</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='B'>Mkoas</emphasis>
makes orientation arrays (oas), for a set of fingerprint image files.
An oa can be thought of as a 28 (height) by
30 (width) array of real two-dimensional orientation vectors, each of
which represents the local average ridge/valley orientation at one
point of an equally-spaced rectangular grid; but, sometimes it is more
convenient to think of an oa as a single 1680-dimensional real vector
(1680 = 28 x 30 x 2).  To make an oa from a fingerprint, mkoas uses
the same sequence of preprocessing/feature-extraction routines that is
used by the classifier demos pcasys and pcasysx.  Mkoas causes each
oa to be one row of the PCASYS "matrix" file that is its output.</para>

<para>Mkoas sets the values of its parameters as follows.  First, it reads
the default oas-production parms file <filename>pcasys/parms/oas.prs</filename>; then,
it reads the file of default values of additional mkoas parms,
<emphasis remap='I'>pcasys/parms/mkoas.prs</emphasis>; finally, it reads the required user
parms file, which is the argument (<emphasis remap='I'>prsfile</emphasis>).  Each time a parms file
is read, its values override those set by previously read parms
file(s), if any.  See PARAMETER FILES, below, for a description of the
difference between <emphasis remap='I'>oas.prs</emphasis> and <emphasis remap='I'>mkoas.prs</emphasis>.</para>

<para>Since the oas of a large set of fingerprints can turn out to be
quite a large amount of data, it may be that the entire set of oas
that are to be produced cannot exist as a single file, because of
disk space limitations.  If so, one should run several instances of
mkoas, each producing a matrix file that is a subset of
the required oas.  To estimate output file size as a function of
number of oas, note that each oa consists of 1680
single-precision floating-point numbers, and therefore it takes 1680
x 4 = 6720 bytes.  Allow slightly more space, for header data
contained in a matrix file.</para>
</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>&lt;prsfile&gt;</emphasis></term>
  <listitem>
<para>A file containing parameters.  To find out what the available
parameters are, and as examples of the format of parameters files,
consult the default files <emphasis remap='I'>pcasys/parms/oas.prs</emphasis> and
<emphasis remap='I'>pcasys/parms/mkoas.prs</emphasis>.  Each parameter is specified
by having its name and value on a line; a pound sign indicates that
the rest of its line is a comment.</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.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RS -->
<para><emphasis remap='B'>Default settings in </emphasis><emphasis remap='I'>pcasys/parms/oas.prs</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>Used in the segmentation routine:</emphasis></term>
  <term><emphasis remap='B'>sgmnt_fac_n </emphasis><literal>5</literal></term>
  <listitem>
<para>How many threshold-making factors to try.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_min_fg </emphasis><literal>2000</literal></term>
  <listitem>
<para>Minimum allowed number of foreground (true) pixels.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_max_fg </emphasis><literal>8000</literal></term>
  <listitem>
<para>Maximum allowed number of foreground (true) pixels.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_nerode </emphasis><literal>3</literal></term>
  <listitem>
<para>Do this many erosions in foreground cleanup.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_rsblobs </emphasis><literal>1</literal></term>
  <listitem>
<para>If 1, remove small blobs in foreground cleanup.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_fill </emphasis><literal>1</literal></term>
  <listitem>
<para>If 1, fill holes in rows, columns in foreground cleanup.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_min_n </emphasis><literal>25</literal></term>
  <listitem>
<para>Cutting angle becomes zero if any foreground edge has fewer than
this many pixels.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_hist_thresh </emphasis><literal>20</literal></term>
  <listitem>
<para>Threshold that tilted-rows-histogram must meet to find top-location
for cutting.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_origras_wmax </emphasis><literal>2000</literal></term>
  <listitem>
<para>Maximum allowed width of original raster.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_origras_hmax </emphasis><literal>2000</literal></term>
  <listitem>
<para>Maximum allowed height of original raster.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_fac_min </emphasis><literal>0.75</literal></term>
  <listitem>
<para>Minimum threshold-making factor value.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_fac_del </emphasis><literal>0.05</literal></term>
  <listitem>
<para>Delta of threshold-making factor value.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>sgmnt_slope_thresh </emphasis><literal>0.90</literal></term>
  <listitem>
<para>If any of the three edges has slope differing by more than
this from the average of the slopes, then cutting angle is set to zero.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>Used in the FFT image enhancer:</emphasis></term>
  <term><emphasis remap='B'>enhnc_rr1 </emphasis><literal>150</literal></term>
  <listitem>
<para>High-frequency elements of FFT whose filter plane value is less than this
value are discarded.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>enhnc_rr2 </emphasis><literal>449</literal></term>
  <listitem>
<para>Low-frequency elements of FFT whose filter plane number is greater than this
value are discarded.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>enhnc_pow </emphasis><literal>0.3</literal></term>
  <listitem>
<para>Power spectrum is raised to this power before it is multiplied by
the FFT output.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>Used in the ridge-valley orientation finder:</emphasis></term>
  <term><emphasis remap='B'>rors_slit_range_thresh </emphasis><literal>10</literal></term>
  <listitem>
<para>If the difference between the maximum and minimum slit-sums at a pixel
is less than this, then this pixel makes no contribution to the
histogram used to make the local average orientation.</para>
           
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>Used in the r92a wrapper for r92 registration program:</emphasis></term>
  <term><emphasis remap='B'>r92a_discard_thresh </emphasis><literal>0.01</literal></term>
  <listitem>
<para>If squared-length of a local-average orientation vector is less than this,
then conversion of this vector to an angle for use by r92 just produces
the special value 100., which means an undefined angle.</para>

  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>Used in the registering pixelwise-orientations-reaverager:</emphasis></term>
  <term><emphasis remap='B'>rgar_std_corepixel_x </emphasis><literal>245</literal></term>
  <listitem>
<para>X coordinate of standard (median) core position.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>rgar_std_corepixel_y </emphasis><literal>189</literal></term>
  <listitem>
<para>Y coordinate of standard (median) core position.
This is the standard registration point, to which the particular
core point gets translated to implement registration.</para>
  </listitem>
  </varlistentry>
</variablelist>
<!-- .RE -->

<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>pcasys/parms/mkoas.prs</emphasis></term>
  <listitem>
<para>Contains default values of additional parameters needed by  mkoas,
besides those appearing in <emphasis remap='I'>pcasys/parms/oas.prs</emphasis>. Parameters without
defaults values must appear in the users <emphasis remap='I'>prsfile</emphasis>.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RS -->
<para><emphasis remap='B'>Default settings in </emphasis><emphasis remap='I'>pcasys/parms/mkoas.prs</emphasis></para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='B'>ascii_oas </emphasis><emphasis remap='I'>n</emphasis></term>
  <listitem>
<para>Ascii (y) or binary (n) output?</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>update_freq </emphasis><literal>1</literal></term>
  <listitem>
<para>Frequency of progress messages.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>clobber_oas_file </emphasis><emphasis remap='I'>n</emphasis></term>
  <listitem>
<para>Overwrite an oas_file if it already exists?</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>proc_images_list </emphasis><emphasis remap='I'>(no default, user must set)</emphasis></term>
  <listitem>
<para>The list of fingerprint images to make orientation arrays from.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>oas_file </emphasis><emphasis remap='I'>(no default, user must set)</emphasis></term>
  <listitem>
<para>The output file that is to be produced containing orientation arrays.</para>
  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

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

<!-- .RS -->
<para><emphasis remap='B'>% mkoas sv10.prs</emphasis>
<!-- .br -->
Creates a set of orientation arrays based on the file list
given in the parameters file <filename>sv10.prs</filename>.</para>
</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para>bin2asc (1A), asc2bin (1A), chgdesc (1A), stackms (1A)</para>


</refsect1>

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

