1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| {
/// <summary>
/// This simple application show how you can encode a fingerprint image compare them against each other.
/// </summary>
class Program
{
static void Main(string[] args)
{
try
{
///Load tree fingerpirnt images
Image fpImage1 = Image.FromFile(@".\Fingerprints\RIGHT_INDEX.BMP");
Image fpImage1Copy = Image.FromFile(@".\Fingerprints\RIGHT_INDEX - COPY.BMP");
Image fpImage2 = Image.FromFile(@".\Fingerprints\LEFT_INDEX.BMP");
FingerprintTemplate fp1, fp1Copy, fp2;
//Encoding fingerprint images to prepare their templates.
Dermalog.Afis.CodingMatching.FingerprintEncoder encoderEnging = new Dermalog.Afis.CodingMatching.FingerprintEncoder();
Console.WriteLine("Start Encoding the fingerprints");
encoderEnging.EncodeSynchronous(TemplateFormat.Dermalog,fpImage1, out fp1);
encoderEnging.EncodeSynchronous(TemplateFormat.Dermalog, fpImage1Copy, out fp1Copy);
encoderEnging.EncodeSynchronous(TemplateFormat.Dermalog, fpImage2, out fp2);
Console.WriteLine("Encoding done!");
///compare two similar images
Console.WriteLine(string.Format("Comparing first image with a copy of it. Score {0}",Math.Round(fp1.CompareTo(fp1Copy),2)));
///comparing two diffrent images
Console.WriteLine(string.Format("Comparing first image with second image. Score {0}", Math.Round(fp1.CompareTo(fp2), 2)));
}
catch (Exception exp)
{ |
Partager