Professional Documents
Culture Documents
MCCSDK Documentation v1.4
MCCSDK Documentation v1.4
Version 1.4
Documentation
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
3. Features
The SDK contains a static class named MccSdk that provides several static 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 .
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Summary:
Delete the current MCC Index.
SaveMccIndexToFile: it is used to save the current MCC index in binary format to a specified
file.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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”);
MccEnroller: it is used to enroll a set of minutiae creating a MCC Template file (see Appendix
B – MccTemplate FileText Format).
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.
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.
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.
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.
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.
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).
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.
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.
imageWidth
imageHeight
imageResolution
n
x(1) y(1) θ(1)
x(2) y(2) θ(2)
…
…
…
x(n) y(n) θ(n)
The MccTemplates files created, using the SaveMccTemplateToTextFile method of the SDK,
have the following text format:
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)( )
The P-MccTemplates files created, using the SavePMccTemplateToTextFile method of the SDK,
have the following text format:
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)( )
̅ ̅ … ̅
…
…
…
…
…
…
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.
Enroll Parameters
The table below lists all available parameters that can be used during MCC and P-MCC Template
creation.
The table below lists all available parameters that can be used during MCC and P-MCC
Template matching.
[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.