2016-06-15 47 views
1

我试图在Ubuntu上使用SourceAFIS 1.7.0与单声道,并得到一些错误。如何让SourceAFIS在Ubuntu上工作?

1.

$单DatabaseAnalyzer.exe

扫描文件夹TestDatabase

运行提取基准

未处理的异常:System.IO.FileNotFoundException:未能加载 文件或组件'PresentationCore,Version = 4.0.0.0,Culture = neutral, PublicKeyToken = 31bf3856ad364e35'或其中之一它的依赖关系。

文件名: 'PresentationCore,版本= 4.0.0.0,文化=中性 公钥= 31bf3856ad364e35'

在DatabaseAnalyzer.DatabaseAnalyzer.RunExtractorBenchmark() < 0x40674790 + 0x00033>在:0在DatabaseAnalyzer。 DatabaseAnalyzer.RunMatcherBenchmark()< 0x40674600 + 0x000eb>在:0

在DatabaseAnalyzer.DatabaseAnalyzer.Run()< 0x40642a40 + 0x000bf>在 :0

在DatabaseAnalyzer.DatabaseAnalyzer.Main(System.String []参数) < 0x4063bd50 + 0x00037>在:0

[ERROR]致命未处理的异常信息:System.IO.FileNotFoundException: 无法加载文件或组件'PresentationCore,Version = 4.0.0.0, Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其 依赖项之一。

文件名: 'PresentationCore,版本= 4.0.0.0,文化=中性 公钥= 31bf3856ad364e35' 在 DatabaseAnalyzer.DatabaseAnalyzer.RunExtractorBenchmark()< 0x40674790 + 0x00033>在:0在DatabaseAnalyzer.DatabaseAnalyzer.RunMatcherBenchmark( )< 0x40674600 + 0x000eb>在:0

在DatabaseAnalyzer.DatabaseAnalyzer.Run()< 0x40642a40 + 0x000bf>在 :0

在DatabaseAnalyzer.DatabaseAnalyzer.Main(SY stem.String []参数) < 0x4063bd50 + 0x00037>在:0

根据https://sourceforge.net/p/sourceafis/discussion/1051112/thread/dd8df289/#a006,的WinForms此处应该代替施加WPF的,并使用位图类来取代的BitmapImage类WPF的,但我不不知道该怎么做。有人有这样的经历吗?

这是所使用的原始功能WPF位图类

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; 
 
     }

  • $单SourceAFIS.FingerprintAnalysis.exe
    的入口点方法无法加载

  • 我该如何解决这个更有意义的异常?

    +0

    什么版本的单声道,什么发行版和版本是这样的? – user1623521

    +0

    我正在使用Ubuntu15.10 64位和单声道4.4.0 –

    +0

    您是如何安装mono的? – user1623521

    回答

    1

    的WinForms应该在这里,而不是WPF应用和使用位图类 更换的BitmapImage类WPF,但我不知道该怎么做 准确。有人有这样的经历吗?

    你知道如何用C#语言编程吗?他们在该论坛中的含义是,您需要将代码更改为不使用WPF库,而是使用Windows Forms UI工具包。

    如果您在运行时尝试加载“PresentationCore”的异常,则意味着它仍在尝试加载WPF。

    +0

    我试图改变'使用系统.Windows.Media.Imaging;”到'使用System.drawing'或'使用System.Windows.Forms'代码中。问题是我不知道如何将基于WPF的类更改为基于Winfoms的类。 –

    +0

    然后你需要研究那些UI工具包API,我会建议他们创建一些示例程序,它会花你几周的时间做,非常容易 – knocte

    0

    尝试安装mono-complete包装,例如,

    apt-get install mono-complete 
    

    相关:Mono, failing to open executable

    此外,请确保您已安装.NET Framework,例如,通过使用winetricks

    apt-get install winetricks 
    winetricks dotnet46 
    

    参见:Could not load file or assembly 'PresentationCore'

    PresentationCore是.NET 4


    更进一步,你可以尝试以下suggestions

    • IIS尝试在启用32位应用程序应用程序池的高级设置
    • 配置身份验证如下:

      • 禁用匿名身份验证。
      • 启用ASP.NET模拟。
      • 启用Windows身份验证。