2016-06-15 97 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身份驗證。