Coder Social home page Coder Social logo

skymask / libfprint-cs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unosquare/libfprint-cs

0.0 1.0 0.0 505 KB

The long-awaited C# (.net/mono) wrapper for the great fprint library

Home Page: https://unosquare.github.io/libfprint-cs/

License: GNU Lesser General Public License v2.1

C# 84.16% C 15.84%

libfprint-cs's Introduction

libfprint-cs

Analytics

The long-awaited C# (.net/mono) wrapper for the great fingerprint reader interfacing library libfprint

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)
{
  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");
  }
}

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

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

Futures

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

Thanks

Thanks to the libfprint developers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.