Git Product home page Git Product logo

jnbis's Introduction

#JNBIS Java Implementation of NIST Biometric Image Software (NBIS) GitHub license

  • master Build Status
  • develop Build Status

###About JNBIS JNBIS is a library, written in Java, to extract and decode NIST (National Institute of Standards and Technology) compressed files and WSQ (Wavelet Scalar Quantization) images. The code has been converted from NBIS (NIST Biometric Image Software) version 1.1 which is written in C. You can find more about NIST Biometric Image Software here.

NOTE: Version 2.x is the active development branch, check branch version/1.x for the older versions.

###Quick Start #####Build and Install JNBIS is available in the maven central repository, so you just need to download and add it to your project libraries or if you are using maven, add it to project dependencies. Maven Central

<dependency>
  <groupId>jnbis</groupId>
  <artifactId>jnbis</artifactId>
  <version>2.x.x</version>
</dependency>

Alternatively, you can clone the source code and build it with maven. You need JDK version 1.8 or higher to build the code.

$ git clone [email protected]:mhshams/jnbis.git
$ cd jnbis
$ mvn package

###Examples #####WSQ Decoding Convert WSQ image to PNG image and return the result as File

File png = Jnbis.wsq()
                .decode("path/to/wsq/file.wsq")
                .toPng()
                .asFile("/path/to/final/file.png");

Convert WSQ image to GIF image and return the result as File

File gif = Jnbis.wsq()
               .decode(new File("path/to/wsq/file.wsq"))
               .toGif()
               .asFile("/path/to/final/file.gif");

Convert WSQ image (as input stream) to JPEG image and return the result as File

File jpg = Jnbis.wsq()
                .decode(wsqInputStream)
                .toJpg()
                .asFile("/path/to/final/file.jpg");

Convert WSQ image to PNG image and return the result as InputStream

 InputStream pngStream = Jnbis.wsq()
                              .decode("path/to/wsq/file.wsq")
                              .toPng()
                              .asInputStream();

Convert WSQ image to GIF image and return the result as Byte Array

byte[] gifBytes = Jnbis.wsq()
                       .decode(new File("path/to/wsq/file.wsq"))
                       .toGif()
                       .asByteArray();

For more examples check the SampleWsqTest.java in the project source. #####NIST Decoding Decode a NIST file with given file name

Nist nist = Jnbis.nist().decode("/path/to/nist/file"));

Decode a NIST file with given File instance

Nist nist = Jnbis.nist().decode(new File("/path/to/nist/file")));

Decode a NIST file with given InputStream instance

Nist nist = Jnbis.nist().decode(nistInputStream));

Nist instance contains different types of data, depending on file type. Here is a sample code that extract all fingerprints and save them in individual files.

Nist nist = Jnbis.nist().decode(new File("/path/to/nist/file")));

for (HighResolutionGrayscaleFingerprint fp : nist.getHiResGrayscaleFingerprints()) {
    Jnbis.wsq()
        .decode(fp.getImageData())
        .toPng()
        .asFile("/path/fp-" + fp.getImageDesignationCharacter() + ".png");
}

For more examples check the SampleNistTest.java and AnsiReferencesTest.java in the project source.

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.