You are on page 1of 30

MCC Software Development Kit (SDK)

Version 1.4

Documentation

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 1


Table of Contents
1. Overview ............................................................................................................................................... 4
2. Requirements ........................................................................................................................................ 4
3. Features ................................................................................................................................................ 4
4. SDK Methods......................................................................................................................................... 6
MCC Base Methods ................................................................................................................................... 6
SetMccEnrollParameters ...................................................................................................................... 6
SetMccMatchParameters ..................................................................................................................... 6
CreateMccTemplateFromTextTemplate ............................................................................................... 6
CreateMccTemplateFromIsoTemplate ................................................................................................. 7
CreateMccTemplate.............................................................................................................................. 7
SaveMccTemplateToTextFile ................................................................................................................ 7
SaveMccTemplateToBinaryFile ............................................................................................................. 7
LoadMccTemplateFromTextFile ........................................................................................................... 8
LoadMccTemplateFromBinaryFile ........................................................................................................ 8
MatchMccTemplates ............................................................................................................................ 8
MCC Indexing Methods........................................................................................................................... 10
CreateMccIndex .................................................................................................................................. 10
DeleteMccIndex .................................................................................................................................. 10
SaveMccIndexToFile............................................................................................................................ 10
LoadMccIndexFromFile ....................................................................................................................... 10
AddTemplateToMccIndex ................................................................................................................... 11
AddTextTemplateToMccIndex ............................................................................................................ 11
AddIsoTemplateToMccIndex .............................................................................................................. 11
SearchTemplateIntoMccIndex ............................................................................................................ 12
SearchTextTemplateIntoMccIndex ..................................................................................................... 12
SearchIsoTemplateIntoMccIndex ....................................................................................................... 13
P-MCC Methods ...................................................................................................................................... 14
SetPMccEnrollParameters .................................................................................................................. 14
SetPMccMatchParameters ................................................................................................................. 14
CreatePMccTemplateFromTextTemplate ........................................................................................... 14
CreatePMccTemplateFromIsoTemplate ............................................................................................. 15

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 2


CreatePMccTemplate.......................................................................................................................... 15
SavePMccTemplateToTextFile ............................................................................................................ 15
SavePMccTemplateToBinaryFile ......................................................................................................... 16
LoadPMccTemplateFromTextFile ....................................................................................................... 16
LoadPMccTemplateFromBinaryFile .................................................................................................... 16
MatchPMccTemplates ........................................................................................................................ 17
5. Example ............................................................................................................................................... 19
6. Executables ......................................................................................................................................... 20
MccEnroller ............................................................................................................................................. 20
MccMatcher ............................................................................................................................................ 20
MccIsoMatcher ....................................................................................................................................... 21
MccLocalSimilarityCalculator .................................................................................................................. 21
MccMatcherUsingExternalLocalSimilarities............................................................................................ 22
MccIndexer ............................................................................................................................................. 22
P-MccEnroller.......................................................................................................................................... 23
P-MccMatcher......................................................................................................................................... 23
7. Appendix A – Minutiae Template File Text Format ............................................................................ 24
8. Appendix B – MccTemplate FileText Format ...................................................................................... 25
9. Appendix C – P-MccTemplate FileText Format ................................................................................... 26
10. Appendix D – KL Transform FileText Format .................................................................................. 27
11. Appendix E – MCC Parameters ....................................................................................................... 28
Enroll Parameters ................................................................................................................................... 28
Match Parameters .................................................................................................................................. 29
Available XML Parameter Files ............................................................................................................... 29
References .................................................................................................................................................. 30

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 3


1. Overview

MCC SDK is a .Net DLL library that enables to develop fingerprint verification applications using
the Minutia Cylinder Code (MCC) algorithms [1] [2] [3]. Note this is a baseline version without
any optimization to be used for research purposes only.

2. Requirements

Software requirements: .Net Framework 4.0.

3. Features

The SDK allows to:

 set the MCC Parameters;


 create a MCC Template object from a minutiae template stored in ISO standard
minutiae-based template [4] or text (see Appendix A – Minutiae Template File Text
Format) format;
 create a MCC Template object from an array of minutiae in memory;
 save a MCC Template object to a specified file in text (see Appendix B – MccTemplate
FileText Format) or binary format;
 load a MCC Template object stored in a specified file in text (see Appendix B –
MccTemplate FileText Format) or binary format;
 match two MCC Template objects;
 match two MCC Template objects using a local similarity matrix calculated externally;
 match two MCC Template objects and get detailed results about the matching (e.g.,
local similarity matrix, selected minutia-index pairs, etc.);
 create a new MCC Index;
 add a new item to the current MCC Index using an array of minutiae in memory as input;
 add a new item to the current MCC Index using as input a minutiae template stored in
ISO standard minutiae-based template [4] or text (see Appendix A – Minutiae Template
File Text Format) format;
 search an item into the current MCC Index;
 delete the current MCC Index;
 save the current MCC Index to a specified file in binary format;
 load a MCC Index stored in a specified file in binary format;
 set the P-MCC Parameters;

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 4


 create a P-MCC Template object from a minutiae template stored in ISO standard
minutiae-based template [4] or text (see Appendix A – Minutiae Template File Text
Format) format;
 create a P-MCC Template object from an array of minutiae in memory;
 save a P-MCC Template object to a specified file in text (see Appendix B – MccTemplate
FileText Format) or binary format;
 load a P-MCC Template object stored in a specified file in text (see Appendix B –
MccTemplate FileText Format) or binary format;
 match two P-MCC Template objects;
 match two P-MCC Template objects using a local similarity matrix calculated externally;
 match two P-MCC Template objects and get detailed results about the matching (e.g.,
local similarity matrix, selected minutia-index pairs, etc.).

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 5


4. SDK Methods

The SDK contains a static class named MccSdk that provides several static methods.

MCC Base Methods

SetMccEnrollParameters: it is used to load and set the MCC Enroll Parameters from an XML
file. The SDK is distributed together with the parameters used in [1] and [5] (see Appendix E
– MCC Parameters). If this method is not called, the SDK uses the SDK optimal parameters .

public static void SetMccEnrollParameters (string filePath)

Summary:
Sets the MCC enroll parameters from the specified XML file.

Parameters:
filePath: A string that contains the full path of the XML file from which to load the MCC enroll parameters.

SetMccMatchParameters: it is used to load and set the MCC Match Parameters from an
XML file. The SDK is istributed together with the parameters used in [1] and [5] (see
Appendix E – MCC Parameters). If this method is not called, the SDK uses the SDK optimal
parameters .

public static void SetMccMatchParameters (string filePath)

Summary:
Sets the MCC Match parameters from the specified XML file.

Parameters:
filePath: A string that contains the full path of the XML file from which to load the MCC Match parameters.

CreateMccTemplateFromTextTemplate: it is used to create in memory a MCC Template


object from a minutiae template stored in text format (see Appendix A – Minutiae Template
File Text Format).

public static object CreateMccTemplateFromTextTemplate(string filePath)

Summary:
Creates a MCC Template object from a minutiae template stored in text format.

Parameters:
filePath: A string that contains the full path of the text file from which to create the MCC Template.

Returns:
The MCC Template this method creates.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 6


CreateMccTemplateFromIsoTemplate: it is used to create in memory a MCC Template
object from a minutiae template stored using the standard ISO format [4].

public static object CreateMccTemplateFromIsoTemplate(string filePath)

Summary:
Creates a MCC Template object from a minutiae template stored using the standard minutiae-based template format [ISO/IEC
19794-2 (2005)].

Parameters:
filePath: A string that contains the full path of the ISO file from which to create the MCC Template.

Returns:
The MCC Template this method creates.

CreateMccTemplate: it is used to create in memory a MCC Template object from an array of


minutiae.

public static object CreateMccTemplate(int imageWidth, int imageHeight, int imageResolution, Minutia[] minutiae)

Summary:
Creates a MCC Template object.

Parameters:
imageWidth: The width, in pixels, of the fingerprint image.
imageHeight: The height, in pixels, of the fingerprint image.
imageResolution: The resolution, in dpi, of the fingerprint image.
minutiae: The array of minutiae from which to create the MCC Template.

Returns:
The MCC Template this method creates.

SaveMccTemplateToTextFile: it is used to save a MCC Template object in text format (see


Appendix B – MccTemplate FileText Format) to a specified file.

public static void SaveMccTemplateToTextFile(object template, string filePath)

Summary:
Saves a MCC Template in text format to a specified file.

Parameters:
template: The MCC Template to save.
filePath: A string that contains the full path of the file to which to save the MCC Template.

SaveMccTemplateToBinaryFile: it is used to save a MCC Template object in binary format


to a specified file.

public static void SaveMccTemplateToBinaryFile(object template, string filePath)

Summary:
Saves a MCC Template in binary format to a specified file.

Parameters:
template: The MCC Template to save.
filePath: A string that contains the full path of the file to which to save the MCC Template.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 7


LoadMccTemplateFromTextFile: it is used to load in memory a MCC Template from a text
file (see Appendix B – MccTemplate FileText Format).

public static object LoadMccTemplateFromTextFile(string filePath)

Summary:
Creates a MCC Template from a text file.

Parameters:
filePath: A string that contains the full path of the text file from which to create the MCC Template.

Returns:
The MCC Template this method creates.

LoadMccTemplateFromBinaryFile: it is used to load in memory a MCC Template from a


binary file.

public static object LoadMccTemplateFromBinaryFile(string filePath)

Summary:
Creates a MCC Template from a binary file.

Parameters:
filePath: A string that contains the full path of the binary file from which to create the MCC Template.

Returns:
The MCC Template this method creates.

MatchMccTemplates: it is used to match two MCC Templates and returns a similarity score
in the range [0;1]. This is a straightforward implementation of the MCC matching algorithm,
without particular optimizations.

public static double MatchMccTemplates(object template1, object template2)

Summary:
Matches two MCC Templates.

Parameters:
template1: The first MCC Template.
template2: The second MCC Template.

Returns:
The similarity score [0;1] of the two MCC Templates. If no global score method has been selected, the similarity score is 0.

public static double MatchMccTemplates(object template1, object template2, double[,] localSimilarities)

Summary:
Matches two MCC Templates using local similarities calculated externally.

Parameters:
template1: The first MCC Template.
template2: The second MCC Template.
localSimilarities: The matrix containing the local similarity of each minutia pair calculated externally.

Returns:
The similarity score [0;1] of the two MCC Templates. If no global score method has been selected, the similarity score is 0.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 8


public static double MatchMccTemplates(object template1, object template2, out double[,] localSimilarities,
out double[,] normalizedLocalSimilarities, out double[,] relaxedLocalSimilarities,
out double[,] efficiencies, out int[] preSelectedMinutiaeTemplate1,
out int[] preSelectedMinutiaeTemplate2, out int[] selectedMinutiaeTemplate1,
out int[] selectedMinutiaeTemplate2)

Summary:
Matches two MCC Templates returning detailed results.

Parameters:
template1: The first MCC Template.
template2: The second MCC Template.
localSimilarities: Returns the matrix containing the local similarity of each minutia pair.
normalizedLocalSimilarities: Returns the matrix containing the normalized local similarity of each minutia pair. If the local
similarity matrix normalization parameter is false, this output parameter is null.
relaxedLocalSimilarities: Returns the matrix containing the relaxed local similarity of each minutia pair. If no global score method
has been selected or the method selected does not use relaxation, this output parameter is null.
efficiencies: Returns the matrix containing the efficiencies of each minutiae pair. If no global score method has been selected or
the method selected does not use relaxation, this output parameter is null.
preSelectedMinutiaeTemplate1: Returns the array containing the indices of the minutiae of the first template preselected for the
relaxation. If no global score method has been selected or the method selected does not use relaxation, this output parameter
is null.
preSelectedMinutiaeTemplate2: Returns the array containing the indices of the minutiae of the second template preselected for
the relaxation. If no global score method has been selected or the method selected does not use relaxation, this output
parameter is null.
selectedMinutiaeTemplate1: Returns the array containing the indices of the minutiae of the first template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.
selectedMinutiaeTemplate2: Returns the array containing the indices of the minutiae of the second template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.

Returns:
The similarity score [0;1] of the two MCC Templates. If no global score method has been selected, the similarity score is 0.

public static double MatchMccTemplates(object template1, object template2, double[,] localSimilarities,


out double[,] normalizedLocalSimilarities, out double[,] relaxedLocalSimilarities,
out double[,] efficiencies, out int[] preSelectedMinutiaeTemplate1,
out int[] preSelectedMinutiaeTemplate2, out int[] selectedMinutiaeTemplate1,
out int[] selectedMinutiaeTemplate2)

Summary:
Matches two MCC Templates using local similarities calculated externally and returning detailed results.

Parameters:
template1: The first MCC Template.
template2: The second MCC Template.
localSimilarities: The matrix containing the local similarity of each minutia pair calculated externally.
normalizedLocalSimilarities: Returns the matrix containing the normalized local similarity of each minutia pair. If the local
similarity matrix normalization parameter is false, this output parameter is null.
relaxedLocalSimilarities: Returns the matrix containing the relaxed local similarity of each minutia pair. If no global score method
has been selected or the method selected does not use relaxation, this output parameter is null.
efficiencies: Returns the matrix containing the efficiencies of each minutiae pair. If no global score method has been selected or
the method selected does not use relaxation, this output parameter is null.
preSelectedMinutiaeTemplate1: Returns the array containing the indices of the minutiae of the first template preselected for the
relaxation. If no global score method has been selected or the method selected does not use relaxation, this output parameter
is null.
preSelectedMinutiaeTemplate2: Returns the array containing the indices of the minutiae of the second template preselected for
the relaxation. If no global score method has been selected or the method selected does not use relaxation, this output
parameter is null.
selectedMinutiaeTemplate1: Returns the array containing the indices of the minutiae of the first template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.
selectedMinutiaeTemplate2: Returns the array containing the indices of the minutiae of the second template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.

Returns:
The similarity score [0;1] of the two MCC Templates. If no global score method has been selected, the similarity score is 0.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 9


MCC Indexing Methods

CreateMccIndex: it is used to create a new MCC index.

public static void CreateMccIndex(int ns, int nd, int h, int l, double p, int minPC, double deltaTheta, int deltaXY,
int randomSeed)

Summary:
Create a new MCC Index.

Parameters:
ns: The number of cells along the cylinder diameter.
nd: The number of cylinder sections.
h: The number of bits selected by each hash function.
l: The number of hash functions.
p: The distance function shape parameter.
minPC: The minimum number of one-bits for a bucket index to be used.
deltaTheta: The maximum global minutiae template rotation (radians).
deltaXY: The maximum global minutiae template translation (pixels).
randomSeed: The random seed used to calculate the starting value for the pseudo-random hash functions generation.

DeleteMccIndex: it is used to delete the current MCC index.

public static void DeleteIndex()

Summary:
Delete the current MCC Index.

SaveMccIndexToFile: it is used to save the current MCC index in binary format to a specified
file.

public static void SaveMccIndexToFile(string filePath)

Summary:
Save the current MCC Index in binary format to a specified file.

Parameters:
filePath: A string that contains the full path of the file to which to save the MCC Index.

LoadMccIndexFromFile: it is used to load a MCC index from a binary file.

public static void LoadMccIndexFromFile(string filePath)

Summary:
Load a MCC Index from a binary file.

Parameters:
filePath: A string that contains the full path of the file from which to load the MCC Index.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 10


AddTemplateToMccIndex: it is used to add a new item to the current MCC index.

public static void AddTemplateToIndex(int imageWidth, int imageHeight, int imageResolution, Minutia[] minutiae, long id)

Summary:
Add a new item to the current MCC Index.

Parameters:
imageWidth: The width, in pixels, of the fingerprint image to be added.
imageHeight: The height, in pixels, of the fingerprint image to be added.
imageResolution: The resolution, in dpi, of the fingerprint image to be added.
minutiae: The array of minutiae of the fingerprint image to be added.
id: The unique identifier (ID) of the fingerprint image to be added.

AddTextTemplateToMccIndex: it is used to add a new minutiae template stored in text format


(see Appendix A – Minutiae Template File Text Format) to the current MCC index.

public static void AddTextTemplateToIndex(string filePath, long id)

Summary:
Add a new minutiae template stored in text format to the current MCC Index.

Parameters:
filePath: A string that contains the full path of the text file containing the new minutiae template to be added.
id: The unique identifier (ID) of the minutiae template to be added.

AddIsoTemplateToMccIndex: it is used to add a new minutiae template stored in standard ISO


format [4] to the current MCC Index.

public static void AddIsoTemplateToMccIndex(string filePath, long id)

Summary:
Add a new minutiae template minutiae template stored using the standard minutiae-based template format [ISO/IEC 19794-2
(2005)] to the current MCC Index.

Parameters:
filePath: A string that contains the full path of the ISO file containing the new minutiae template to be added.
id: The unique identifier (ID) of the minutiae template to be added.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 11


SearchTemplateIntoMccIndex: it is used to search an item into the current MCC index and
returns a candidate list containing the IDs of the most similar indexed candidates sorted by
similarity in descending order. This is a straightforward implementation of the MCC indexing
algorithm, without particular optimizations.

public static long[] SearchTemplateIntoIndex(int imageWidth, int imageHeight, int imageResolution, Minutia[] minutiae,
bool useReductionCriterion, out float[] sortedSimilarities)

Summary:
Search an item into the current MCC Index.

Parameters:
imageWidth: The width, in pixels, of the fingerprint image to be searched.
imageHeight: The height, in pixels, of the fingerprint image to be searched.
imageResolution: The resolution, in dpi, of the fingerprint image to be searched.
minutiae: The array of minutiae of the fingerprint image to be searched.
useReductionCriterion: If true the candidate list could be reduced according to the similarity values.
sortedSimilarities: The sorted similarities corresponding to the candidate list returned.

Returns:
The candidate list containing the IDs sorted by similarity.

SearchTextTemplateIntoMccIndex: it is used to search a minutiae template stored in text


format (see Appendix A – Minutiae Template File Text Format) into the current MCC index and
returns a candidate list containing the IDs of the most similar indexed candidates sorted by
similarity in descending order. This is a straightforward implementation of the MCC indexing
algorithm, without particular optimizations.

public static long[] SearchTextTemplateIntoIndex(string filePath, bool useReductionCriterion, out float[] sortedSimilarities)

Summary:
Search a minutiae template stored in text format into the current MCC Index.

Parameters:
filePath: A string that contains the full path of the text file containing the minutiae template to be searched.
useReductionCriterion: If true the candidate list could be reduced according to the similarity values.
sortedSimilarities: The sorted similarities corresponding to the candidate list returned.

Returns:
The candidate list containing the IDs sorted by similarity.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 12


SearchIsoTemplateIntoMccIndex: it is used to search a minutiae template stored in in
standard ISO format [4] into the current MCC index and returns a candidate list containing the
IDs of the most similar indexed candidates sorted by similarity in descending order. This is a
straightforward implementation of the MCC indexing algorithm, without particular
optimizations.

public static long[] SearchIsoTemplateIntoMccIndex(string filePath, bool useReductionCriterion,


out float[] sortedSimilarities)

Summary:
Search a minutiae template, stored using the standard minutiae-based template format [ISO/IEC 19794-2 (2005)], into the
current MCC Index.

Parameters:
filePath: A string that contains the full path of the ISO file containing the new minutiae template to be searched.
useReductionCriterion: If true the candidate list could be reduced according to the similarity values.
sortedSimilarities: The sorted similarities corresponding to the candidate list returned.

Returns:
The candidate list containing the IDs sorted by similarity.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 13


P-MCC Methods

SetPMccEnrollParameters: it is used to load and set the P-MCC Enroll Parameters (for a
detailed description of the text format of the KL Transform file see Appendix D – KL Transform
FileText Format). The SDK is distributed together with the parameters used in [3] (see Appendix
E – MCC Parameters). This method must be called before of the use of any other P-MCC
functionality.

public static void SetPMccEnrollParameters(string filePath, string klTransformFilePath)

Summary:
Sets the P-MCC Enroll parameters from the specified XML file.

Parameters:
filePath: A string that contains the full path of the XML file from which to load the P-MCC Enroll parameters.
klTransformFilePath: A string that contains the full path of the text file from which to load the KL transform used to create P-
MCC templates.

SetPMccMatchParameters: it is used to load and set the P-MCC Match Parameters from an
XML file. The SDK is distributed together with the parameters used in [3] (see Appendix E – MCC
Parameters). This method must be called before of the use of any other P-MCC functionality.

public static void LoadMccMatchParameters (string filePath)

Summary:
Sets the P-MCC Match parameters from the specified XML file.

Parameters:
filePath: A string that contains the full path of the XML file from which to load the P-MCC Match parameters.

CreatePMccTemplateFromTextTemplate: it is used to create in memory a P-MCC Template


object from a minutiae template stored in text format (see Appendix A – Minutiae Template
File Text Format).

public static object CreateMccTemplateFromTextTemplate(string filePath)

Summary:
Creates a P-MCC Template object from a minutiae template stored in text format.

Parameters:
filePath: A string that contains the full path of the text file from which to create the P-MCC Template.

Returns:
The P-MCC Template this method creates.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 14


CreatePMccTemplateFromIsoTemplate: it is used to create in memory a P-MCC Template
object from a minutiae template stored using the standard ISO format [4].

public static object CreateMccTemplateFromIsoTemplate(string filePath)

Summary:
Creates a P-MCC Template object from a minutiae template stored using the standard minutiae-based template format
[ISO/IEC 19794-2 (2005)].

Parameters:
filePath: A string that contains the full path of the ISO file from which to create the P-MCC Template.

Returns:
The P-MCC Template this method creates.

CreatePMccTemplate: it is used to create in memory a P-MCC Template object from an array of


minutiae.

public static object CreateMccTemplate(int imageWidth, int imageHeight, int imageResolution, Minutia[] minutiae)

Summary:
Creates a P-MCC Template object.

Parameters:
imageWidth: The width, in pixels, of the fingerprint image.
imageHeight: The height, in pixels, of the fingerprint image.
imageResolution: The resolution, in dpi, of the fingerprint image.
minutiae: The array of minutiae from which to create the P-MCC Template.

Returns:
The P-MCC Template this method creates.

SavePMccTemplateToTextFile: it is used to save a P-MCC Template object in text format (see


Appendix C – P-MccTemplate FileText Format) to a specified file.

public static void SavePMccTemplateToTextFile(object template, string filePath)

Summary:
Saves a P-MCC Template in text format to a specified file.

Parameters:
template: The P-MCC Template to save.
filePath: A string that contains the full path of the file to which to save the P-MCC Template.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 15


SavePMccTemplateToBinaryFile: it is used to save a P-MCC Template object in binary format
to a specified file.

public static void SavePMccTemplateToBinaryFile(object template, string filePath)

Summary:
Saves a P-MCC Template in binary format to a specified file.

Parameters:
template: The P-MCC Template to save.
filePath: A string that contains the full path of the file to which to save the P-MCC Template.

LoadPMccTemplateFromTextFile: it is used to load in memory a P-MCC Template from a text


file (see Appendix C – P-MccTemplate FileText Format).

public static object LoadPMccTemplateFromTextFile(string filePath)

Summary:
Creates a P-MCC Template from a text file.

Parameters:
filePath: A string that contains the full path of the text file from which to create the P-MCC Template.

Returns:
The P-MCC Template this method creates.

LoadPMccTemplateFromBinaryFile: it is used to load in memory a P-MCC Template from a


binary file.

public static object LoadPMccTemplateFromBinaryFile(string filePath)

Summary:
Creates a P-MCC Template from a binary file.

Parameters:
filePath: A string that contains the full path of the binary file from which to create the P-MCC Template.

Returns:
The P-MCC Template this method creates.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 16


MatchPMccTemplates: it is used to match two P-MCC Templates and returns a similarity score
in the range [0;1]. This is a straightforward implementation of the P-MCC matching algorithm,
without particular optimizations.

public static double MatchPMccTemplates(object template1, object template2)

Summary:
Matches two P-MCC Templates.

Parameters:
template1: The first protected P-MCC Template.
template2: The second protected P-MCC Template.

Returns:
The similairty score [0;1] of the two P-MCC Templates.

public static double MatchPMccTemplates(object template1, object template2, double[,] localSimilarities)

Summary:
Matches two P-MCC Templates using local similarities calculated externally.

Parameters:
template1: The first protected P-MCC Template.
template2: The second protected P-MCC Template.
localSimilarities: The matrix containing the local similarity of each minutia pair calculated externally.

Returns:
The similarity score [0;1] of the two P-MCC Templates. If no global score method has been selected, the similarity score is 0.

public static double MatchPMccTemplates(object template1, object template2, out double[,] localSimilarities,
out double[,] normalizedLocalSimilarities, out int[] selectedMinutiaeTemplate1,
out int[] selectedMinutiaeTemplate2)

Summary:
Matches two P-MCC Templates returning detailed results.

Parameters:
template1: The first protected P-MCC Template.
template2: The second protected P-MCC Template.
localSimilarities: Returns the matrix containing the local similarity of each minutia pair.
normalizedLocalSimilarities: Returns the matrix containing the normalized local similarity of each minutia pair. If the local
similarity matrix normalization parameter is false, this output parameter is null.
selectedMinutiaeTemplate1: Returns the array containing the indices of the minutiae of the first template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.
selectedMinutiaeTemplate2: Returns the array containing the indices of the minutiae of the second template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.

Returns:
The similarity score [0;1] of the two P-MCC Templates. If no global score method has been selected, the similarity score is 0.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 17


public static double MatchPMccTemplates(object template1, object template2, double[,] localSimilarities,
out double[,] normalizedLocalSimilarities, out int[] selectedMinutiaeTemplate1,
out int[] selectedMinutiaeTemplate2)

Summary:
Matches two P-MCC Templates using local similarities calculated externally and returning detailed results.

Parameters:
template1: The first protected P-MCC Template.
template2: The second protected P-MCC Template.
localSimilarities: The matrix containing the local similarity of each minutia pair calculated externally.
normalizedLocalSimilarities: Returns the matrix containing the normalized local similarity of each minutia pair. If the local
similarity matrix normalization parameter is false, this output parameter is null.
selectedMinutiaeTemplate1: Returns the array containing the indices of the minutiae of the first template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.
selectedMinutiaeTemplate2: Returns the array containing the indices of the minutiae of the second template selected during the
calculation on the global score. If no global score method has been selected, this output parameter is null.

Returns:
The similarity score [0;1] of the two P-MCC Templates. If no global score method has been selected, the similarity score is 0.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 18


5. Example

This is a simple console application to show how to use the SDK:

using System;
using BioLab.Biometrics.Mcc.Sdk;
using System.IO;
using System.Globalization;

namespace Example
{
class Program
{
static void Main(string[] args)
{
//Sets from an XML file the MCC enroll parameters.
MccSdk.SetMccEnrollParameters(@”c:\ MccPaperEnrollParameters.xml”);

//Loads a MCC Template from a text format file.


var template1 = MccSdk.LoadMccTemplateFromTextFile(@”c:\t1.txt”);

//Creates a MCC Template starting from the minutiae stored in a file


//using the ISO standard format.
var template2 = MccSdk.CreateMccTemplateFromIsoTemplate(@”c:\t2.ist”);

//Sets from an XML file the MCC match parameters.


MccSdk.SetMccMatchParameters(@”c:\ MccPaperMatchParameters.xml”);

//Matches the two MCC Templates.


var score = MccSdk.MatchMccTemplates(template1, template2);

//Writes the matching score to the console.


Console.WriteLine(string.Format(CultureInfo.InvariantCulture,
"Match score: {0:R}",
score));
}
}
}

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 19


6. Executables

Eight executables are provided together with the SDK.

MccEnroller: it is used to enroll a set of minutiae creating a MCC Template file (see Appendix
B – MccTemplate FileText Format).

MccEnroller <MinutiaeTemplateFile> <MccTemplateFile> <MccEnrollParametersFile>


<OutputFile>

 MinutiaeTemplateFile: the file path of the input set of minutiae stored in text (.txt) (see
Appendix A – Minutiae Template File Text Format) or ISO standard format (.ist) [4].
 MccTemplateFile: the output file path to which to save the MCC Template in text (.txt)
(see Appendix B – MccTemplate FileText Format) or binary (.mcc) format.
 MccEnrollParametersFile: the file path of the MCC Enroll Parameters stored in XML
format.
 OutputFile: the output text-file, where a log string (of the form MinutiaeTemplateFile
MccTemplateFile result) is appended; result is "OK" if the enrollment can be performed
or "FAIL" if the input image cannot be processed by the algorithm.

MccMatcher: it is used to match two MCC Template files.


MccMatcher <MccTemplateFile1> <MccTemplateFile2> <MccMatchParametersFile>
<OutputFile>

 MccTemplateFile1: the first input template file path stored in text (.txt) (see Appendix B
– MccTemplate FileText Format) or binary (.mcc) format.
 MccTemplateFile2: the second input template file path stored in text (.txt) (see
Appendix B – MccTemplate FileText Format) or binary (.mcc) format.
 MccMatchParametersFile: the file path of the MCC Match Parameters stored in XML
format.
 OutputFile: the output text-file, where a log string (of the form MccTemplateFile1
MccTemplateFile2 result similarity) is appended; result is "OK" if the matching can be
performed or "FAIL" if the matching cannot be executed by the algorithm; similarity is a
floating point value ranging from 0 to 1 which indicates the similarity between the two
templates: 0 means no similarity, 1 maximum similarity.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 20


MccIsoMatcher: it is used to match two MCC Templates stored in ISO standard format files
using the SDK optimal parameters (see Appendix E – MCC Parameters). This executable is
compatible with the FVC-onGoing FMISO protocol
(http://biolab.csr.unibo.it/fvcongoing/UI/Form/BenchmarkAreas/BenchmarkAreaFMISO.aspx).

MccIsoMatcher <IsoTemplateFile1> <IsoTemplateFile2> <OutputFile>

 IsoTemplateFile1: the first input template file path stored in ISO standard format.
 IsoTemplateFile2: the second input template file path stored in ISO standard format.
 OutputFile: the output text-file, where a log string (of the form IsoTemplateFile1
IsoTemplateFile2 result similarity) is appended; result is "OK" if the matching can be
performed or "FAIL" if the matching cannot be executed by the algorithm; similarity is a
floating point value ranging from 0 to 1 which indicates the similarity between the two
templates: 0 means no similarity, 1 maximum similarity.

MccLocalSimilarityCalculator: it is used to match two MCC Template files and save in a


text file the local similarities between each minutia pair.

MccLocalSimilarityCalculator <MccTemplateFile1> <MccTemplateFile2>


<MccMatchParametersFile> <LocalSimilarityOutputFile>
<OutputFile>

 MccTemplateFile1: the first input template file path stored in text (.txt) (see Appendix B
– MccTemplate FileText Format) or binary (.mcc) format.
 MccTemplateFile2: the second input template file path stored in text (.txt) (see
Appendix B – MccTemplate FileText Format) or binary (.mcc) format.
 MccMatchParametersFile: the file path of the MCC Match Parameters stored in XML
format.
 LocalSimilarityOutputFile: the output text file where all the local similarities are
stored.
 OutputFile: the output text-file, where a log string (of the form MccTemplateFile1
MccTemplateFile2 result similarity) is appended; result is "OK" if the matching can be
performed or "FAIL" if the matching cannot be executed by the algorithm; similarity is a
floating point value ranging from 0 to 1 which indicates the similarity between the two
templates: 0 means no similarity, 1 maximum similarity.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 21


MccMatcherUsingExternalLocalSimilarities: it is used to match two MCC Template
files using local similarities stored in a text file.

MccMatcherUsingExternalLocalSimilarities <MccTemplateFile1> <MccTemplateFile2>


<LocalSimilarityFile>
<MccMatchParametersFile> <OutputFile>

 MccTemplateFile1: the first input template file path stored in text (.txt) (see Appendix B
– MccTemplate FileText Format) or binary (.mcc) format.
 MccTemplateFile2: the second input template file path stored in text (.txt) (see
Appendix B – MccTemplate FileText Format) or binary (.mcc) format.
 LocalSimilarityFile: the text file containing all the local similarities to be used during
the match.
 MccMatchParametersFile: the file path of the MCC Match Parameters stored in XML
format.
 OutputFile: the output text-file, where a log string (of the form MccTemplateFile1
MccTemplateFile2 result similarity) is appended; result is "OK" if the matching can be
performed or "FAIL" if the matching cannot be executed by the algorithm; similarity is a
floating point value ranging from 0 to 1 which indicates the similarity between the two
templates: 0 means no similarity, 1 maximum similarity.

MccIndexer: it is used to index a set of minutiae templates, stored in text format files, and
search a list of query templates into the index. For each query, a candidate list is returned.

MccIndexer <IndexFile> <SearchFile> <OutputFolder>

 IndexFile: the file containing the path of each minutiae template to be indexed. Each
line of the file contains the file path of a minutiae template (stored in text format as
described in Appendix A – Minutiae Template File Text Format) and the corresponding
unique identifier (ID).
 SearchFile: the file containing the path of each minutiae template to be searched. Each
line of the file contains the file path of a minutiae template (stored in text format as
described in Appendix A – Minutiae Template File Text Format).
 OutputFolder: the path of the output folder where each candidate list is saved as text
file with one ID, and the corresponding similarity, per line (separated by a new line '\n'
character).

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 22


P-MccEnroller: it is used to enroll a set of minutiae creating a P-MCC Template file (see
Appendix C – P-MccTemplate FileText Format).

P-MccEnroller <MinutiaeTemplateFile> <PMccTemplateFile> <PMccEnrollParametersFile>


<KLTransformFile> <OutputFile>

 MinutiaeTemplateFile: the file path of the input set of minutiae stored in text (.txt) (see
Appendix A – Minutiae Template File Text Format) or ISO standard format (.ist) [4].
 PMccTemplateFile: the output file path to which to save the P-MCC Template in text
(.txt) (see Appendix C – P-MccTemplate FileText Format) or binary (.pmcc) format.
 PMccEnrollParametersFile: the file path of the P-MCC Enroll Parameters stored in XML
format.
 KLTransformFile: the file path of the KL Transform, used to create P-MCC Templates,
stored in text format (see Appendix D – KL Transform FileText Format).
 OutputFile: the output text-file, where a log string (of the form MinutiaeTemplateFile
PMccTemplateFile result) is appended; result is "OK" if the enrollment can be performed
or "FAIL" if the input image cannot be processed by the algorithm.

P-MccMatcher: it is used to match two P-MCC Template files.


P-MccMatcher <PMccTemplateFile1> <PMccTemplateFile2> <PMccMatchParametersFile>
<OutputFile>

 PMccTemplateFile1: the first input template file path stored in text (.txt) (see Appendix B
– MccTemplate FileText Format) or binary (.pmcc) format.
 PMccTemplateFile2: the second input template file path stored in text (.txt) (see
Appendix B – MccTemplate FileText Format) or binary (.pmcc) format.
 PMccMatchParametersFile: the file path of the P-MCC Match Parameters stored in XML
format.
 OutputFile: the output text-file, where a log string (of the form PMccTemplateFile1
PMccTemplateFile2 result similarity) is appended; result is "OK" if the matching can be
performed or "FAIL" if the matching cannot be executed by the algorithm; similarity is a
floating point value ranging from 0 to 1 which indicates the similarity between the two
templates: 0 means no similarity, 1 maximum similarity.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 23


7. Appendix A – Minutiae Template File Text Format

To use CreateMccTemplateFromTextTemplate and CreatePMccTemplateFromTextTemplate


methods the input minutia template must be stored in a text file with the following format:

 the first row reports the fingerprint image width;


 the second row reports the fingerprint image height;
 the third row reports the fingerprint image resolution (dpi);
 the fourth row reports the total number of minutiae ( );
 rows containing the X, Y coordinates (in pixels) and the direction (in radians) about
each minutia.

imageWidth
imageHeight
imageResolution
n
x(1) y(1) θ(1)
x(2) y(2) θ(2)



x(n) y(n) θ(n)

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 24


8. Appendix B – MccTemplate FileText Format

The MccTemplates files created, using the SaveMccTemplateToTextFile method of the SDK,
have the following text format:

 the first row reports the fingerprint image width;


 the second row reports the fingerprint image height;
 the third row reports the fingerprint image resolution;
 the fourth row reports the total number of minutiae;
 rows containing the X, Y coordinates (in pixels) and the direction (in radians) about
each minutia.
 a row containing the total number of cylinders ( , usually );
 rows containing the information of each cylinder: first the validity of the cylinder
(True or False) then, if the cylinder is valid, a sequence of 0 or 1 that represent the
validity of each cell of the cylinder base (0=invalid, 1= valid); finally the sequence of
cylinder cell values.

imageWidth
imageHeight
imageResolution
n
x(1) y(1) θ(1)
x(2) y(2) θ(2)



x(n) y(n) θ(n)
m
CylinderValidity(1) v(1)(1) v(1)(2) … v(1)( ) c(1)(1) c(1)(2) … c(1)( )
CylinderValidity(2) v(2)(1) v(2)(2) … v(2)( ) c(2)(1) c(2)(2) … c(2)( )



CylinderValidity(m) v(m)(1) v(m)(2) … v(m)( ) c(m)(1) c(m)(2) … c(m)( )

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 25


9. Appendix C – P-MccTemplate FileText Format

The P-MccTemplates files created, using the SavePMccTemplateToTextFile method of the SDK,
have the following text format:

 a row containing the total number of cylinders ( , usually );


 rows containing the information of each cylinder: first the validity of the cylinder
(True or False) then, the sequence of bit values (0 or 1) representing the protected
cylinder cell values.

m
CylinderValidity(1) c(1)(1) c(1)(2) … c(1)( )
CylinderValidity(2) c(2)(1) c(2)(2) … c(2)( )



CylinderValidity(m) c(m)(1) c(m)(2) … c(m)( )

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 26


10. Appendix D – KL Transform FileText Format

To use the P-MCC functionalities, a KL Transform must be set using SetPMccEnrollParameters


method. The input KL Transform must be stored in a text file with the following format:

 the first row reports the value of parameters and [3];


 the second row reports the mean vector ̅;
 rows containing the rows of matrix .

̅ ̅ … ̅





Note that, the SDK is distributed together with the KL Transforms used in [3] stored in text
format: PMCC16.txt, PMCC32.txt, PMCC64.txt and PMCC128.txt.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 27


11. Appendix E – MCC Parameters

MCC SDK can be configured using parameters defined in XML files.

Enroll Parameters

The table below lists all available parameters that can be used during MCC and P-MCC Template
creation.

Parameter Name Available for


Description Paper Reference
XML file Paper MCC P-MCC
R Cylinder radius (in pixel) √ √ [1]
NS Number of cells along the cylinder diameter √ √ [1]
ND Number of cylinder sections √ √ [1]
SigmaS Standard deviation in Eq. (7) √ √ [1]
SigmaD Standard deviation in Eq. (11) √ √ [1]
MuPsi Sigmoid parameter for function √ √ [1]
TauPsi Sigmoid parameter for function √ √ [1]
Omega Offset applied to enlarge the convex hull (in pixel) √ √ [1]
MinVC Minimum number of valid cells for a cylinder to be valid √ √ [1]
MinM Minimum number of minutiae for a cylinder to be valid √ √ [1]
The type used to represent cylinder cell values:
CylinderType -  Double √ -
 Bit

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 28


Match Parameters

The table below lists all available parameters that can be used during MCC and P-MCC
Template matching.

Parameter Name Available for


Description Paper Reference
XML file Paper MCC P-MCC
Minimum number of matching elements in two matchable
MinME √ [1]
cylinders
DeltaTheta Maximum global rotation allowed between two templates √ [1]
MuP Sigmoid parameter in Eq. (24) √ √ [1]
TauP Sigmoid parameter in Eq. (24) √ √ [1]
MinNP Minimum number of minutiae in Eq. (24) √ √ [1]
MaxNP Maximum number of minutiae in Eq. (24) √ √ [1]
WR Weight parameter in Eq. (25) √ [1]
MuRho1 Sigmoid parameter for in Eq. (26) √ [1]
TauRho1 Sigmoid parameter for in Eq. (26) √ [1]
MuRho2 Sigmoid parameter for in Eq. (26) √ [1]
TauRho2 Sigmoid parameter for in Eq. (26) √ [1]
MuRho3 Sigmoid parameter for in Eq. (26) √ [1]
TauRho3 Sigmoid parameter for in Eq. (26) √ [1]
NRel Number of relaxation iterations √ [1]
The technique used to combine local similarities into a global
score:
 None – The global score is not calculated
 LSS – Local Similarity Sort
 LSA – Local Similarity Assignment
 LGS – Local Greedy Similarity
 LSS_R - Local Similarity Sort with Relaxation
GlobalScoreMethod -  LSA_R - Local Similarity Assignment with Relaxation √ √* [1] [5]
 LGS_R - Local Greedy Similarity with Relaxation
 LSS_DTR - Local Similarity Sort with Distortion-Tolerant
Relaxation
 LSA_DTR - Local Similarity Assignment with Distortion-
Tolerant Relaxation
 LGS_DTR - Local Greedy Similarity with Distortion-Tolerant
Relaxation
True if the local similarity matrix (i.e., in [1]) must be
NormalizeLocalSimilarityMatrix - normalized using the technique introduced in [6] (see Section √ √ [6]
7.3.2.3), False otherwise.
MaxNR Maximum number of minutia pairs for the relaxation phase √ √ [7]
* Only techniques without relaxation (i.e., LSS, LSA, LGS) can be used in P-MCC Template matching since a protected template contains only bit-
vectors; the spatial location and direction of the minutiae are not stored in the template.

Available XML Parameter Files

The SDK is distributed together with different parameter sets:

 MccPaper – the set of parameters used to evaluate MCC16b in [1];


 IcarCV2010 – the set of parameters used in [5];
 MccSdk1.4Optimal – the SDK optimal parameters. These values have been calibrated on a
combination of FVC2000, FVC2002, FVC2004 and FVC2006 datasets;
 PMccPaper – the set of parameters used in [3].

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 29


References

[1] R. Cappelli, M. Ferrara, and D. Maltoni, "Minutia Cylinder-Code: a new representation and matching
technique for fingerprint recognition," IEEE Transactions on Pattern Analysis and Machine
Intelligence, vol. 32, no. 12, pp. 2128-2141, December 2010.

[2] R. Cappelli, M. Ferrara, and D. Maltoni, "Fingerprint Indexing based on Minutia Cylinder Code," IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. 33, no. 5, pp. 1051 - 1057, May 2011.

[3] M. Ferrara, D. Maltoni, and R. Cappelli, "Noninvertible Minutia Cylinder-Code Representation," IEEE
Transactions on Information Forensics and Security, vol. 7, no. 6, pp. 1727-1737, December 2012.

[4] ISO/IEC 19794-2:2005, Information technology -- Biometric data interchange formats -- Part 2: Finger
minutiae data, 2005.

[5] R. Cappelli, M. Ferrara, D. Maltoni, and M. Tistarelli, "MCC: a Baseline Algorithm for Fingerprint
Verification in FVC-onGoing," in proceedings 11th International Conference on Control, Automation,
Robotics and Vision (ICARCV), Singapore, 2010.

[6] R. Cappelli, M. Ferrara, and D. Maltoni, "Minutiae-Based Fingerprint Matching," in Cross Disciplinary
Biometric Systems.: Springer, 2012, ch. 7, pp. 117-150.

[7] R. Cappelli, M. Ferrara, and D. Maio, "A Fast and Accurate Palmprint Recognition System based on
Minutiae," IEEE Transactions on Systems, Man and Cybernetics - Part B, vol. 42, no. 3, pp. 956-962,
June 2012.

Copyright © 2014 Biometric System Laboratory - http://biolab.csr.unibo.it 30

You might also like