Skip to content

Isabry/WSQ-Encoder-Decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSQ-Encoder-Decoder

introduction

The Wavelet Scalar Quantization algorithm (WSQ) is a compression algorithm used for gray-scale fingerprint images. It is based on wavelet theory and has become a standard for the exchange and storage of fingerprint images. WSQ was developed by the FBI, the Los Alamos National Laboratory, and the National Institute of Standards and Technology (NIST).

Sources

An open-source WSQ image encoder/decoder for Android based on NBIS v5.0.0.

Usage

Encoding an image:

val portrait: InputStream = context.assets.open("portrait.png")
val bitmap: Bitmap = BitmapFactory.decodeStream(portrait)

// higher-quality encode
val wsqData: ByteArray = WSQEncoder(bitmap)
                        .setBitrate(WSQEncoder.BITRATE_5_TO_1)
                        .encode()

// lower-quality encode
val wsqData: ByteArray = WSQEncoder(bitmap)
                        .setBitrate(WSQEncoder.BITRATE_15_TO_1)
                        .encode()

Decoding an image:

val bitmap: Bitmap = WSQDecoder.decode(wsqData).bitmap
imgView.setImageBitmap(bitmap)

Set up

Add dependency to your build.gradle

implementation("fr.sabry.wsq:wsq:1.1.1")

About

Wavelet Scalar Quantization algorithm (WSQ) for Android

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages