WE ARE LOOKING FOR A NEW HOME FOR THIS PROJECT. APPLY AT: https://adoptoposs.org/p/c905cc68-9a61-4b69-bf52-b27bda1fd6b3
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.
- 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!
using (var manager = FingerprintDeviceManager.Instance)
{
manager.Initialize();
using (var gallery = new FingerprintGallery())
{
var device = manager.DiscoverDevices().FirstOrDefault();
device.Open();
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");
}
}
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
wget http://people.freedesktop.org/~hadess/libfprint-0.5.1.tar.xz
tar xf libfprint-0.5.1.tar.xz
rm libfprint-0.5.1.tar.xz
cd libfprint-0.5.1
./configure
make
sudo make install
sudo make clean
cd ..
sudo cp /usr/local/lib/libfprint.so libfprint.so
sudo find / -iname "libfprint.so"
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!