                Sample console applications
                ---------------------------

These are a simple demonstration programs for the FingerCell-2.0 library.
They are intended to demonstrate the basic use of the FingerCell interface
and to check that FingerCell is working.

The fc_console_demo reads images from SampleImages/ directory, processes them
with the help of FingerCell and outputs info about the results to a terminal.
Source code shows how to perform verification and identification, it also shows
how to perform template generalization (used to enforce better template
quality). The demo reads images from TIF files using NImage library.

The fc_console_list_demo enrolls fingerprints specified in db_list.txt file
into memory, next each fingerprint specified in ident_list.txt is compared with
DB. The timings for feature extraction and matching is shown, so this program
can be used to evaluate performance of FingerCell, by specifying custom images.
Source code shows how to set some FingerCell thresholds, and get information
about templates. It also is example of how to use images without NImage library
(for images from scanner or files of simple custom format). The demo reads
images from PGM files of 8 bits depth. For information about image conversion
to PGM files please see Footnote_1 at the end of this ReadMe.


        Compiling
        ---------

To compile the program with native compiler run:

  make

If cross compiler is used instead, compiler prefix must be defined:

  make CROSS=arm-linux-

Note:	This assumes cross-toolchain is installed and arm-linux-gcc is runable.

To clean up object files, run:

  make clean


        Running
        -------

To run the program, copy compiled binary file (fc_console_demo or
fc_console_list_demo), required library files (lib/Linux_arm/FingerCell)
and the SampleImages directory to the target system and execute it.
fc_console_list_demo needs also db_list.txt and ident_list.txt files.

Note:	Libraries must be in the standard directory known by dynamic linker
	(usually /usr/lib/ or /lib) alternatively extra paths to libraries may
        be given in environment variable LD_LIBRARY_PATH:

	  LD_LIBRARY_PATH=${PATH_TO_DIR_WITH_LIBRARY_FILES} ./fc_console_demo


------------------------------------------------------------------------------
Footnote_1: Converting Sample images from TIFF to PGM

   PGM format is just raw pixel data (in binary or text form) with plain text
   header (please see PGM format specification for more info).

   Files can be easily converted with either ImageMagic(on Linux)
   or IrfanView (on Windows). Demo uses images of 8 bits depth (0-255 gray
   value pixel per byte), please remember to indicate this to conversion tool.
   -----------------------
   On Linux:
	1. Install ImageMagic
	2. "cd ../Sample.Linux"
	3. For bash, run:
		for f in *.tif ; do
			convert +compress -depth 8 $f `basename $f .tif`.pgm
	    	done
	   For csh, run:
		foreach f ( *.tif )
			convert +compress -depth 8 $f `basename $f .tif`.pgm
		end
   -----------------------
    On Windows:
	1. Install and start IrfanView
	2. Use "File>Batch Conversion/Rename..." menu
        3. Specify 8 bits depth: mark "Use advanced options" check-box; in
           "Set advanced options" window select "CHANGE COLOR DEPTH:" and
           "256 Colors (8BPP)"
   -----------------------
(Link: PGM specification: http://netpbm.sourceforge.net/doc/pgm.html)
(Link: ImageMagic home:	  http://www.imagemagick.org/script/index.php)
(Link: IrfanView home:	  http://www.irfanview.com/)
