I am trying to use SourceAFIS 1.7.0 on Ubuntu with mono and get a few error.
1.
$ mono DatabaseAnalyzer.exe
Scanning folder TestDatabase
Running extractor benchmark
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
File name: 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at DatabaseAnalyzer.DatabaseAnalyzer.RunExtractorBenchmark () <0x40674790 + 0x00033> in :0 at DatabaseAnalyzer.DatabaseAnalyzer.RunMatcherBenchmark () <0x40674600 + 0x000eb> in :0
at DatabaseAnalyzer.DatabaseAnalyzer.Run () <0x40642a40 + 0x000bf> in :0
at DatabaseAnalyzer.DatabaseAnalyzer.Main (System.String[] args) <0x4063bd50 + 0x00037> in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
File name: 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at DatabaseAnalyzer.DatabaseAnalyzer.RunExtractorBenchmark () <0x40674790 + 0x00033> in :0 at DatabaseAnalyzer.DatabaseAnalyzer.RunMatcherBenchmark () <0x40674600 + 0x000eb> in :0
at DatabaseAnalyzer.DatabaseAnalyzer.Run () <0x40642a40 + 0x000bf> in :0
at DatabaseAnalyzer.DatabaseAnalyzer.Main (System.String[] args) <0x4063bd50 + 0x00037> in :0
According to https://sourceforge.net/p/sourceafis/discussion/1051112/thread/dd8df289/#a006, WinForms should be applied here instead of WPF and use bitmap class to replace the bitmapimage class of WPF, but I don't know how to do it exactly. Does anybody have such experience?
This is the original function used WPF bitmap class
static MyPerson Enroll(string filename, string name)
{
Console.WriteLine("Enrolling {0}...", name);
// Initialize empty fingerprint object and set properties
MyFingerprint fp = new MyFingerprint();
fp.Filename = filename;
// Load image from the file
Console.WriteLine(" Loading image from {0}...", filename);
BitmapImage image = new BitmapImage(new Uri(filename, UriKind.RelativeOrAbsolute));
fp.AsBitmapSource = image;
// Above update of fp.AsBitmapSource initialized also raw image in fp.Image
// Check raw image dimensions, Y axis is first, X axis is second
Console.WriteLine(" Image size = {0} x {1} (width x height)", fp.Image.GetLength(1), fp.Image.GetLength(0));
// Initialize empty person object and set its properties
MyPerson person = new MyPerson();
person.Name = name;
// Add fingerprint to the person
person.Fingerprints.Add(fp);
// Execute extraction in order to initialize fp.Template
Console.WriteLine(" Extracting template...");
Afis.Extract(person);
// Check template size
Console.WriteLine(" Template size = {0} bytes", fp.Template.Length);
return person;
}
$ mono SourceAFIS.FingerprintAnalysis.exe
The entry point method could not be loaded
How can I fix this with a more meaningful exception?