Skip to content
The long-awaited C# (.net/mono) wrapper for the great fprint library
Branch: master
Clone or download
Latest commit d4db00a Dec 11, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
Unosquare.Labs.LibFprint.Tests Code Review Jul 6, 2018
Unosquare.Labs.LibFprint Code Review Jul 6, 2018
.gitignore Initial commit Jun 25, 2015
.travis.yml Add Travis Jun 25, 2015
LICENSE Initial commit Jun 25, 2015 Update Dec 10, 2018
Unosquare.Labs.LibFprint.sln updating solutions and project for MonoDevelop compatibility Jun 25, 2015
appveyor.yml Update appveyor.yml Dec 10, 2018
docfx.json Added docfx.json Nov 1, 2017
toc.yml Add DocFx Feb 27, 2017

Analytics Build Status Build status


The long-awaited C# (.net/mono) wrapper for the great fingerprint reader interfacing library libfprint Note: A few people have reported a System.DllNotFoundException being thrown at runtime. This is a Linux project. There is no libfprint.dll for Windows

From the libfprint website:

libfprint is an open source software library designed to make it easy for application developers to add support for consumer fingerprint readers to their software.

This wrapper makes interfacing with your fingerprint reader extremely easy.

Simple guidelines

  • Use the FingerprintDeviceManager to discover connected fingerprint devices
  • Use the FingerprintDevice objects provided by the device manager to Enroll, Verify and Identify fingerprints
  • Use the FingerprintGallery to keep a database of fingerprints to match against. You can load the contents of the gallery from files, a database or pretty much any byte array prodiced by the Enroll functionality.
  • Finally, (and optionally) use the PgmFormatReader to turn PGM image files to Bitmaps
  • Have fun!

Super quick code example

using (var manager = FingerprintDeviceManager.Instance)
  using (var gallery = new FingerprintGallery())
    var device = manager.DiscoverDevices().FirstOrDefault();
    var enrollResult = device.EnrollFingerprint("enroll.pgm");
    if (enrollResult.IsEnrollComplete)
      var isVerified = device.VerifyFingerprint(enrollResult, "verify.pgm");
      if (isVerified)
        gallery.Add("username_gose_here", enrollResult);
    var identified = device.IdentifyFingerprint(gallery, "identify.pgm");

Getting it to run on the Raspberry Pi (Raspbian)

Raspbian has a fairly outdated libfprint-dev package (0.4.0). The following script will remove the installed libfprint-dev, install dependencies, pull code from 0.5.1, build it, and install the library.

sudo apt-get remove -y libfprint-dev
sudo apt-get autoremove -y
sudo apt-get install -y libusb-1.0-0-dev
sudo apt-get install -y libnss3-dev
sudo apt-get install -y libgtk2.0-dev

tar xf libfprint-0.5.1.tar.xz
rm libfprint-0.5.1.tar.xz
cd libfprint-0.5.1
sudo make install
sudo make clean
cd ..
sudo cp /usr/local/lib/
sudo find / -iname ""

You will also obviously want to install mono for any of the above to work . . .

sudo apt-get install mono-complete


The identification logic seems to be fairly slow when we start adding many fingerprints. Maybe using this library for imaging and then using something like SourceAFIS for identification would work better...


Thanks to the libfprint developers!

You can’t perform that action at this time.